Configuring Internet access:
Configure the nic. To get online. Take the Linux VIRTUAL machine as an example. The steps are as follows:
Check to see if the IP is configured on native Linux:
After confirming that Linux had configured IP, we configured the virtual network card we needed on the vmware software.
Edit — virtual Web editor
Click Add Network
Select the virtual network card you want to add (vmnet9 as an example)
Select NAT mode (note that the NAT option should be disabled for other network cards that already have NAT mode)
Remove the DHCP
Set the subnet IP address to the same network segment as the virtual system. In this example, the IP address of my VM is 192.168.4.7. Therefore, set the subnet IP address to 192.168.4.0
After that, another window will pop up. Set the gateway IP address to 192.168.4.2 or 192.168.4.254
After confirming, we configure the real machine IP.
The following image appears (click change adapter)
We found our newly added vmware9
Right-click —-. Properties — ipv4– Configure the corresponding IP address (VMS in the same network segment with address rules).
Let’s go back to Virtual machine, right-click virtual Machine — Settings
Click on the network Adapter and select the nic we added vmNet9
Then we test connectivity. (Ok)
Let’s configure our previous gateway.
Command template: Nmcli connection modify vm NIC name ipv4.method manual ipv4.dns 8.8.8.8 ipv4.gateway Gateway connection.autoconnect configured in the previous step Yes nmcli connection Up Vm NIC nameCopy the code