Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1.  Check the Linux version of the host. This guide is validated and verified for Ubuntu 16.04 LTS starting from a clean install: 

    Code Block
    user@ubuntubox:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04 LTS
    Release:    16.04
    Codename:   xenial
    Code Block
    user@ubuntubox:~$ uname -a
    Linux ubuntubox 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

    After verifying the version, install libvirt and QEMU. The following commands install the necessary components to get libvirt and QEMU operational.

    Code Block
    user@ubuntubox:~$ sudo apt-get update -y
    user@ubuntubox:~$ sudo apt-get install libvirt-bin libvirt-dev qemu-utils qemu
    user@ubuntubox:~$ sudo /etc/init.d/libvirt-bin restart
    titleClick here if running Ubuntu 14.04...

    The version of libvirt which ships in Ubuntu 14.04 is too old to be used in many of the simulations built by Cumulus.

    The linuxsimba/libvirt-udp-tunnel package repository provides an updated libvirtd version that provides enhancements required to launch Cumulus VX. The example below shows how to add the repository:

    Code Block
    user@ubuntubox:~$ sudo add-apt-repository ppa:linuxsimba/libvirt-udp-tunnel 

    This repository contains a version of libvirt that has the necessary patches to support the construction of UDP tunnels, which are used for the point-to-point links in a VM simulation.

    This version of libvirt needs to have a default storage pool created using the process below.

    Code Block
    user@ubuntubox:~$ sudo virsh pool-define-as --name default --type dir --target /var/lib/libvirt/images
    user@ubuntubox:~$ sudo virsh pool-autostart default
    user@ubuntubox:~$ sudo virsh pool-build default
    user@ubuntubox:~$ sudo virsh pool-start default
  2. After the installation completes, log out, then log in and verify the libvirt version. 

    Code Block
    user@ubuntubox:~$ libvirtd --version
    libvirtd (libvirt) 1.3.1

    libvirt versions 1.2.20 or higher have native support for the UDP tunnels, which are used for the point-to-point links in VM simulation.

  3. Add your user to the libvirtd group (if not already present) so your user can perform virsh commands. 

    Code Block
    user@ubuntubox:~$ sudo addgroup libvirtd
    user@ubuntubox:~$ sudo usermod -a -G libvirtd USERNAME

    To apply the new group to your existing user, log out and in again.

  4. Confirm that your Linux kernel and BIOS settings permit the use of KVM hardware acceleration.

    Code Block
    user@ubuntubox:~$ kvm-ok
    INFO: /dev/kvm exists
    KVM acceleration can be used


  1. Install Vagrant from the deb package. Cumulus Networks cannot guarantee the functionality of any version of Vagrant. In this guide, Vagrant version 2.0.2 is used.

    Code Block
    user@ubuntubox:~$ wget
    --2018-05-04 09:36:22--
    Resolving (, 2a04:4e42:e::439
    Connecting to (||:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 43678320 (42M) [application/x-debian-package]
    Saving to: ‘vagrant_2.0.2_x86_64.deb’
    vagrant_2.0.2_x86_6 100%[===================>]  41.65M  33.1MB/s    in 1.3s    
    2018-05-04 09:36:23 (33.1 MB/s) - ‘vagrant_2.0.2_x86_64.deb’ saved [43678320/43678320]
  2. Install Vagrant using dpkg:

    Code Block
    user@ubuntubox:~$ sudo dpkg -i vagrant_2.0.2_x86_64.deb 
    Selecting previously unselected package vagrant.
    (Reading database ... 387062 files and directories currently installed.)
    Preparing to unpack vagrant_2.0.2_x86_64.deb ...
    Unpacking vagrant (1:2.0.2) ...
    Setting up vagrant (1:2.0.2) ...
  3. Verify the Vagrant version:

    Code Block
    user@ubuntubox:~$ vagrant --version
    Vagrant 2.0.2
  4. Install the necessary plugins for Vagrant:

    Code Block
    user@ubuntubox# vagrant plugin install vagrant-libvirt
    Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
    Installed the plugin 'vagrant-libvirt (0.0.43)'!
    user@ubuntubox# vagrant plugin install vagrant-mutate
    Installing the 'vagrant-mutate' plugin. This can take a few minutes...
    Installed the plugin 'vagrant-mutate (1.2.0)'!

    Vagrant plugin installation is unique to each user; make sure to install plugins as the user who will run the simulations.

  5. Install the CumulusCommunity/cumulus-vx box image:

    Code Block
    vagrant box add CumulusCommunity/cumulus-vx --provider=libvirt

    Vagrant box image installation is unique to each user; make sure to install images as the user who will run the simulations.

  6. Test that everything is working:

    Code Block
    user@ubuntubox:~$ mkdir ./testdir ; cd ./testdir
    user@ubuntubox:~/testdir$ vagrant init CumulusCommunity/cumulus-vx
    A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please readthe comments in the Vagrantfile as well as documentation on`` for more information on using Vagrant.
    user@ubuntubox:~/testdir$ vagrant up --provider=libvirt
    user@ubuntubox:~/testdir$ vagrant status
    (eric@xenial1)-(12:07 PM Tue Jun 07)->-(1 files, 16Kb)--> vagrant status
    Current machine states:
            default running (libvirt)
  7. To show all running KVM/libvirt VMs:

    Code Block
    user@ubuntubox:~/testdir$ virsh list --all 
    Id    Name                           State 
    2     test_default                   running 
    #Look at libvirt's XML definition of the VM used to create the VM:
    user@ubuntubox:~/testdir$ virsh dumpxml [name of domain]
  8. The libvirt domain is running. To stop this machine, you can run vagrant halt. To destroy the machine, you can run vagrant destroy.

    Code Block
    user@ubuntubox:~/testdir$ vagrant destroy -f