Why the default virtual machine installation is complete, there will be two virtual network cards (VMNET1 and 8), corresponding to the host-only mode and NAT mode, in fact, there are three, there is a bridge to the physical network card (VMNET0), corresponding to the bridge mode.
First, explain the role of the virtual machine each network card set mode!
1, the configuration of the virtual machine NIC
Virtual Machine network card set NAT mode (Internet access available)
Virtual function access outside the network, the external network can not access the virtual machine, equivalent to the physical machine to do the internal network source IP conversion
/edit/Virtual network editor
Connect the NAT mode network card (tick connect the host virtual adapter to this network)
IP can be DHCP assigned (all set automatically) or manually (all statically assigned), remember to set DNS when static
Virtual machine NIC settings only host mode (no Internet access)
DHCP-Allocated network segments can be set in the Virtual network editor.
You can also cancel DHCP assignment, set the static IP of the virtual machine, set the IP of the virtual network card, set the static IP on the physical network card
Virtual machine NIC settings only bridge mode (network card connected to the physical machine) (Internet access)
The equivalent of a physical machine into a two-layer switch, virtual machine serial Two-layer switch, virtual machine and physical confidential network segment
The gateway can set the physical machine NIC to go out of the next hop.
2, the service opens (Ctrl+shlft+esc call Task Manager, view service)
VMware NAT Service//Use NAT mode to turn on
VMware DHCP Service//When using DHCP assignment to turn on
If the above service runs for a few seconds, it shuts down automatically
Edit script runs as Administrator
############################
(@echo off
: s
Ping-n 1 127.1>null
NET start|findstr/i/C: "Service name" >nul&&set k=1| | Set k=0
If%k%==0 (net start "service name")
Goto s)
#############################
3, the System configuration (if the virtual machine is copied out, then the local area network will appear two as the MAC address, which
Will cause DHCP to be assigned no address, so if the copied virtual machines to remove the network card)
Modified:/etc/sysconfig/network-scripts/ifcfg-enoxxxx
Onboot=yes//Set up auto run on boot
The default is to obtain the IP automatically (if set static)
Bootprpto=static (static allocation) | DHCP (dynamic allocation)
Ipaddr=ip Address
gateway= Gateway
Netmask= Mask
Dns1=dns
Modified:/etc/resolv.conf//dns configuration file
IP address of nameserver DNS
Restart the service when you have finished modifying the configuration file: (usually below, or network becomes networking)
Service Network restart
Systemctl Restart Network
/etc/init.d/network restart
If you are still unable to access the Internet is a DNS address problem, it is best to obtain the IP DHCP DNS
Cannot operate on virtual machine when taking snapshot, insufficient capacity of hard disk saved by virtual machine and reason of saving snapshot failure
Ping baidu.com is my most commonly used to verify the use of the Internet means that the first ping will be very slow, should be, to
Find the route, all of you have to wait patiently.
This article is from the "Pan" blog, make sure to keep this source http://zonds.blog.51cto.com/12638755/1942379
Linux system virtual machine configuration Internet Experience