When new users start using Nitrux, many think they can’t install many of their tools in the distribution, such as a hypervisor (specifically, type 2 hypervisors), because they’re accustomed to using a package manager to do that. As we describe in the tutorial about Software Management, several methods exist to manage (add, remove, upgrade) software in the distribution.
In today’s tutorial, we’ll see how to install various hypervisors in Nitrux.
Difficulty: ★☆☆☆☆
📜 Table of Contents
VirtualBox (Oracle Installer)
Let’s kick this off with VirtualBox. VirtualBox is a type 2 hypervisor developed by Oracle for running a virtual operating system on your computer and is arguably one of the most popular hypervisors in Linux. Most users are familiar with the installation procedure in Debian-based distributions, like Debian, Ubuntu, Mint, etc., by obtaining a Debian package from the distribution’s repositories provided by the distribution maintainers or adding a repository.
However, installing VirtualBox without the package manager is also possible using an installer provided by Oracle. The VirtualBox installer (a shell script) will install the application in the root directory, specifically in /opt. Since the user can’t select where to install VirtualBox (whether the user uses this installer or a Debian package), we’ll need to enter the overlay and do the installation process. This installer targets all Linux distributions, not specifically Nitrux.
To install VirtualBox in Nitrux, do the following.
- To obtain the link to the installer, visit the official VirtualBox website, then click the big button “Download VirtualBox 7.0.”
- Now click on Linux distributions under VirtualBox 7.0.10 platform packages.
- Then right-click on All distributions under VirtualBox 7.0.10 for Linux and select “Copy link.”
- 🔰 Information: VirtualBox 7.0.10 is the most recent version at the time of writing.
- 🔰 Information: At the time of writing, the most recent filename is VirtualBox-7.0.10-158379-Linux_amd64.run. Replace the link accordingly if VirtualBox has been updated.
- 🔰 Information: Once executed, the installer displays some “errors” about systemctl. However, we can safely ignore these. The installer targets distributions using systemd and wants to interact with services, possibly to restart them, but systemctl doesn’t do anything in Nitrux. The installation will not fail because of these errors.
- ⚠️ Important: As noted by the installer, the installation will put the files in the directory /opt; see XFS Features and Root Immutability in Nitrux.
# Download the installer and run it after swithcing from the overlay sudo overlayroot-chroot mount -t devtmpfs dev /dev axel -a https://download.virtualbox.org/virtualbox/7.0.10/VirtualBox-7.0.10-158379-Linux_amd64.run && chmod +x VirtualBox-7.0.10-158379-Linux_amd64.run && ./VirtualBox-7.0.10-158379-Linux_amd64.run && rm -f /VirtualBox-7.0.10-158379-Linux_amd64.run umount /dev sync exit
Once the installation is successful, we need to reboot since we did the installation to the root, and the changes need to be loaded into the overlay.
To start a virtual machine with VirtualBox, we must also build the DKMS drivers. To do this, run the following command.
- 🔰 Information: Please be aware that a bug in VirtualBox caused by a change in the Linux kernel prevents the DKMS drivers from being built; see VirtualBox fails to build kernel modules with dkms #131 for details and a workaround.
sudo /sbin/vboxconfig
VMware Workstation Player/Pro (VMware installer)
Another well-known hypervisor is the Workstation product family developed by VMware. VMware Workstation is a type 2 hypervisor designed for Windows and Linux systems. It allows you to create and manage virtual machines in either Windows or Linux environments. VMware Workstation products are categorized into VMware Workstation Player and VMware Workstation Pro.
To install VMware Workstation Player/Pro in Nitrux, do the following.
- To obtain the link to their respective installer, visit the official VMware Workstation Player or VMware Workstation Pro product page and download the respective installer file.
- 🔰 Information: For convenience, right-click here for the link to VMware Workstation Player or right-click here for the link to VMware Workstation Pro.
- At the time of writing, the filenames for the installers provided by VMware are VMware-Workstation-Full-17.0.2-21581411.x86_64.bundle and VMware-Player-Full-17.0.2-21581411.x86_64.bundle.
- 🔰 Information: For convenience, right-click here for the link to VMware Workstation Player or right-click here for the link to VMware Workstation Pro.
- As with VirtualBox, the installer for VMware Workstation products doesn’t allow the user to select the install location. Thus, we must install it once we switch from the overlay. To do this, run the following commands.
- ⚠️ Important: As noted with the VirtualBox installer, the installation will put the files in the root directory; see XFS Features and Root Immutability in Nitrux.
# Download the installer and run it after switching from the overlay sudo overlayroot-chroot mount -t devtmpfs dev /dev axel -a $PRODUCT_URL && chmod +x $PRODUCT_INSTALLER_NAME && ./$PRODUCT_INSTALLER_NAME && rm -f /$PRODUCT_INSTALLER_NAME # Build kernel modules for VMware vmware-modconfig --console --install-all umount /dev sync exit
GNOME Boxes (Flatpak)
GNOME Boxes is free and open-source software that is very easy to use and makes it simple to create and manage virtual machines by abstracting many options. GNOME Boxes, on the other hand, is targeted towards a typical desktop end-user who wants either a very safe and easy way to try out new operating systems or new (potentially unstable) versions of their favorite operating system(s), or needs to connect to a remote machine (home-office connection being a typical use-case). For this reason, GNOME Boxes does not provide many advanced options to tweak virtual machines virt-manager provides. Instead, GNOME Boxes focuses on getting things working out of the box with very little input from the user.
GNOME Boxes is available as a Flatpak and can be installed from Flathub.
To install GNOME Boxes in Nitrux, do the following.
- As mentioned in the tutorial about Software Management, download Bauh from the NX Software Center and search for GNOME Boxes in Flathub.
AQEMU (Distrobox)
AQEMU is a GUI for virtual machines using QEMU as the backend. Support for the KVM accelerator on Linux is provided. The application has a user-friendly interface and allows users to set many options. Since AQEMU is unavailable as an AppImage or a Flatpak, we can install it using Distrobox.
Let’s assume we use a similar container as the tutorial to use Distrobox. To install AQEMU in Nitrux, do the following.
# Run the command without entering the container distrobox-enter --name debian12-distrobox -- sudo apt -y install aqemu qemu-system-x86
We can export the application using Distrobox to list it in the applications menu. To do this, run the following command.
# Run this command *inside* the container distrobox-export --app aqemu
That’s it; this concludes today’s tutorial.