Setting Up Virtual Machines in DaDesktop Using Virt Manager

Introduction

When putting together a course, it often helps to run a virtual server inside DaDesktop in Italy. You might also spin up a couple of client machines in the same fashion, whether using the same OS or a blend of Windows and Linux.

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

DD Machines Nested Virt

After thorough testing, we recommend going with Virt Manager because VirtualBox has a few bugs in this setup. So for now, we advise against using VirtualBox this way.

VirtManager relies on the libvirt library to manage virtual machines. Its graphical desktop interface lets you easily create, remove, and oversee multiple VMs. While it's mainly used with KVM, it also works with other hypervisors like Xen and LXC.

Virt Manager integrates seamlessly with Vagrant,—just issue the following command:

apt install vagrant-libvirt

Keep in mind that there are fewer Vagrant boxes for libvirt/kvm compared to VirtualBox, but you can easily convert them to function with libvirt, as demonstrated here:

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

The UI gives you a quick overview of all your VMs—their status, CPU usage, a real-time performance graph for running machines, and resource utilization stats.

If you're new to Virt Manager, it feels a lot like VirtualBox but with a handful of key distinctions, which we'll cover next.

For a solid walkthrough on using virt-manager with Ubuntu Linux, check out this guide: https://www.debugpoint.com/virt-manager/

 

What makes Virt Manager a better choice than VirtualBox?

Upsides
  1. Performance is noticeably superior—Virt Manager employs VirtIO drivers for storage, networking, and graphics, which deliver much faster speeds. Virtio drivers are KVM's paravirtualized device drivers, ready for both Linux and Windows guest VMs on KVM hosts. The virtio package covers block (storage) devices, network interface controllers, and graphics. Since VirtIO drivers are open source, they're simple to install if your Linux distribution doesn't include them by default.
  2. It offers more configuration possibilities.
  3. It pairs nicely with Vagrant.
  4. Certain components of VirtualBox aren't entirely open source.
  5. Virt Manager doesn't require kernel module recompilation after each kernel update, unlike VirtualBox.
  6. VirtualBox sometimes breaks after a kernel upgrade.
Downsides
  1. VirtualBox might have a slightly gentler learning curve.
  2. Configuring host networking (instead of NAT) is easier with VirtualBox, although NAT handles most networking scenarios smoothly on both platforms.
  3. VirtualBox runs on many platforms, whereas Virt Manager is Linux-only.


Taking everything into account, when you need to run servers inside a DaDesktop machine in Italy, Virt Manager is our top pick.

 

Getting It Installed

Since libvirt is constantly being improved, stick with the latest non-LTS Ubuntu or Debian release.

To install KVM and virt-manager, here are some quick instructions, but we suggest you follow an up-to-date guide tailored to your chosen DaDesktop OS in Italy. One reference is https://www.debugpoint.com/virt-manager/

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

After rebooting your DaDesktop machine, launch Virt Manager from the Applications menu.

 

Configuration

  1. How do I import or convert virtual machines ? While you can effortlessly spin up VMs tailored to your desired OS and specs, for more complex setups it's often easier to import an existing VM configuration—such as a specific server or appliance. These usually come as VMDK images, which can be added directly to Virt Manager, though the current version's support for this isn't entirely clear. VirtualBox server images cannot be imported directly, but you can easily export them to other virtualization formats like Open Virtualization Format (.OVF), which Virt Manager handles without a hitch. Alternatively, you could use VmWare Converter if you have access to it, or the Virt-V2V tool (https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v). Qemu-convert is another excellent open source option for converting between 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/
  2. Best way to import large files inside standalone. Recently, a feature has been introduced that lets you easily upload files from your local machine into your DaDesktop environment.

    Otherwise, you can turn to a cloud storage solution like Google Drive, Microsoft 365, or similar. Simply log in to that service from within the DaDesktop machine to access your files.

  3. When importing other virtual machines especially from other formats, often you will need to change graphics and / or disk types. One standout feature of Virt Manager is its excellent support for VirtIO drivers. These fully virtualized, open source drivers deliver significantly better performance than standard disk, network, or graphics drivers, and they're available for nearly all operating systems—including strong support for Windows 10 guests. If your guest OS can use them, VirtIO drivers are generally the go-to choice for compatibility and speed when working with Virt Manager (KVM). For more details, see https://wiki.archlinux.org/title/Libvirt.
  4. Optimal settings for virtual machines using Virt Manager VirtIO drivers now ship with nearly all open source server OSes, and you can install them on Windows without much hassle. In most situations, the virtio drivers are the best pick, though occasionally you might need to rely on other types. For networking, NAT does the job in the vast majority of cases. If you need a more advanced configuration—like Bridged Host networking—it's doable, but tends to be trickier to set up smoothly. 
    The https://wiki.manjaro.org/index.php?title=Virt-manager page serves as a handy starter guide.
    Running Windows involves a few extra steps, including slipstreaming the VirtIO drivers so the Windows 10 ISO can boot.
    As for hard disk format, .raw files offer the best speed unless you require snapshots, in which case qcow2 format is the way to go—just be aware it's a touch slower.
  5. Even though Wayland generally works fine as a display manager, we recommend sticking with X11 for the time being. Still, it's worth experimenting with Wayland in your specific environment—distributions are constantly improving their Wayland support.
  6. You can skip KSM—while it does function in nested setups and Virt Manager, it hardly makes any practical difference.
  7. Tech Support is on hand if you need help converting disk images for Virt Manager or configuring Virt Manager for DaDesktop courses.
  8. Wondering where disk image files end up on the filesystem? By default, Virt Manager stores them at:

    /var/lib/libvirt/images