✉️contact@dadesktop.ca 📞+1 204 979 4447

Creating Virtual Machines within DaDesktop with Virt Manager

Introduction

When planning a course, it's common to set up a virtual server on DaDesktop, and possibly also a couple of client VMs in the same manner—whether using the same operating system or a mix of Windows and Linux.

You can run 'Nested VMs' either with Virt Manager or VirtualBox—optionally paired with Vagrant if you're on Linux—or just VirtualBox if your DaDesktop machine runs Windows 10.

DD Machines Nested Virt

Following thorough testing, our recommendation is to go with Virt Manager. There are a few bugs when using VirtualBox, so for now we advise against using it in this way.

Virt Manager relies on the libvirt library for virtual machine management. Its desktop interface lets you create, delete, and manage multiple VMs. While it's mainly for KVM-based VMs, it also supports other hypervisors like Xen and LXC.

Virt Manager also works really well with Vagrant, simply  :-          

apt install vagrant-libvirt

Keep in mind that there are fewer Vagrant boxes available using libvirt/kvm compared to VirtualBox, but you can easily convert them to work with libvirt, as outlined here :-

https://medium.com/@gamunu/use-vagrant-with-libvirt-unsupported-boxes-12e719d71e8e
 

The interface gives you a summary of all VMs—their status, CPU usage, a live performance graph for running VMs, and resource utilization stats.

If you're new to Virt Manager, it's much like VirtualBox, though there are some key differences we'll cover below.

Here's a solid guide on using virt-manager with Ubuntu Linux - https://www.debugpoint.com/virt-manager/

 

Why Use Virt Manager Instead of VirtualBox?

Advantages
  1. Performance is significantly better. Virt Manager employs VirtIO drivers for storage, networking, and graphics, leading to a noticeable boost. virtio drivers are KVM's paravirtualized device drivers, available for both Linux and Windows guest VMs on KVM hosts. The virtio package covers block (storage) devices, network interface controllers, and graphics. Because VirtIO drivers are open source, they're easy to install if they aren't already included in your Linux distribution.
  2. Greater number of configuration options
  3. Integrates smoothly with Vagrant
  4. Certain components of VirtualBox aren't entirely open source
  5. Virt Manager doesn't require module recompiles with each kernel upgrade, unlike VirtualBox.
  6. VirtualBox can sometimes break when a new kernel update is needed.
Disadvantages
  1. VirtualBox arguably has a slightly shallower learning curve
  2. Configuring 'Host networking' instead of NAT is simpler in VirtualBox, though NAT handles most networking scenarios easily on both platforms.
  3. VirtualBox runs on many platforms, while Virt Manager is Linux-only.


Overall, when running servers inside a DaDesktop machine, we find Virt Manager to be the better choice.

 

Installation

Since libvirt is constantly being improved, always use the most recent non-LTS version of Ubuntu or Debian.

Here are quick notes for installing KVM and virt-manager. That said, please follow an up-to-date guide tailored to your chosen DaDesktop OS. One such guide is https://www.debugpoint.com/virt-manager/

sudo apt install virt-manager
sudo adduser student libvirt
sudo systemctl restart libvirtd

Reboot your DaDesktop machine, then launch Virt Manager from the Applications menu.

 

Configuration

  1. How to import or convert virtual machines? While it's straightforward to create VMs tailored to your desired OS and specs, for more complex configurations you may prefer to import an existing VM setup of a specific server or appliance. These often come as VMDK images, which can be added directly to Virt Manager—though with the current version, it's not always obvious that this works. VirtualBox server images can't be imported directly into Virt Manager, but can be easily exported to other virtualisation formats like the Open Virtualisation Format (.OVF), which Virt Manager handles seamlessly. Alternatively, you could use VMware Converter if you have it, or Virt-V2V (https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v). Qemu-convert is another excellent open-source tool for converting between different VM 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/
  2. Best method for importing large files into standalone environments. A recent addition allows you to easily upload files from your own machine into your DaDesktop machine.

    Otherwise, consider using a cloud storage tool like Google Drive, Microsoft 365, etc. You can then access them by signing into the tool from within the DaDesktop machine.

  3. When importing VMs, especially from other formats, you'll often need to adjust the graphics and/or disk types. One of Virt Manager's standout features is its excellent support for VirtIO drivers. These open-source, fully virtualised drivers deliver significantly better performance than the default disk, network, or graphics drivers, and they're available for nearly all operating systems—with great support for Windows 10 guests. If your guest OS is compatible, VirtIO drivers are typically the best choice for both performance and compatibility with Virt Manager (KVM). https://wiki.archlinux.org/title/Libvirt
  4. Optimal settings for virtual machines in Virt Manager While virtio drivers are generally the best option, you may need another type in certain situations. For networking, NAT is usually sufficient for most use cases, unless you require a more complex setup like bridged host networking—though that can be trickier to configure smoothly. 
    https://wiki.manjaro.org/index.php?title=Virt-manager is a great starter guide here.
    Running Windows requires a few extra steps, including slipstreaming VirtIO drivers so that the Windows 10 ISO can boot.
    For hard disk formats, .raw files offer the best speed unless you need snapshots; in that case, use qcow2, though it's a bit slower.
  5. While Wayland works fine as a display manager in most scenarios, we recommend sticking with X11 for the time being. That said, it could be worth testing Wayland in your specific setup, as distros are steadily improving Wayland support.
  6. You can skip using KSM; while it does work in nested setups and with Virt Manager, it makes negligible difference in practice.
  7. Tech Support is available if you need help converting disk images for Virt Manager or setting up Virt Manager for DaDesktop courses.
  8. Where are disk image files stored in the filesystem? Virt Manager places them in the following directory, though you can configure it to use a different location if you prefer:

    /var/lib/libvirt/images