Creating Virtual Machines within DaDesktop using Virt Manager
Introduction
When preparing course materials, it is often beneficial to virtualise a server within DaDesktop. You might also virtualise one or two client machines using either the same OS or a mix of Windows and Linux.
'Nested VMs' can be managed using either Virt Manager or VirtualBox. If using Linux, Vagrant is an optional addition, while VirtualBox is the alternative for Windows 10-based DaDesktop machines.

After thorough testing, we recommend Virt Manager as the preferred tool. We advise against using VirtualBox in this context due to a few identified bugs.
The VirtManager application leverages the libvirt library to deliver virtual machine management services. It features a desktop interface that simplifies the creation, deletion, and administration of multiple virtual machines. While it is primarily used for KVM VMs, it also supports other hypervisors such as Xen and LXC.
Virt Manager also integrates seamlessly with Vagrant by simply running :-
apt install vagrant-libvirt
It is worth noting that while there are fewer Vagrant boxes available for libvirt/kvm compared to VirtualBox, these can be easily converted to work with libvirt as demonstrated here :-
https://medium.com/@gamunu/use-vagrant-with-libvirt-unsupported-boxes-12e719d71e8e
The user interface offers a summary view of all VMs, displaying their status, CPU usage, live performance graphs for running VMs, and resource utilization statistics.
If you are new to Virt Manager, note that it is quite similar to VirtualBox but includes several key differences outlined below.
A comprehensive guide on using virt-manager on Ubuntu Linux can be found here - https://www.debugpoint.com/virt-manager/
Why should I use Virt Manager instead of Virtualbox?
Advantages
- Performance is significantly better. Virt Manager utilizes VirtIO drivers for storage, networking, and graphics, which greatly enhances performance. Virtio drivers are KVM's paravirtualized device drivers, available for Linux and Windows guest virtual machines running on KVM hosts. The virtio package supports block (storage) devices, network interface controllers, and graphics. Since VirtIO drivers are open source, they can be easily installed if not pre-installed on your Linux distribution.
- Greater configurability options are available
- Excellent compatibility with Vagrant
- Parts of VirtualBox are not fully open source
- Virt Manager does not require module recompilation after new kernel upgrades, unlike VirtualBox.
- VirtualBox is known to break when new kernel upgrades are required.
Disadvantages
- VirtualBox is often considered to have a slightly shorter learning curve
- Setting up 'Host networking' rather than NAT is slightly easier on VirtualBox, though NAT works adequately for most networking use cases on both systems.
- VirtualBox is available on many platforms, whereas Virt Manager is only available on Linux
Overall, we find that Virt Manager is the preferred choice for running servers within a DaDesktop machine.
Installation
Since libvirt is constantly improving, it is recommended to always use the latest non-LTS Ubuntu or Debian version.
Installation of kvm and virt-manager follows. These are brief install notes, but please consult an up-to-date guide for your preferred DaDesktop OS. One such guide is available at https://www.debugpoint.com/virt-manager/
sudo apt install virt-manager
sudo adduser student libvirt sudo systemctl restart libvirtd
Reboot the DaDesktop machine, then run Virt Manager from the Applications menu
Configuration
- How do I import or convert virtual machines ? While creating VMs tailored to your specific operating system and hardware requirements is straightforward, complex setups often benefit from importing an existing VM configuration for a particular server or appliance. These are frequently supplied as VMDK images. Although it is not entirely clear if direct addition to Virt Manager is possible with the current version, Virtual Box server images cannot be imported directly. However, they can be easily exported into other virtualisation formats, such as the open Virtualisation Format (.OVF), which Virt Manager imports easily. Alternatively, you could use VmWare Convertor if available, or Virt-V2V instead https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v. Qemu-convert is also a powerful open-source tool that facilitates easy conversion between different virtual machine formats.
To Convert from VirtualBox to Virt Manager KVM format follow these instructions https://ostechnix.com/how-to-migrate-virtualbox-vms-into-kvm-vms-in-linux/ -
Best way to import large files inside standalone. Recently, a method to easily upload files from your machine to within your DaDesktop machine has been added.
Alternatively, consider using a Cloud files tool such as Google Drive or Microsoft 365. These can be accessed by logging into the service inside the DaDesktop machine.
- When importing other virtual machines, especially from other formats, you will often need to change graphics and/or disk types. One major advantage of Virt Manager is its robust support for VirtIO drivers. These are open-source, fully virtualised drivers that offer superior performance compared to standard disk, network, or graphic drivers. They are available for nearly all operating systems, including excellent support for guest Windows 10 machines. If your Guest OS supports them, these are usually the preferred option for compatibility and performance when using Virt Manager (KVM). https://wiki.archlinux.org/title/Libvirt
- Optimal settings for virtual machines using Virt Manager VirtIO drivers are included in almost all modern open-source server operating systems and can be easily installed in Windows. Generally, virtio is the best choice for drivers, though other types may be necessary in specific cases. For networking, NAT is sufficient for most scenarios unless a more complex setup requires Bridged Host networking, which is generally more difficult to configure.
https://wiki.manjaro.org/index.php?title=Virt-manager is an excellent starter guide.
Running Windows requires additional steps, including the slipstreaming of VirtIO drivers to allow the Windows 10 iso to boot.
When choosing the hard disk format, .raw files are best for speed unless snapshots are required; in that case, use qcow2 format, although it is slightly slower. - Although Wayland works well for most cases as a display manager, we advise continuing to use X11 for now. That said, it may be worth testing Wayland in your specific setup, as distros are continuously improving their support for it.
- Do not bother using ksm, as although it works in nested environments and within Virt Manager, it makes little practical difference.
- Tech Support is available if required for converting disk images to work with Virt Manager, as well as for setting up Virt Manager for DaDesktop courses.
-
Where are disk image files located within the filesystem? Virt Manager uses the following location to store image files by default, though this is configurable and other locations can be used if preferred.
/var/lib/libvirt/images