0

I have troubles connecting a CentOS guest on Virtualbox running on a Win 7 host.

The host has been given two adapters: Host-only and NAT.

ip a

enter image description here

vi 03

enter image description here Note: setting GATEWAY=10.0.2.2 still results in the same error

The /etc/resolv.conf looks ok, as in here, that is

nameserver 8.8.8.8
nameserver 8.8.4.4

A network service restart fails with the error (as displayed by systemctl status network.service)Failed to start LSB: Bring ..` although killing the dhclient process as in here did not help.

  • From the manual of VirtualBox v5.0 section 9.11.1, `gateway is set to 10.0.2.2` yet you have manually set to 10.0.0.1 ?!? Have you changed the default NAT network settings for VirtualBox? – Dude named Ben Apr 20 '16 at 09:20

1 Answers1

0

If NetworkManager is running, it doesn't matter what you have on your ifcg-enp0s3, so make sure it is dead:

systemctl stop NetworkManager 
sytemctl disable NetworkManager
ps auxww | grep NetworkManager
kill <PID> (in case it is still running)

After that, restart your network:

systemctl restart network

Then, check your ip address configuration

ifconfig

your gateway

route -n

and resolve any hostname to verify that you are using the DNS's you set:

nslookup example.com

With all this done, if it's still not working, check that the MAC address of the interface set to get the configuration via DHCP is the correct one.

Also, you are talking about the gateway but, why would you configure the network if there's a DHCP server already doing it?

I mean, when you boot up the interface, if it doesn't have any configuration, it will send a multicast DHCP request and the server (if it actually is on the same LAN or you are using DHCRELAY) will answer back with the proper settings.

sysfiend
  • 497
  • 1
  • 6
  • 14