I am trying to give my Ubuntu VM (16.04) on my Windows 10 host its own IP address via a Bridged Adapter on my local network so I can SSH in to it using a program like TightVNC (so I can view the GUI) from my Macbook Pro.
I am struggling to connect to my router at all from my VM (and thus cannot get an internet connection from my VM either. I could via NAT.). DHCP seems to be failing at assigning the VM an IP.
I have done the following -
On Windows 10 host using VirtualBox 5.2.0
- Created VirtualBox Host-Only Ethernet Adapter in Global Tools and enabled DHCP server (unsure if necessary)
- Configured network settings on VirtualBox to attach to (the correct) Bridged Adapter (wireless)
On Ubuntu 16.04 VM
- Checked my network interface name using “ifconfig” to see that it is called enp0s3 (not eth0)
- Added the lines “auto enp0s3” and “iface enp0s3 inet dhcp” to the file /etc/network/interfaces
Note: I do not have the file
/etc/udev/rules.d/70-persistent-net.rules, however I do have the file
/etc/udev/rules.d/60-vboxadd.rules which contains the following two lines (which I have not edited)
“KERNEL==”vboxguest”, NAME=”vboxguest”, OWNER=”vboxadd”, MODE=”0660” and “KERNEL==”vboxuser”, NAME=” vboxuser”, OWNER=”vboxadd”, MODE=”0660”.
When I run ifdown enp0s3 followed by ifup enp0s3, ifup will eventually time out on
DHCPDISCOVER… and output the lines No
DHCPOFFERS received. and
No working leases in persistent database – sleeping.
As of now I am unsure of what to do next.