Virtual machines with the Virt Manager

2023-04-20 04:07:49

Do20. April 2023, Fabian Schaar

Whether for testing, for increased security or for development purposes: many GNU/Linux users virtualize computers on their host system. Applications such as Oracle’s “VirtualBox” or “VMWare” are very popular. But the GNU/Linux world offers another, but unfortunately less well-known program for creating fast virtual machines: In this article I would like to introduce the Virt Manager.

Unfortunately, newcomers who have never worked with virtualization can quickly be overwhelmed by the top dogs in the software landscape: applications like VirtualBox offer many setting options and functions, but whether they are always needed is a completely different question. In contrast, the Virt Manager is much simpler: the application uses sensible default settings that make life a bit easier for beginners. Advanced users can still access a large number of program functions – or simply sit back and virtualize.

Similar to the GNOME application “Boxes”, the Virt Manager uses the Libvirt library and the associated Libvirt daemon in the background. In connection with QEMU and KVM, a very fast and efficient virtualization can be implemented, which is rumored to be even faster than VirtualBox. Unlike boxes, however, the Virt Manager does not hide any functions from users, but it does not bother you if you just want to get started.

initial setup

The initial setup of the program is relatively easy. Unlike VirtualBox, for example, the virt manager is included in many standard repositories, including Debian GNU/Linux. A shell command is sufficient for the actual installation:

sudo apt install virt-manager

The “virt-manager” package provides apt with all the necessary dependencies and directly installs the important “libvirt0” library, for example. Once the packages have been installed, two more setup steps are recommended. First, your own user should be in the group “libvirt” to be added. This saves you having to enter a password when opening the program:

sudo usermod -aG libvirt NUTZER

The Libvirt daemon must be running in order to be able to use the Virt Manager. This can be activated via a graphical menu and then called up every time the system is started. When starting the Virt Manager, you should go to the “QEMU/KVM” list item. Double-clicking opens a configuration window in which settings for the virtual connection can be adjusted.

In the “Virtual Network” tab, tick the “Autostart” sub-item and click “Apply” to save the changes.

After a reboot the libvirt daemon should be running and the virt manager is ready to use.

Create virtual machines

After the initial setup, new virtual machines can be created very easily with the current configuration. All you have to do is click on the corresponding symbol at the top left. Alternatively, the File menu can be used. The Virt Manager then opens a simple configuration wizard that asks a few questions regarding the new virtual machine.

First, a source for the operating system to be virtualized must be specified. The sensible standard here is the installation from a local installation medium, for example from an ISO file:

In the next step, the storage location of the image is queried. An operating system must also be selected. By default, Virt Manager attempts to answer this question itself. Alternatively, you can, for example, select a generic operating system from the list:

The RAM and the number of CPU cores for the virtual machine can then be specified:

In the penultimate step, the hard disk space is then allocated. As far as I know, an entered value only indicates a maximum storage capacity. The virtual machines therefore only occupy as much disk space as they do really require:

Finally, the virtual machine is named and can be used by clicking on “Done”:

The last window of the setup wizard also allows a specific configuration of the network. In addition, the configuration can be edited before the virtual machine is started, provided the appropriate check mark is set here. A settings window for professionals will then open:

This shows the potential of Virt-Manager. GNOME Box users might never see such a wealth of settings. For simple use, however, fine-tuning is usually not necessary.

Manage and use virtual machines

I admit: The initial setup process may seem a bit complicated at first. As soon as this is completed, however, the program can largely be used “just to yourself” and no longer causes problems in everyday life.

The actual use of the virtual machines is very simple. If you follow the instructions described here, the created machine will start automatically and appear in a separate window. Here users then have the opportunity to use well-known functions of virtualization.

Virtual hard drives can be cloned, for example, or saved in snapshots. To do this, simply switch to the corresponding configuration dialog in the “View” menu in Virt Manager. Furthermore, users also have the option of forwarding USB sticks or sending keys to the virtual machine. Of course, this can also be used “just like that”. Then the Virt Manager resembles real hardware in many respects.

Practically, extensions, such as those known from VirtualBox, do not have to be installed. The resolution is not always correct at first, but it is not always correct either. However, this can be adjusted in the well-known setting programs.

Conclusion

In my opinion, Virt Manager offers an interesting and fast alternative to VirtualBox or GNOME Boxes. This can be used equally well by beginners and advanced users. After the initial setup, operation is largely intuitive – a little training time will certainly help here.

The wide availability of the free application and the many useful functions and presets make the Virt-Manager a virtualization software that certainly doesn’t have to hide behind the commercial competition. I can only recommend everyone who likes to play, test or develop with virtual machines to give the Virt-Manager at least a chance on the desktop.

1681968805
#Virtual #machines #Virt #Manager

Leave a Replay