We can usually find the information about connecting to the Guest machine in VirtualBox. Most of the practices are performed using the Host-only setting method.
But in version 7.0.4 of VirtualBox, the same setting does not work. This is because the new network interface in the Guest is not enabled correctly. This document describes the steps on how to enable the network interface.
-
First check the number of the network interface.
ifconfig -a | more
Now we will get the number of the network interface is “enp0s8”
-
Edit the network configuration. (Here we use Ubuntu 22.04)
vim /etc/netplan/00-installer-config.yaml
Add enp0s8 settings to this file.
-
Execute the following command to apply the above settings.
netplan generate
netplan apply