Home >Software Tutorial >Computer Software >How to connect a VMware virtual machine to the Internet. Detailed operations for setting up a virtual machine to access the Internet.
How to connect VMware virtual machine to the network? If you downloaded and installed a VMware virtual machine but are having trouble setting up your network connection, this guide will provide you with detailed step-by-step instructions. PHP editor Youzi has compiled a complete tutorial on VMware virtual machine networking. From various networking options to specific configuration steps, this article will help you solve this problem. Read on to learn how to easily establish network connections for your VMware virtual machines to take advantage of their multi-system capabilities.
1. Ensure that Linux and the virtual machine are on the same network segment.
Win+r enter cmd mode, enter the command ipconfig/all to view the local IP.
Enter the virtual machine command terminal and enter the command ifconfig to check the virtual machine IP. The Linux network segment must also be between the 192.168.0.1 network segment.
2. Check the default configuration of the virtual machine network card.
Switch to the directory: cd /etc/sysconfig/network-scripts/ and check the network card name.
3. Edit ifcfg-eno16777736 network card with vim, enter insert mode and modify the configuration.
4. If set to dynamic link (dhcp) - the network card should be set to bridge mode, and modify the network adapter to bridge mode in the virtual machine settings.
5. Open the virtual network editor (find Edit - Virtual Network Editor in Workststion in the upper left corner of the virtual machine interface), select Change Settings, bridge to the network card you are currently using, or set it directly to automatic.
6. Turn on the network adapter of the host and ensure that the network card you are bridging to is the network card you are currently using or a network card that can connect to the Internet.
7. Then shut down the virtual machine and restart it or execute the command systemctl restart network to let the server program obtain the latest configuration file. Finally, you can try pinging Baidu.
8. If you want to set up a static link: that is, a fixed ip
usually configure ipv4 with an IP address, IPADDR = fixed ip, configure the ip of the computer host, and the gateway is generally the default gateway.
The above is the detailed content of How to connect a VMware virtual machine to the Internet. Detailed operations for setting up a virtual machine to access the Internet.. For more information, please follow other related articles on the PHP Chinese website!