Cannot Connect CentOS VM to Internet (NAT Connection)
The best option is to let it grab an ip automatically from DHCP:
dhclient -v
This will let centos get an ip automatically.
I just fixed this problem, not sure if anyone found the soultion. How I fixed it for myself was in the VMware (I have 12th version) I went to
- Edit
- Virtual Network Editor
- Restore Defaults
- then click okay
- I reinstalled Centos 7
- Click on Network & Host Name
- Click On for Ethernet
- Wait for details to populate i.e. ip address, subnet mask, dns...
- Works.
You may not have to uninstalled the OS just try going to edit and virtual network editor first and restoring to defaults first. This should work for all OS you install on VMware.
For further readers
I ran through the same problem. Sometimes problem could be in the host machine (Windows 10, and VMware workstation 12), for example in my case.
Check if VMnetDHCP service is running.
right click on windows icon -> task manager -> service tab
if not, then start the service and restart your guest OS in VMware.