No Host only adapter selected
Probably, the virtual host-only network wasn't set up yet. Here's is how you can fix this:
- From the main menu, select File > Preferences (Ctrl+G) - NOT the settings of a single vm
- Select Network in the list on the left
- You should see an empty white box with "Host-only Networks" at the top. On the right, there are three buttons to manage them. Click the topmost one (with a green plus symbol). A new Host-only network will be created and added to the list.
Normally, the settings of the new network will be ok, but for completeness, I give the default values here. You can access the settings for the host-only network through the screwdriver button on the right.
- Adapter:
- IPv4 address: 192.168.56.1
- IPv4 Network Mask: 255.255.255.0
- DHCP server:
- Enable server: checked
- Server Address: 192.168.56.100
- Server Mask: 255.255.255.0
- Lower Address Bound: 192.168.56.101
- Upper Address Bound: 192.168.56.254
You can change these settings to your liking, as long as they're consistent.
I installed virtual box recently and its different,
After Virtual Box is open, click on File>Host Network Manager>Add. This will add the 192.168.56.1/24 IP as shown above.
Now you can see vboxnet0 in the "Name" dropdown in the VM.
For those, who are in trouble finding "Host-only Networks" tab in File->Preferences->Network.
After the version VirtualBox 5.2.0, there are some changes with the location of "Host-only Networks" tab.
This tool is moved on the main UI toolbar, specifically the Global Tools split button on the right.
Alternatively, you can access it via Ctrl+W, or File->Host Network Manager menu.
Source: https://forums.virtualbox.org/viewtopic.php?f=8&t=85464