Conclusion
After launching Ubuntu on VirtualBox, I noticed that the network was not working. This turned out to be because VirtualBox requires manual switching between Wi-Fi and wired LAN.
Environment
- Ubuntu-20.04.4
- VirtualBox 7.1.8
Steps Taken for Trouble Shooting
1. Check the current network status
Type nmcli device status
.
<network interface> ethernet connecting (getting IP configuration) netplan-<network interface>
lo loopback connected (externally)
It means the connection to wasn’t really connected.
2.Try to reconnect to network
At first disconnect from current network: sudo nmcli device disconnect <network interface>
Then reconnect: sudo nmcli device connect <network interface>
However, the connect command did not respond and the connection failed.
3.Check VirtualBox settings
Attached to: Bridged Adapter
Name: Killer wireless
Additional context: The host machine (the laptop running VirtualBox) switches between wired and wireless connections depending on the situation. At this point, the host was using a wired LAN connection.
As a result, changing the VirtualBox network setting from Wireless to Ethernet (wired) restored the network connection.
Summary: VirtualBox does not automatically detect changes in the host machine’s network, so manual switching is required.