How to Create Virtual Machines in DaDesktop with Virt Manager
Introduction
When putting together a course, having the ability to virtualise a server inside DaDesktop is often very handy – and you might want to spin up one or two client machines in the same way, whether they share the same OS or use a mix of Windows and Linux.
'Nested VMs' can be run through Virt Manager, or via VirtualBox (optionally paired with Vagrant on Linux), or just VirtualBox if your DaDesktop machine is running Windows 10.
After plenty of testing, we prefer going with Virt Manager here in Poland, since VirtualBox introduces a few bugs; that’s why we currently advise against using it in this way.
The VirtManager application relies on the libvirt library to deliver virtual machine management. Its desktop interface allows you to create, remove, and oversee multiple virtual machines. While it is mainly aimed at KVM VMs, it also supports other hypervisors like Xen and LXC.
Virt Manager also pairs nicely with Vagrant, just run:
apt install vagrant-libvirt
Keep in mind that the libvirt/kvm ecosystem offers fewer Vagrant boxes compared to VirtualBox, but you can easily convert them to work with libvirt as demonstrated here:-
https://medium.com/@gamunu/use-vagrant-with-libvirt-unsupported-boxes-12e719d71e8e
The interface shows a summary of all VMs, their statuses, CPU usage, a live performance graph of running instances, and resource utilisation data.
If you’re new to Virt Manager, it feels quite similar to VirtualBox, though there are a few key differences outlined below.
Here’s a solid guide on using virt-manager on Ubuntu Linux – https://www.debugpoint.com/virt-manager/
Why should I choose Virt Manager over Virtualbox?
Advantages
- Significantly better performance – Virt Manager leverages VirtIO drivers for storage, networking and graphics, giving a clear speed boost. Virtio drivers are KVM’s paravirtualised device drivers, working with both Linux and Windows guests on KVM hosts. The virtio package covers block storage, network interface controllers, and graphics. Because VirtIO drivers are open source, they’re simple to install if your Linux distribution hasn’t already included them.
- More configuration choices at your disposal
- Integrates smoothly with Vagrant
- Certain components of VirtualBox aren’t fully open source
- Unlike VirtualBox, Virt Manager doesn’t demand a module recompile with every new kernel update.
- VirtualBox sometimes breaks after a kernel upgrade is required.
Disadvantages
- VirtualBox arguably has a slightly gentler learning curve
- Configuring 'Host networking' instead of NAT is simpler on VirtualBox, though NAT covers most networking needs on both platforms without much hassle.
- VirtualBox runs on many platforms, whereas Virt Manager is Linux-only
All things considered, for running servers inside a DaDesktop machine we find that Virt Manager is the better pick.
Installation
Since libvirt constantly improves, always opt for the latest non‑LTS Ubuntu or Debian release.
Installing kvm and virt-manager is straightforward, but be sure to follow an up‑to‑date guide for your chosen DaDesktop OS. One helpful walkthrough is this one: https://www.debugpoint.com/virt-manager/
sudo apt install virt-manager
sudo adduser student libvirt sudo systemctl restart libvirtd
Reboot the DaDesktop machine, then launch Virt Manager from the Applications menu.
Configuration
-
How do I import or convert virtual machines? While you can easily build a VM to match your exact OS and specification, more complex setups often benefit from importing an existing VM for a particular server or appliance. These typically arrive as VMDK images which can be added directly to Virt Manager (though the current version doesn’t make that obvious). VirtualBox server images can’t be added directly, but you can readily export them to other virtualisation formats such as Open Virtualisation Format (.OVF), which Virt Manager imports without issue. Alternatively, if you have access to VmWare Convertor, or you could use Virt-V2V instead (https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v). Qemu-convert is another excellent open‑source tool for painless conversion between virtual machine formats.
To convert from VirtualBox to Virt Manager KVM format use these instructions: https://ostechnix.com/how-to-migrate-virtualbox-vms-into-kvm-vms-in-linux/ -
Best way to import large files inside a standalone setup. A method has recently been added to easily upload files from your machine directly into your DaDesktop environment.
Otherwise, think about using a cloud storage tool like Google Drive, Microsoft 365, and so on. You can then access them by signing into the tool from inside the DaDesktop machine.
- When bringing in virtual machines from other formats, you’ll often need to adjust graphics and/or disk types. A standout strength of Virt Manager is its deep support for VirtIO drivers. These are fully virtualised, open‑source drivers that drastically outperform the original disk, network, or graphics drivers, and they’re available for nearly all operating systems, including excellent guest Windows 10 support. If your guest OS works with them, VirtIO usually becomes the top choice for compatibility and performance under Virt Manager (KVM). https://wiki.archlinux.org/title/Libvirt
-
Optimal settings for virtual machines under Virt Manager These days, VirtIO drivers are already included in virtually every open‑source server OS, and can be installed effortlessly on Windows. As a rule, virtio drivers deliver the best results, though other types may suit certain scenarios. For networking, NAT is generally enough unless you need a more advanced setup like Bridged Host networking, which can be trickier to get right.
https://wiki.manjaro.org/index.php?title=Virt-manager serves as a great starting point.
Running Windows involves a few extra steps, and you’ll need to slipstream VirtIO drivers so the Windows 10 ISO can boot.
When picking a hard disk format, .raw files give the best speed unless snapshots are needed – in that case choose qcow2, though it is slightly slower. - Although Wayland works well as a display manager in most situations, we still recommend sticking with X11 for now. That said, it’s worth experimenting with Wayland in your particular environment; distros are steadily improving Wayland support.
- There’s no need to use ksm – even though it functions nested and inside Virt Manager, it makes hardly any practical difference.
- Tech Support is available when you need help converting disk images for Virt Manager or setting up Virt Manager for DaDesktop courses.
-
Where are the disk image files stored on the filesystem? Virt Manager places them here by default, though the location is configurable and you can choose any preferred path.
/var/lib/libvirt/images