-
Notifications
You must be signed in to change notification settings - Fork 1
VM_Host_Setup
VirtualBox allows several different kinds of networking. NAT is the default, which allows the VM to reach the internet but does not allow the host to ssh into the vm without using port forwarding. To give our VMs a static IP address, we add on Host-Only networking. The first step in doing so is setting up a loopback device on the host machine. Using the GUI, that procedure looks like this.
Here is what the VirtualBox Manager looks like when started for the first time.

Use CTRL+H (or File->Host Network Manager) to bring up this window. (Note the VirtualBox documentation describes an older interface that no longer exists.)

Click on Create. That gives us a host-side network device with the name vboxnet0.

Click on Properties. The DHCP Server should NOT be enabled. Note that the field "IPv4 Address" (192.168.56.1) describes the address of the host machine as seen from the VM. This address will be shared across all VMs.

Click on Apply (if needed) and then Close. Running ip address
on the command line at this point on the host should give
something like:
rountree@Solvent:/$ ip address ... 9: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff rountree@Solvent:/$
Note that the link is currently down.