When configuring VirtualBox networking, the following networks and types are required:
Network Type |
Name |
Network |
Adapter Address |
DHCP |
---|---|---|---|---|
NAT |
<default> |
<default> |
<default> |
Yes |
Host-only |
vboxnet0 |
10.254.254.0/24 |
10.254.254.1 |
No |
Host-only |
vboxnet1 |
10.50.0.0/24 |
10.50.0.1 |
No |
Internal |
overlay |
172.18.0.0/24 |
n/a |
No |
Some of these networks are configured within the Preferences window of the VirtualBox application, while others are configured within the virtual machine settings window. The configuration of these networks is covered in the following sections.
To configure host-only networks within VirtualBox, open up the Preferences window. On a MacOS X machine, this can be found under the VirtualBox menu; on a Windows machine, this can be found under the File menu. By default, the General settings window will appear:
Perform the following steps to configure the host-only networks:
Click on the Host-only Networks button to reveal the existing host-only networks:
Here, there are no host-only networks defined by default. On the right-hand side of the window, click on the icon shaped like a PCI card with a plus sign to add a new network:
The first network will correspond to MGMT_NET, which is the OpenStack management and API network. The host machine, in this case the workstation running VirtualBox, needs an IP address from the network in order to communicate with the virtual OpenStack infrastructure nodes. Specify the address as
10.254.254.1
and a netmask of255.255.255.0
.Be sure to disable DHCP in the DHCP Server section and click on the OK button to save the changes. Once the changes are saved, the network will appear in the list:
Add an additional network that will be used for external network traffic, specifically the floating IP network
10.50.0.0/24
:Click on OK to save the changes. VirtualBox automatically configures an interface on the host machine with the address
10.50.0.1
and will be able to communicate with the floating IPs that are configured throughout the book. Once the changes are saved, both networks will be listed under Host-only Networks:Click on the OK button to save the networks.