Introduction
In the world of managing Linux servers and desks, virtualization has become an essential tool for testing systems, isolating applications and optimizing resources. Virt-Manager is a graphic interface that simplifies the management of KVM / QEMU-based virtual machines, allowing both new and experienced users to create, configure and monitor their virtual environments without using the command line. In this article we will explore step by step how to install, configure and make the most of Virt-Manager in popular distributions such as Ubuntu, Fedora and Debian.
What is Virt-Manager?
Virt-Manager, also known as Virtual Machine Manager, is a front GTK + for libvirt, the set of APis and daemons that hinders interaction with the KVM, QEMU, Xen and LXC hypervisors. Its objective is to offer a desktop experience similar to that of the owners of virtual machines, but fully free and integrated with the Linux ecosystem. From the main window you can see all the defined virtual machines, their status (on, off, paused), CPU consumption and memory, and quickly access the graphic console or hardware details assigned.
Installation
The installation of Virt-Manager varies slightly according to distribution, but in all cases depends on libvirt packages, qemu-kvm and network bridge tools. In Ubuntu or Debian, just run:
sudo apt update
sudo apt install virt-manager libvirt-daemon-system libvirt-clients bridge-utils
In Fedora dnf is used:
sudo dnf install @ virtualization virt-manager
And in Arch Linux:
sudo pacman -S virt-manager libvirt dnsmasq vde2
After installing, it is necessary to add your user to the libvirt group so that you can access the daemon without root permissions:
sudo usermod -aG libvirt $USER
Then close and start the session again so that the change takes effect. Finally, start and enable the libvirtd service:
sudo systemctl able -now libvirtd
Initial configuration
When you first open Virt-Manager, the program automatically connects to the local hyperviewer (QEMU / KVM). If you want to manage a remote host, you can add a new connection from the File → Add Connection menu by choosing the SSH or TCP type and providing the necessary credentials. In the Settings window (Edition → Settings) you can adjust the behavior of the graphic console, define the default directory to store the disk images and choose the default virtual network type (NAT, bridge or isolated). It is also recommended to verify that the hardware acceleration is activated by reviewing that the kvm _ intel or kvm _ amd module is loaded with lsmod | grep kvm.
Create a virtual machine
To create a new VM, click on the icon of a computer with one more sign (File → New virtual machine). A multi-step assistant will appear:
1. **Select the installation method**: you can choose an ISO image, a physical installation medium, a boot network (PXE) or import an existing machine.
2. **Configure memory and CPUs**: assigns the amount of RAM and the number of virtual nuclei according to the needs of the guest operating system.
3. **Create or select a storage disk**: Virt-Manager allows you to create a new qCow2 disk of defined size or use an existing disk.
4. **Review the summary**: before finishing, check the configuration summary and mark the 'Customize configuration before installing' option if you want to adjust details such as the 'virtio, id' or network interface.
5. **End**: click «End» to start the installation; a console window will be opened where you can continue with the guest OS installation process.
Management of virtual machines
Once the VM has been created, Virt-Manager offers a set of tools for its daily administration. From the main list you can:
- **Turn on, turn off, restart** or pause the machine with the toolbar buttons.
- **Open the graphic console** by double-clicking on the VM name or using the button «Open».
- **See real-time statistics** CPU, memory, disk I / O and network traffic using the details panel.
- **Edit the settings** hardware (add disks, change memory, modify network interfaces) without turning off the machine (some changes require reboot).
- **Take snapshots** (snapshots) to save the current state and be able to reverse it later.
- **Clone** an existing VM to create identical copies or based on the same configuration.
Advanced use: clones, snapshots and networks
Snapshots are useful for testing risky updates or configurations. To create one, select the VM, go to the Machine → Take snapshot menu, provide an optional name and description. You can reverse any snapshot at any time or remove them to release space.
Cloning is done from Machine → Clone. There you can choose between a complete clone (independent copy of all disks) or a linked clone (share the base disk and only store the changes, saving space).
In terms of networks, Virt-Manager allows you to create additional virtual networks by editing → Connection → Network details. Here you can define NAT networks, set up or isolated, assign DHCP ranges and set up forward ports. These networks can be assigned to VMs' interfaces in their hardware configuration, which provides flexibility for laboratory scenarios, service tests or complex topology simulations.
It is also possible to connect VMs to physical networks through bridges, allowing virtual machines to appear as independent devices in the LAN.
Common problem solution
If you can't access the / dev / kvm device when you start a VM, check that the KVm module is loaded and your user belongs to the libvirt group. The performance problems are usually due to the lack of virtio acceleration; make sure you use virtio drivers for disk and network in the VM configuration. When the graphic console is not displayed, check that the virtlogd service is active and that there are no remote-screen conflicts. Finally, if the VM does not get IP address on a NAT network, check that the dnsmasq service is working and that there are no firewall rules blocking traffic in the range 192.168.122.0 / 24.
Conclusion
Virt-Manager is one of the most accessible and powerful options to manage KVM / QEMU virtual machines in Linux environments. Its combination of an intuitive interface, powerful integration with libvirt and the ability to perform advanced tasks such as snapshots, cloning and network management makes it an indispensable tool for both system managers and developers and enthusiasts. With the steps described in this, you can start your own virtualization infrastructure and make the most of your hardware resources.


