Post

KVM, An alternative to virtualbox

If you’re a student learning security, linux, or a computer tinkerer, you’re definitely familiar with vmware or virtualbox. but for those new with the concept. These are software that lets you run virtual machine or isolated operating system inside your real computer. A computer inside of computer just like an inception.

When I first begin tinkering with my operating system in order to figure out how it works. I used virtual box specifically when configuring metasploitable boxes for pentesting exercise. As time goes by, I begin to combine it to my daily workflow. I setup separated Virtual machine boxes for coding, learning, browsing and gaming. You’re most likely doing that.

But there’s still a problem, Virtual Box is not a Free and open-source software FOSS. VirtualBox isn’t entirely open source. Some of its components, such as the extension pack, are proprietary. Moreover, I’d also like to note out that in order to build Oracle VM VirtualBox you need to use the Open Watcom compiler which is proprietary.

If you’re not fan of a closed source hypervisor. This is where KVM/QEMU or XEN comes into play. KVM lets you turn your Linux box into a hypervisor without setting up or messing around. It falls between between type 1 and type 2 hypervisors. Thus, it is more faster and better virtualization. It has also advanced options like CPU pinning and GPU passthrough.

Maybe you’re wondering, how about prebuilt Virtual Machines. They’re only available on vmdk (Vmware) or ova (Virtualbox) images.

That’s an easy fix. KVM uses of qcow2 disk images. You may easily convert this using the command below.
1
2
3
tar -xvf <image-name>.ova
qemu-img convert <image-name>-disk001.vmdk <image-name>.qcow2 -O qcow2
file <image-name>.qcow2
Fedora: https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/
Ubuntu: https://ubuntu.com/blog/kvm-hyphervisor
Debian
1
sudo apt install --no-install-recommends qemu-kvm libvirt-daemon-system libvirt-clients virt-manager gir1.2-spiceclientgtk-3.0 dnsmasq qemu-utils
Arch:
1
2
sudo pacman -Syu qemu libvirt virt-manager qemu-arch-extra dnsmasq
sudo systemctl enable libvirtd

This post is licensed under CC BY 4.0 by the author.