How to configure Ubuntu w/ nested virtualization using Vagrant and Virtualbox on MacOS

If you are taking advanced operating systems course at Georgia Tech (OMSCS) and want to run the the lab environment on your mac laptop (or desktop) using Virtualbox, then follow the below instructions. Below, you’ll find a Vagrantfile that will launch a virtual machine, install Ubuntu and configure nested virtualization:

Virtual box w/ nested virtualization
Virtual box w/ nested virtualization


Step by Step Instructions

  1. Download and Install latest version of Virtualbox for MacOS1
  2. Download and install Vagrant
  3. Create Vagrantfile
    1. mkdir -p ~/workspace/advanced-os-vm && cd ~/workspace/advanced-os-vm
    2. Copy and paste the Vagrant file contents (inspired by another blog post2)
      Vagrant.configure("2") do |config| = "ubuntu/trusty64"
        # enable nested virtualization
        config.vm.provider "virtualbox" do |vb|
          vb.customize ['modifyvm', :id, '--nested-hw-virt', 'on']


  4. Launch virtual machine
    1. Execute vagrant up

Compiling pre-lab

  1. Copy prelab.tar to ~/workspace/advanced-os-vm
  2. Log into your vm
    1. Execute vagrant-ssh
vagrant@vagrant-ubuntu-trusty-64:~$ cd /vagrant
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ tar xvf prelab.tar 
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ make
make: *** No targets specified and no makefile found.  Stop.


1. Make sure you are running a version that’s >= 6.1.8 to avoid being bitten by a potential bug that’s reported here:

2. Code snippet for Vagrantfile largely is a derivative of what I found here: