Download the virtual appliance (.ova) file to your hard drive. You can go for the full Ubuntu VM cs60base (3.3G to download, 8G when installed) or the lighter version cs60mini (1.5G to download, <5G installed). This file contains a compressed virtual machine. Import the virtual machine as follows:

Before you start the virtual machine, you must create a "Host-only Adapter" for the virtual network that your host computer and the VM will share. If this adapter has not been created, the VM will fail to start, like this:

Create it as follows:

You can now start your machine:

After your machine starts and you log in (look for the password on Piazza or ask your grader), start a terminal and get a root shell (sudo bash). You will only see the loopback interface lo; eth0 is present but not configured. Configure it with commands in config-eth0.sh. See (*) caveat below regarding pinging your host Mac (192.168.56.1 in this example configuration).

The configuration script config-eth0.sh is this:

Now it's time to configure NAT on your host computer. Shown are the commands for MacOS, explained further on nat-configuration-log.txt.

It didn't work for me the first time, because I picked the wrong interface to work with NAT (i.e., the interface actually connected to my LAN and, through it, to the Internet). I had to redo the NAT rule (more in the log linked above):

Then it worked. I could ping the Internet:

Finally, I checked that my DNS resolution worked too:

(*) Caveat: to be able to ping your host Mac from the VM, you need to make sure your Mac responds to pings, i.e., its "Stealth mode" is off in the Firewall configurations. Check this as follows:


If you use Windows, or cannot configure NAT on your Mac, there is another way to get both virtual connectivity to your host on 192.168.56./24 and to the Internet. For this, you will need to shut down your machine, add a new emulated NAT interface eth1 to it, and configure the two interfaces.

Note: unfortunately, you cannot add an interface to a running or suspended VM in VirtualBox. You really need to shut down the VM for the option to become available.

First, we check that eth1 isn't there already:

Then we shut down the machine.
Now you can add a new adapter via Settings:

Now start the machine and configure eth0 and eth1. Note that you now specify only the IP address of eth0, not the default route or DNS server---all these would come from DHCP over eth1 now.

Note the new routing table. The default route is now through eth1, through the internals of VirtualBox NAT implementation, which also provides the emulated DHCP server we just used. But 192.168.56.1, your host's vboxnet0, is still connected, and you can ping the host.

Finally, observe that the DNS configuration was also obtained from DHCP. In my case, it points to my home router (manufactured by Westell, hence the rather useless "search" configuration):

So this way you have two interfaces: one connected to a virtual LAN where your host machine also emulates an interface, and another through a classical LAN network, which is all internal to VirtualBox, and into which don't have any visibility from the host (and no emulated interface with 10.0.3.x shows on your host's ifconfig list of interfaces).