How can I connect linux to the Internet and implement communication between hosts and virtual machines ?, Linux Virtual Machine
When the network is not configured, the linux virtual machine does not have a network, and the host and virtual machine cannot communicate with each other.
How to connect linux to the Internet and implement communication between hosts and virtual machines
Part I: because the visual desktop is not installed when the virtual machine operating system is installed, how to manually set the static IP address of the linux system?
1. If it is not an administrator user, switch to the administrator user (other users do not have the permission to modify the IP configuration file)
2. Enter the command: vi/etc/sysconfig/network-scripts/ifcfg-eth0 to enter the setting file of the IP address, and then press Ins to edit the file
INSERT is displayed below, which indicates you can edit
Change content to the content in the red box
4. After modification, Press ESC first, press:, enter wq, and press enter to save and exit.
5. Enter the command ip address addr. For example, if you find that the ip address has changed to a static ip address set by yourself (if you cannot shut down, restart and try again)
6. ping 192.168.137.21 on the host and find that the pin is available. This indicates that the host can communicate with the VM.