Monday, March 2, 2020

virtualbox VM on centos 7 guest won't connect to network

Here's another one that I don't really understand. After working fine all last week with use all day every day, my virtualbox VM running on centos 7 guest and windows 10 host would not connect to the network. I rebooted my entire network, the guest and the host, but the problem remained. I easily found a solution with a google search, but I'm not entirely sure why it's necessary or why things worked fine last week without it. Here is the thread containing the fix, and in the end I just added the following lines to the guest file /etc/sysconfig/network-scripts/ifcfg-enp0s3:

DNS1=8.8.8.8
DNS2=8.8.4.4
# Note this was set to no
ONBOOT=yes

I restarted the guest VM, and then everything works fine.

The two DNS entries are for the Google Public DNS system. I don't know why I didn't need them last week, or why ONBOOT (which was previously set to no wasn't a problem either...

No comments: