Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Mirage Virtualbox VMs via Vagrant


Clone this repo

$ git clone
$ cd mirage-vagrant-vms

This currently contains support for Ubuntu 14.04 LTS ("Trusty Tahr"), Ubuntu 14.10 ("Utopic Unicorn"), Debian 7.8.0 ("wheezy") and Citrix XenServer 6.5.0.

XenServer support imported from

Install Virtualbox

First, install Oracle's Virtualbox. Download the appropriate installer for your platform from and follow the instructions.

Note that you need a reasonably recent version -- at time of writing, 4.3.4 has been observed to fail to build, while 4.3.26 has been observed to work. Reports of other working or failing versions welcome! (Perhaps as pull requests to this file in this repo :)

Install vagrant

Next, install Vagrant. On OSX I use homebrew so I do this as follows:

$ brew tap phinze/cask
$ brew install brew-cask
$ brew cask install vagrant
$ vagrant --version
Vagrant 1.4.3

Install packer

Then, install Packer. Again, using homebrew this becomes:

$ brew tap homebrew/binary
$ brew install packer


Build a new box using packer:

$ make {ubuntu-14.04,ubuntu-14.10,debian-7.8.0,xenserver-6.5.0}-box

Bring it up and provision it using vagrant:

$ make {ubuntu-14.04,ubuntu-14.10,debian-7.8.0,xenserver-6.5.0}-vagrant

Connect to it via ssh:

$ cd {ubuntu-14.04,ubuntu-14.10,debian-7.8.0,xenserver-6.5.0} && vagrant ssh

Finally, within a box, make sure you add ~/bin to your $PATH to use 0install installed binaries (specifically, opam).

Subsequently, vagrant halt will stop the VM (or the usual shutdown -h now when logged into it), vagrant up will restart it, and vagrant ssh to login.


The following networking instructions need to be updated.


At the risk of this becoming a "general" Xen networking tutorial (as if such a thing were possible)...


[ dom0       ]    [ mirage-domU ]
[ ]    [  ]
                  [ vifN.0      ]
     |                |
     +---[ xenbr0 ]---+
          [ eth2 ]

Useful commands

On host:

vboxmanage list hostonlyifs
vboxmanage list dhcpservers

On dom0:

sudo xm network-list mort-www


network interface configuration. eth0-N, xenbr0

auto xenbr0
iface xenbr0 inet dhcp
      bridge_ports eth2
      bridge_stp off
      bridge_waitport 0
      bridge_fd 0

# The contents below are automatically generated by Vagrant. Do not modify.
auto eth1
iface eth1 inet static

# The contents below are automatically generated by Vagrant. Do not modify.
auto eth2
iface eth2 inet static
      address     <*>
      netmask  <*>

Lines marked <*> move to the xenbr0 config from the eth2 config, and the eth2 config marked as manual not static. This makes connection from dom0 to mirage-domU work.


DHCP server config. subnets from which addresses should be responded with.

subnet netmask {
  # option routers,;


Packer and Vagrant images for building Mirage




No releases published


No packages published