6. Build, Package and Deployment

This chapter will introduce how to build, deploy and run virtual compute node on top of KVM, Docker and VirtualBox.

In the following User Guide chapter, it will describe how to deploy and run both virtual compute node, virtual PDU and virtual switch on top of VMWare ESXi. There’s also one vRackSystem which supports deploying large scale infrastructure crossing multiple virtual racks.

6.1. Build Generic Virtual Compute Node

  1. Install Prerequisite packages:

    # sudo apt-get install mkisofs autoconf pkg-config libtool nsis bison flex libncurses5 libncurses5-dev zlib1g-dev libglib2.0-dev libpopt-dev libssl-dev python-dev git libdumbnet1 libdumbnet-dev tclsh
    
  2. Git clone InfraSIM repository:

    # git clone <idic repo url>
    
  3. Configure the Virtual Compute Node:

    # cd idic
    # fakeroot make menuconfig NODE=vnode
    

    You can make some changes for default configuration. Refer to How to build vNode and vPDU. After you finish the changes, you can save and exit.

  4. Build the Virtual Compute Node Root Filesystem:

    # cd idic
    # fakeroot make vnode
    

    If success, you will see config, System.map, vmlinuz and ramfs.lzma under the directory “idic/pdk/linux/vnode”

6.2. Deploy and Run Virtual VMs

Currently, the hypervisors that InfraSIM supported are:

Here’s introduction on how to deploy InfraSIM build on different hypervisors.

Prerequisite:

  1. Clone tool repository
  2. Build the vnode image following the steps in Build Generic Virtual Compute Node Section.

6.2.1. Run Docker-based VM

  1. Install necessary packages.:

    #sudo apt-get install docker docker-engine
    
  2. Build Docker-based Image.:

    # cd tools/docker_builder
    # sudo ./docker_image_builder.sh -d <your idic directory>/pdk/linux/vnode -t vnode
    
  3. Start Docker-based VM.:

    # ./run_docker.sh -n vnode -t vnode
    

6.2.2. Run KVM-Based Virtual Machine

  1. Install necessary packages.:

    # sudo apt-get install virt-manager
    
  2. Build KVM-based Image.:

    # cd tools/kvm_builder
    # sudo ./kvm_builder.sh -d <your idic directory>/pdk/linux/vnode -t vnode
    

    If success, you will see “vnode.qcow2” disk image under the directory.

  3. Start KVM-based VM using qemu.:

    # ./start_kvm_vm.sh -n vnode
    
  4. Use virt-manager to see the GUI interface You can see the running virtual machine in virt-manager

    _images/virt-manager.png

6.2.3. Run Virtualbox-based VM

We use vagrant to create the Virtualbox-based VM. Using vagrant, you can quickly create the Virtualbox-based VM on your laptop, work PC whatever your system is MacOS, Linux or even Windows.

Notice: We will assume that you have basic knowledge about how vagrant works and vagrant version should be > 1.8

  1. Install necessary packages:

    #sudo apt-get install virtualbox
    
  2. Build Virtualbox-based Image:

    # cd tools/virtualbox_builder
    # sudo ./virtualbox_builder.sh -d <your idic directory>/pdk/linux/vnode -n vnode
    

    You will see that the “vnode.box” is under this directory

  3. Start Virtualbox-based VM:

    # vagrant box add --name vnode vnode.box
    # mkdir vnode && cd vnode
    # vagrant init vnode
    # vagrant up
    

    Notice: Because VirtualBox itself doesn’t and has no plan to support Nested Virtualization: VT-in-VT feature, running Qemu inside VirtualBox can’t enable KVM acceleration, which suffers a big performance penalty.

6.2.4. Run VMWare product based VM

  1. Refer to How to build vNode and vPDU for building OVA image working for both ESXi and VMWare workstation.
  2. Refer to VMWare Workstation deployment for deploying virtual node on VMWare workstation.
  3. Refer to Setup InfraSIM on ESXi for deploying virtual node on VMWare ESXi.