This article explains how CentOS can surf the web, and describes how to make CentOS networked in VMware virtual machines, ideally suited to all situations where a host uses a router or dial-up Internet connection. The system used by the author is CentOS6.4, and the other systems are similar.
1. The host's virtual Gateway VMNET8 IP is set to get automatically. The steps are: Right click on the "Properties", then select the IPV4 line, click "Properties", change to automatically get. 2. Similarly, modifying "Local Area Connection" also gets 3 automatically. VMware in the menu "virtual machines"-"settings", the network adapter is selected as NAT4. In VMware, "edit"-"Virtual network editor" Check VMnet8, click NAT (share host IP address with virtual machine), check DHCP (all two boxes).
Click "Apply".
5. Turn on the VMware DHCP service and VMware NAT Service services in the host (Windows7). Write a script to save things.
Create a file Vmdhcp.bat add the following:
net start "VMware DHCP Service"
net start "VMware NAT Service"
Pause
Double-click to run it. and confirm that the service is started.
6. In the virtual machine CentOS write another Linux script, if the smallest version of CentOS will only need service network restart.
This script functions as:
Turn off NetworkManager (service NetworkManager stop), restart Network (service network restart), and then start
NetworkManager (Service NetworkManager start). "Because the NetworkManager in the interface Xwindow will have an impact on the network restart, close it first and finally
This service does not start and has an impact, so finally start it again "
7. Final Test of network connectivity
How does the CentOS virtual machine in vmware go online?