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.
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
Git clone InfraSIM repository:
# git clone <idic repo url>
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.
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”
Here’s introduction on how to deploy InfraSIM build on different hypervisors.
Prerequisite:
Install necessary packages.:
#sudo apt-get install docker docker-engine
Build Docker-based Image.:
# cd tools/docker_builder
# sudo ./docker_image_builder.sh -d <your idic directory>/pdk/linux/vnode -t vnode
Start Docker-based VM.:
# ./run_docker.sh -n vnode -t vnode
Install necessary packages.:
# sudo apt-get install virt-manager
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.
Start KVM-based VM using qemu.:
# ./start_kvm_vm.sh -n vnode
Use virt-manager to see the GUI interface You can see the running virtual machine in virt-manager
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
Install necessary packages:
#sudo apt-get install virtualbox
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
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.