Using Virt Manager to Spin Up VMs Inside DaDesktop
Introduction
Often when preparing a course in Romania, it's useful to virtualize a server within DaDesktop, and perhaps a couple of client machines as well, using either identical OS setups or a mix of Windows and Linux.
You can run Nested VMs through Virt Manager, or VirtualBox alongside Vagrant (on Linux), or simply VirtualBox if your DaDesktop machine runs Windows 10.
Our extensive testing points toward Virt Manager as the better choice, since VirtualBox has a few bugs; as a result, we don't recommend using VirtualBox for this purpose right now.
The VirtManager tool leverages the libvirt library for managing virtual machines. Its desktop interface lets you create, delete, and oversee multiple VMs. While it's mainly designed for KVM VMs, it can handle other hypervisors like Xen and LXC.
Virt Manager pairs nicely with Vagrant—just run:
apt install vagrant-libvirt
Keep in mind that there are fewer Vagrant boxes for libvirt/kvm than for VirtualBox, but they can be readily converted as demonstrated here:
https://medium.com/@gamunu/use-vagrant-with-libvirt-unsupported-boxes-12e719d71e8e
The interface offers a snapshot of all your VMs, their statuses, CPU usage, live performance charts for running VMs, and resource utilization stats.
If you're new to Virt Manager, it's much like VirtualBox but with a handful of key distinctions explained below.
This reference is a helpful walkthrough for virt-manager on Ubuntu Linux – https://www.debugpoint.com/virt-manager/
Why Choose Virt Manager Over VirtualBox?
Advantages
- Significantly better performance — Virt Manager employs VirtIO drivers for storage, networking, and graphics, delivering far superior speed. These drivers are KVM's paravirtualized device drivers, available for both Linux and Windows guest VMs running on KVM hosts. The virtio package covers block (storage) devices, network interface controllers, and graphics. Since VirtIO drivers are open source, they're easy to install if your Linux distro doesn't already include them.
- More configuration options at your fingertips.
- It integrates smoothly with Vagrant.
- Unlike VirtualBox, Virt Manager is completely open source—no proprietary bits.
- No need to recompile kernel modules after each kernel upgrade, as is often required with VirtualBox.
- VirtualBox occasionally breaks after a kernel upgrade.
Disadvantages
- VirtualBox arguably has a gentler learning curve.
- Configuring host networking (as opposed to NAT) is simpler with VirtualBox, though NAT handles most networking scenarios just fine on both platforms.
- VirtualBox runs on many operating systems, while Virt Manager is Linux-only.
Overall, for running servers inside a DaDesktop environment, Virt Manager comes out on top.
Installation
Since libvirt is constantly evolving, stick with the latest non-LTS version of Ubuntu or Debian.
Below are a few quick installation steps, but make sure you follow a current guide for your chosen DaDesktop OS. One such resource: https://www.debugpoint.com/virt-manager/
sudo apt install virt-manager
sudo adduser student libvirt sudo systemctl restart libvirtd
Afterwards, reboot your DaDesktop machine and launch Virt Manager from the Applications menu.
Configuration
-
Importing or converting VMs — Although you can quickly spin up VMs to your exact OS and spec needs, more complex setups often benefit from importing an existing VM of a particular server or appliance. These frequently come as VMDK images, which can be added to Virt Manager directly (though the process isn't always obvious in the current version). VirtualBox server images can't be imported straight into Virt Manager, but you can export them to other formats like Open Virtualization Format (.OVF), which Virt Manager imports with ease. Alternatively, you could leverage VMware Converter if you have it, or use Virt-V2V instead: https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v. Qemu-convert is also an excellent open-source tool for converting between VM formats.
Converting from VirtualBox to Virt Manager KVM format — follow these steps: https://ostechnix.com/how-to-migrate-virtualbox-vms-into-kvm-vms-in-linux/ -
Bringing large files into standalone setups. A new method for uploading files from your local machine into your DaDesktop instance has recently become available.
Alternatively, you can use cloud storage services like Google Drive or Microsoft 365—just log in to them from within the DaDesktop environment.
- When importing VMs from other formats, graphics and disk type adjustments are often needed. One of Virt Manager’s biggest strengths is its superb VirtIO driver support. These fully virtualized, open-source drivers deliver far better performance than the original disk, network, or graphics drivers and are available for almost every OS, including great support for Windows 10 guests. If your guest OS supports VirtIO, it’s generally the go-to choice for compatibility and speed under KVM. See https://wiki.archlinux.org/title/Libvirt.
-
Optimal Virt Manager VM settings VirtIO drivers come built into most open-source server OSes these days and can be installed without fuss on Windows. For the best performance, stick with VirtIO whenever possible, though other driver types might suit specific needs. NAT networking covers the majority of use cases; only opt for Bridged Host networking when a more complex setup demands it, bearing in mind it can be trickier to configure.
A great beginner’s guide lives here: https://wiki.manjaro.org/index.php?title=Virt-manager.
Windows guests need a few extra steps, including slipstreaming VirtIO drivers to get the Windows 10 ISO to boot.
For hard disk format, raw (.raw) files offer the best speed unless you need snapshots—then use qcow2, though it’s a bit slower. - Wayland functions well as a display manager in many scenarios, but for now we recommend sticking with X11. Still, feel free to experiment with Wayland in your specific setup—distributions are rapidly improving their Wayland support.
- Skip KSM; even though it works in nested setups and Virt Manager, it offers negligible real-world benefit.
- Tech Support is available if you need help converting disk images for Virt Manager or setting things up for DaDesktop courses.
-
Where does Virt Manager store disk images? By default, they go to the following directory (which you can change):
/var/lib/libvirt/images
