It’s now possible to run VirtualBox on top of KVM hypervisor.
Using VirtualBox just got a more exciting with many possibilities. Cyberus Technology has released the VirtualBox KVM backend source code, allowing you to harness the power of the Linux kernel’s built-in KVM hypervisor for your virtual machines (VMs). This means you can now leverage KVM’s advanced features while still enjoying the familiar VirtualBox interface and management tools.
Why is it important?
Imagine running your existing VirtualBox VMs alongside other KVM-based setups like QEMU/KVM or Cloud Hypervisor. This flexibility allows you to:
- Carve out isolated environments for sensitive services: Run mission-critical applications demanding robust security in Cloud Hypervisor, while keeping user-friendly Windows VMs in the comfort of VirtualBox.
- Ditch the driver (sometimes): No need for the vboxdrv kernel module in certain scenarios. This opens doors for using verified and certified Linux kernels that typically restrict third-party modules.
- Tap into KVM’s hidden potential: Unleash hardware acceleration features like APICv for interrupt virtualization, boosting I/O performance and reducing latency.
- Enhance Windows VM security: KVM offers additional security measures that benefit your Windows guests in virtualized environments.
- Run on bleeding-edge Linux: Forget waiting for VirtualBox to catch up with the latest kernel versions, which can be a little troublesome for some users during kernel version changes. KVM’s built-in nature lets you run VMs on cutting-edge Linux systems.
The code is open-source (GPLv3) and written in C/C++, fostering community contributions and transparency. Stable operation is confirmed on x86_64 systems with Intel processors, while AMD support is still under development but functional.
If you’re a power user or runs a VM infra, seeking advanced features and flexibility, or are looking for the security benefits of KVM for specific workloads, the VirtualBox KVM backend is definitely worth exploring. It seamlessly integrates into your existing VirtualBox setup, making the transition smooth and familiar.
How to use
The VirtualBox KVM software doesn’t come with pre-built components, so it needs to be built from scratch. Only minor adjustments are required to build VirtualBox with KVM as a backend.
Download the source code from github (virtualbox-kvm).
The following command can be used to install all prerequisites on a new installation of Ubuntu 22.04:
apt install acpica-tools chrpath doxygen g++-multilib libasound2-dev libcap-dev \ libcurl4-openssl-dev libdevmapper-dev libidl-dev libopus-dev libpam0g-dev \ libpulse-dev libqt5opengl5-dev libqt5x11extras5-dev qttools5-dev libsdl1.2-dev libsdl-ttf2.0-dev \ libssl-dev libvpx-dev libxcursor-dev libxinerama-dev libxml2-dev libxml2-utils \ libxmu-dev libxrandr-dev make nasm python3-dev python2-dev qttools5-dev-tools \ texlive texlive-fonts-extra texlive-latex-extra unzip xsltproc \ \ default-jdk libstdc++5 libxslt1-dev linux-kernel-headers makeself \ mesa-common-dev subversion yasm zlib1g-dev glslang-tools \ libc6-dev-i386 lib32stdc++6 libtpms-dev
Newer GCC versions (>= 12) might cause build issues. The command above installs a compatible version on Ubuntu 22.04.
After installing everything needed, the building process can be simplified into these steps:
./configure --with-kvm --disable-kmods --disable-docs --disable-hardening --disable-java source ./env.sh kmk out/linux.amd64/release/bin/VirtualBox
The key parameter is the “–with-kvm” switch which enables this feature.
For more details visit the GitHub source code page.
Via blog post.
Recent articles from DebugPoint.com
- Best Way to Get Vertical Tabs in Firefoxon February 21, 2024
- GNOME 46: Best New Featureson February 19, 2024
- Set up Thunderbird Email Client on Ubuntuon February 15, 2024
- 2 Ways to Install Citrix Receiver and Connect to Desktops from Ubuntu and Other Linuxon February 14, 2024
- How to Set up LanguageTool in LibreOfficeon February 13, 2024