This method has been tested and feasible on Ubuntu9.1011.10 first, please make sure that Vmware's Networkconnection is selected for Host-only1. edit the DHCP configuration in Ubuntu, delete all content in DHCP, and save # sudogedit/etc/dhcpd. conf if dhcpd. if conf does not exist, create one by yourself. in the host, the network and sharing center can see
This method has been tested on Ubuntu 9.10 11.10.
First, make sure that the Network connection of Vmware is Host-only.
1. Edit the DHCP configuration under Ubuntu, delete all content under DHCP, and save
# Sudo gedit/etc/dhcpd. conf
If dhcpd. conf does not exist, create
2. In the host, the network and sharing center can see
The local connection is the network connection of my host. The local connection 2 corresponds to the local connection 3, and the local connection 2 in my computer corresponds to VMnet1, view the VMnet1 IP address (192.138.137.1 ). Set shared to VWnet in the local connection attributes.
3. Enter the VM, set the nic ip address in the VM to a CIDR block with the VMnet1 IP address, and set the gateway to the IP address of vmnet1.
# Sudo gedit/etc/network/interfaces
Auto eth0
Iface eth0 inet static
Address 192.168.137.X
Gateway 192.168.137.1
Netmask 255.255.255.0
(Note that the value 0 in eth0 is zero .)
The Virtual Machine's DNS is also set to the VMnet1 IP address.
# Sudo gedit/etc/resolv. conf
Nameserver 192.168.137.1
4. Finally, # sudo/etc/init. d/networking restart. You can access the Internet.