Skip to Content

Creating a New Host-Only Adapter in VirtualBox

Published on November 12, 2024

Why You May Need a VirtualBox Host-Only Adapter
What is a Virtual Network / Adapter?
Setting Up a Virtual Host-only Network
Adding a Host-Only Adapter to a Virtual Machine
Find and Test your Host-Only Network IP

Why You May Need a VirtualBox Host-Only Adapter
virtualbox150

Sometimes you would like to be able to network between your host machine and your guest machine. These networks can be used for many different reasons, such as transferring files between the host and the guest, or to network between multiple virtual machines running on the same host. Different tasks require different methods. This page discusses virtual network adapters and how to set up a host-only adapter to communicate between the guest machine and the host.

Click here for a quick-start reference guide.

What is a Virtual Network / Adapter?

When you use a virtual machine, you must set up virtual hardware to interact with the machine. For example, you expose some of your physical memory to act as virtual memory and you can expose folders to act as virtual drives. Similarly, we can provide the guest machine with a virtual network adapter so that it can access the internet through our host’s network adapter. There are different types of virtual network adapters, including:

Setting Up a Virtual Host-only Network

Before you can start to use host-only adapters you will need to configure a virtual network on the host for them to communicate through. On the main VirtualBox window, click File > Host Network Manager. If the list is empty, you will need to set up a new network. You can do this by pressing Create. Make sure to enable the DHCP Server by clicking the checkbox on the right side of the network details.

At this point, you can click Properties to see the network settings. The default values may be fine, but if the network does not work you can use these properties:

Adding a Host-Only Adapter to a Virtual Machine

Once you have set up the virtual host-only network you can add a new adapter to a Virtual Machine so that it can communicate over that network. You can set up each guest to communicate differently, so adapters are set up on a per-guest basis.

Your host-only network should now be setup for use on the guest Virtual Machine.

Find and Test your Host-Only Network IP

Launch the Virtual Machine and (on a Linux guest) run the ifconfig command. The output will show the configuration of all the networks. You should see one that has an IP on the 192.168.56.x subnet that you defined for the host-only network. This will be the IP you can use to connect to that Virtual Machine from your host machine or from another guest.
For instance, if you are using one of our standard Virtual Machine images, you should now be able to ssh to the guest from your host: