✉️contact@dadesktop.es 📞+34 911 43 64 28

Setting Up Virtual Machines within DaDesktop Using Virt Manager

Overview

When you're putting together a course, it's really handy to run a virtual server inside DaDesktop, and maybe spin up a couple of client machines as well—either using the same OS or mixing Windows and Linux.

You can work with 'Nested VMs' using Virt Manager or VirtualBox—optionally with Vagrant on Linux—or VirtualBox alone if your DaDesktop machine runs Windows 10.

DD Machines Nested Virt

After plenty of testing, we recommend sticking with Virt Manager, as VirtualBox has a couple of bugs in this scenario. For now, we don't advise using VirtualBox that way.

Virt Manager relies on the libvirt library for VM management and gives you a desktop interface to create, delete, and oversee multiple virtual machines. It's primarily built for KVM VMs, but it also supports other hypervisors like Xen and LXC.

Virt Manager also works beautifully with Vagrant, simply  :-          

apt install vagrant-libvirt

Keep in mind that there are fewer Vagrant boxes out there for libvirt/kvm compared to VirtualBox, but you can easily convert them to work with libvirt—here's how:

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

The interface presents a summary of all VMs, their status, CPU usage, live performance graphs for running machines, and resource utilisation stats.

If you're new to Virt Manager, it feels a lot like VirtualBox but with a few important differences, as we'll go into next.

For a solid guide on using virt-manager on Ubuntu Linux, see: https://www.debugpoint.com/virt-manager/

 

Why Choose Virt Manager Instead of VirtualBox?

Advantages
  1. Performance is much better—Virt Manager uses VirtIO drivers for storage, networking, and graphics, giving you far snappier VMs. Virtio drivers are KVM's paravirtualized device drivers designed for both Linux and Windows guests on KVM hosts. The virtio package handles block devices, network interfaces, and graphics. Since they're open source, they're easy to install if your Linux distribution doesn't ship with them.
  2. More configuration options at your disposal
  3. Plays nicely with Vagrant
  4. Some parts of VirtualBox aren't fully open source
  5. Unlike VirtualBox, Virt Manager doesn't need module recompilation after each kernel upgrade.
  6. VirtualBox sometimes breaks after a kernel upgrade.
Disadvantages
  1. VirtualBox probably has a slightly gentler learning curve
  2. Setting up 'Host networking' rather than NAT is simpler in VirtualBox, though NAT handles most networking needs quite easily on both platforms.
  3. VirtualBox runs on many platforms, whereas Virt Manager is Linux-only


All in all, for running servers inside a DaDesktop machine, we prefer Virt Manager.

 

Installation

Since libvirt keeps improving, always go with the latest non‑LTS Ubuntu or Debian release.

Installing KVM and virt-manager is quick—here's a brief summary, but you'll want to follow an up‑to‑date guide for your chosen DaDesktop OS. One handy guide is https://www.debugpoint.com/virt-manager/

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

Then reboot your DaDesktop machine and launch Virt Manager from the Applications menu.

 

Configuration

  1. How do I import or convert virtual machines ? Creating VMs from scratch to your exact specs is straightforward, but for more complicated setups you'll often want to import an existing VM, like a server or appliance. These are frequently supplied as VMDK images, which you can add directly to Virt Manager—though the current version doesn't make it obvious that this works. VirtualBox server images can't be imported straight into Virt Manager, but you can easily export them to open formats such as OVF, which Virt Manager imports without a hitch. Alternatively, you could use VMware Converter if you have it, or virt‑v2v instead: https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v. Qemu-convert is another great open‑source tool that makes converting between VM formats simple.
    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. We've recently added an easy way to upload files from your local machine into your DaDesktop environment.

    Otherwise, cloud storage services like Google Drive or Microsoft 365 come in handy—just log in to them inside the DaDesktop machine.

  3. When importing other virtual machines especially from other formats, often you will need to change graphics and / or disk types. One of Virt Manager's stand-out features is its top-notch support for VirtIO drivers. These open‑source, fully virtualised drivers offer far better performance than the original disk, network, or graphics drivers, and they're available for almost every operating system—including excellent support for Windows 10 guests. If your guest OS supports them, VirtIO drivers are usually the best pick for compatibility and speed when using Virt Manager (KVM). See https://wiki.archlinux.org/title/Libvirt
  4. Optimal settings for virtual machines using Virt Manager VirtIO drivers are included out of the box in almost all modern open‑source server OSes and can be installed easily in Windows. In general, virtio is the go‑to driver, but occasionally you might need one of the other types. NAT is usually plenty for most networking scenarios unless you need a more complex arrangement like bridged host networking—though that tends to be trickier to set up reliably. 
    For a great starter guide, head to: https://wiki.manjaro.org/index.php?title=Virt-manager
    Running Windows takes a few extra steps, including slipstreaming VirtIO drivers so the Windows 10 ISO can boot.
    For disk format, raw files offer the best speed unless you require snapshots; if you do, go with qcow2, but expect a slight performance hit.
  5. Even though Wayland works well as a display manager in most cases, we recommend sticking with X11 for now. That said, it's worth experimenting with Wayland on your own setup—distributions are steadily improving Wayland support.
  6. There's no need to bother with KSM—it works in nested setups and inside Virt Manager, but it hardly makes a practical difference.
  7. Tech Support is on hand if you need help converting disk images for Virt Manager or setting it up for your DaDesktop courses.
  8. Where do disk image files live on the filesystem? By default, Virt Manager stores them here, but you can change the location if you prefer:

    /var/lib/libvirt/images