Virtual Machine Manager with QEMU/KVM on openSUSE Tumbleweed

One of the beauties of a rolling distribution is that sometimes you are forced to use a new piece of software… My regular Virtual Machine application, VirtualBox was non-functional for a few days due to a kernel update and some sort of mismatch with the kernel driver or something… The positive is, I got to know a new Virtual Machine Application, Libvirt with QEMU/KVM. Quite honestly, I am not even sure what to call the application stack. The application is virt-manager which is libvirt and the application title bar is Virtual Machine Manager so maybe it goes by them all or I can’t make heads or tails out of the name.

Installation

I found I had to install a few things to make this work.

sudo zypper install libvirt qemu virt-manager libvirt-daemon-driver-qemu

Setup

Set up my first virtual machine. After doing a little reading and digging to figure out what was the best solution for me in my use case, which is, on a desktop testing other distributions or software in a virtual machine. This is how I set it up.

Initially, you have to Add a connection. Depending on how your system is out of the gate, or if you canceled this operation. Here is how you get back to it.

File > Add Connection…

Virt-Manager-01-Add Connection

For my purposes, I am using the QEMU/KVM user session as the Hypervisor. I also selected the Autoconnect tick box to ensure that when I started Virt-Manager, it would make this connection.

Next step is to create a new virtual machine. Since I am installing from an ISO, I selected the first option. If you are running a 32 bit version of Linux, you can select that architecture instead. Although I have not played with this as much, my understanding is you can use other CPU architectures here as well.

Virt-Manager-02-New VM

Unless you have already selected the media, it is at this point you can Browse to select the ISO you have downloaded.

Virt-Manager-03-New VM

Select the Brows Local button at the bottom of this window to search your file system for the ISO of choice.

Virt-Manager-04-ISO

The application will generally automatically detect the distribution, if it is not detecting it you can manually search or find a “similar” upstream project.

Virt-Manager-05-ISO

Next step is to set the memory and CPU. I elected to use two CPU cores.

Virt-Manager-06-Memory and CPU

The next step is to either select or create a disk image. In this case, I am using the default Create a disk image for the virtual machine of 32 GiB. It should be noted. Unlike VirtualBox, these disk images are static allocations for the size you set. They do not dynamically size based on the amount of used space on the virtual disk.

Virt-Manager-07-Storage Volume

The final step you are ready to begin the installation. Modify the name, customize the configuration and change the network selection if you see fit. I just use the Usermode networking. For my purposes this works fine.

Virt-Manager-08-Summary

Upon selecting finish, a new window will open and the ISO you selected should boot up. Since openSUSE booted just fine, any good operating system will work similarly.

Virt-Manager-08-GRUB Boot

Configuration

When you open but not begin running a Virtual Machine you have the ability to make modifications to the Virtual Machine Hardware. As compared to VirtualBox, it feels like you have a lot more control and also a lot more ways to have the VM misconfigured and not behave as you would like. Your mileage my vary.

 

Should you want to make changes to the number of CPUs, Memory or any of the graphics and network settings can be adjusted to suit your needs. I did not alter much of anything here. In order to make the video adjust as I would like in Plasma, I set the Display Spice type to Spice server and Video model should be set to QXL.

 

This will allow me to take full advantage of whatever screen real estate I have available.

Virt-Manager-16-Adjusting Plasma for monitor.png

This is also the part of the post you can point and laugh at my old, non-high-DPI screens to which I will respond, “my old hardware still works, thank you very much.”

What I Like

Qemu with Libvirt just feels much faster than Virtualbox. It has a kind of raw, running on “bare metal” feel as opposed to that slightly sluggish virtualized feel to which I am more accustomed. I do appreciate this performance enhancement. I do have to preface that this is not the experience I get from all desktop environments but Plasma does run quite well.

The interface, although initially a bit overwhelming, is pretty great. I am not going to go into detail on all the features as most of the time, the defaults work well for my use cases.

I don’t have any issues with any updates that roll down breaking this utility. I am not completely sure of the technical reasons as to why but it seems as though this project is less affected by updates to the Linux Kernel.

What I Don’t Like

Virtual Manager is a GTK application so it is not as nice looking as the Virtualbox Qt, although at the time of writing this, I see there is a project on Github called qt-virt-manager.

There isn’t an option to have a dynamically resizing disk so I have to be more careful with the number of disk images I keep on my primary drive in my /home directory. Thankfully a little bit of symbolic linking to a 3rd, removable, drive and all the qcow2 files are available. It is a bit of extra work but worth it for the reliability and increased performance Virtual Machine Manger provides.

The name of this application stack is a bit confusing. I don’t really know what to call it. I learned of it as Libvirt, libvirt is the name of the directory that houses my virtual machine drives (~/.local/share/libvirt). Just knowing Libvirt didn’t answer how to get it going as it wasn’t called that in the repositories so a bit of searching and reading documentation I was able to get it all together in my head and take some notes. So, I think the confusing name and the barrier to entry did make it a bit challenging but I appreciated the journey to get me to this point.

Final Thoughts

Virtual Machine Manager is a great, reliable tool that appears unaffected by changes of the affects of a rolling distribution. It is, in some ways, a bit more difficult to set up, but once you understand that the “Add Connection” portion and set up the QEMU/KVM user session, the simplest Hypervisor. You are good to go. There is so much more you can do with Libvirt and it’s components. I am only barely scratching the surface of its capabilities.

Although the disk allocation is not as convenient in Virtual Machine Manager, it is easy enough to manage using additional storage and it also keeps me from allowing too many unused machines from littering my computer.

Ultimately, this won’t keep me from using Virtualbox but it does give me another tool to play around with and try stuff out. I am very appreciative of everyone involved in making this tool reliable and easily used for the average Linux user. I am especially grateful that this application stack is more tolerant to the rolling release model that is Tumbleweed.

Reference

Virt-Manager on openSUSE Software

Qt Virt-Manager on Github

KVM/QEMU hypervisor driver

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s