Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Virtual machine setup

Table of contents

  1. Choosing your development environment
  2. Vagrant troubleshooting
  3. Windows troubleshooting
    1. Windows Subsystem for Linux (WSL)
    2. SSH client
    3. Bootup timeout
    4. Hyper-V

We have prepared a virtual machine image that is preconfigured with all the development tools necessary to run and test your code for this class. Later in the course, we will discuss virtual machines; for now, you can think of it as a software version of actual hardware.

Choosing your development environment

To begin your setup, you must choose from one of the following four options. You must complete one of the following setup choices before moving onto Virtual Machine Configuration.

  1. VirtualBox setup: this is the choice that most students typically go with. You will run a VM using VirtualBox. Note that if you’re using an Apple M1 Mac, you cannot choose this option.
  2. Instructional machine setup: if you prefer not to use a VM, you can use the EECS instructional machines instead. Note that this is the officially supported option for students using M1 Macs; course staff will not provide setup assistance if you choose to use option 3 below.
  3. QEMU setup: if you are unable to run an x86-based VM (notably, if you’re using an Apple M1 Mac), this is an alternative that allows you to still run a VM without relying on VirtualBox.

    Note: Many students who’ve tested this setup have found it to run very slowly. This is because it requires emulating x86 on ARM. As a result, we highly recommend that students with M1 Macs use the instructional machine setup (option 2).

  4. Cloud machine setup: an alternative to using the Hive machines.

Vagrant troubleshooting

After running vagrant up, you may run into an error reading The IP address configured for the host-only network is not within the allowed ranges. This can be fixed on macOS and Linux with

sudo mkdir -p /etc/vbox
sudo sh -c 'printf "*\n* 2001::/64" >> /etc/vbox/networks.conf'

This appends the lines outlined in this Stack Overflow post to the file, so avoid running the command multiple times. If you would like to overwrite the contents of the file (i.e. you don’t care about the existing contents), you can replace the second command with

sudo sh -c 'printf "*\n* 2001::/64" > /etc/vbox/networks.conf'

If vagrant up still fails, try running vagrant provision and see if it fixes things. As a last resort, you can run vagrant destroy to destroy the VM. Then, start over with vagrant up.

Note: Some shells may have issues with escaping newlines. Check that your /etc/vbox/networks.conf file ends in something like this (the asterisks are necessary):

* 2001::/64

You can also edit the /etc/vbox/networks.conf yourself if necessary, using vim, emacs, or another text editor.

Windows troubleshooting

Windows Subsystem for Linux (WSL)

We do not recommend using Vagrant and/or VirtualBox in WSL. If you choose to use Vagrant for Linux inside WSL, you should still have VirtualBox installed in Windows. Vagrant has documentation on the configuration necessary to support usage of Windows VirtualBox inside WSL.

SSH client

On the latest version of Windows 10, the virtual machine should work on the default command line. If you are using an older version of Windows, your installation may not support SSH from the command line. In this case, the “vagrant ssh” command from the above steps will cause an error message prompting you to download Cygwin or something similar that supports an SSH client. Previous TAs have wrote a guide on setting up Vagrant with Cygwin in Windows. Alternatively, it is possible to use PuTTY instead of Cygwin.

Bootup timeout

If you get an error about your VM bootup timing out, you may need to enable VT-x (virtualization) on your CPU in BIOS.


If you get an error about Hyper-V being enabled, you should disable Hyper-V to use VirtualBox. Alternatively, you can set up Vagrant to utilize Hyper-V as the provider instead of VirtualBox, and create the VM yourself (see CS 162 VM provisioner above for details).

Table of contents