First, verify network connectivity on your host, where the Virtual Box is running.
Second, shut your virtual ubuntu machine down.
Edit the setting, go to the network properties of the virtual machine and verify that network is bridged, cable connected is checked.
Start your virtual machine.
If using a desktop, then logon to the VM. Find the icon which looks like an up/down arrow, right click and choose edit connections.
Highlight the appropriate connection and choose edit. Verify your settings. if not using DHCP, then pay special attention to netmask and gateway properties.
Once complete, save your settings and exit the dialog.
Right click on the Up/Down Arrow icon again, select disable networking, give it a moment, the repeat the process to Enable Networking.
If logging in from a text console, e would want to verify the values in the /etc/network/interfaces file.
ifconfig -a
This will provide a list of all active network adapters the system is able to see.
next, sudo nano /etc/network/interfaces
The file should resemble the following, more or less:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
For the value shown with ifconfig -a
, substitute with eth0.
I hope this helps.
ifconfig
onhost
to find the device name, then in the VM guest go to network settings and look for that device and select it from the drop down options.gateway4
setting from the Netplan configuration. With the gateway,systemd-networkd
complained (seenetworkctl status
): "br0: Could not set route. Nexthop has invalid gateway. Network is unreachable". I don't understand why a bridge doesn't need (and can't have) a default gateway.