Using virt-manager to manage virtual machines in Linux

Using virt-manager to manage virtual machines in Linux

The QEMU/KVM connection is missing from virt-manager, and the button for creating a local guest has nowhere to go. I was surprised that the window for managing VMs is separate from the software that runs them.

Knowing what each part does gives that empty connection list a useful explanation. You can then see how virt-manager fits into getting a local guest under your control.

What virt-manager controls

virt-manager is a desktop application for managing virtual machines through libvirt. It gives you a graphical view of the hosts and guests that libvirt exposes, while QEMU and the Linux Kernel-based Virtual Machine (KVM) commonly provide the machine emulation and hardware acceleration underneath.

ComponentWhat it does
virt-managerDesktop interface for creating and operating guests
libvirtManagement API and connection to a virtualization host
QEMUProvides the machine emulator used by common Linux VM setups
KVMLinux kernel support for hardware-assisted virtualization

Installing the graphical application alone may leave its QEMU/KVM connection unavailable because the host also needs a working virtualization stack and permission to use the selected libvirt connection.

In short, the manager is the control panel, not the hypervisor itself.

What the Linux host needs first

Use a Linux desktop with hardware virtualization available to its kernel, a libvirt provider, and virt-manager. The exact packages and service layout depend on your distribution, so use its current virtualization instructions rather than copying a command written for another release.

These pieces have separate jobs. The desktop runs the manager, libvirt handles the host connection, and the QEMU/KVM backend runs the guest with the resources the host makes available.

On Ubuntu, the current Server documentation installs the interface with this package command:

sudo apt install virt-manager

virt-manager needs a graphical session. If your Ubuntu host has no desktop, install or use the application on a workstation and connect to the host only after configuring a supported remote connection. Our Ubuntu Server desktop installation guide covers the separate choice of adding a graphical environment.

Before creating a guest, get its operating-system installer as an ISO file and decide how much memory, CPU time, and disk space the host can spare. An ISO is the installation media. The guest’s virtual disk is where its installed system and files will live.

Also decide whether the guest needs to reach your local network or only the internet through the host. That choice affects the virtual network you select later, not the ISO installer.

Create and start a virtual machine

Open Virtual Machine Manager and choose the local QEMU/KVM connection. Start the new-VM wizard, then work through its choices in order.

If the connection list is empty, resolve the host setup before continuing. A wizard cannot create a guest until virt-manager can reach a working libvirt connection.

1. Choose the installation source

Select the local installation media option and browse to the ISO. virt-manager may identify the operating system from the image. Check the detected choice before moving on, because that selection influences the virtual hardware defaults.

If Kali is your guest, our Kali installation walkthrough covers the guest installer, though its VirtualBox host controls differ from virt-manager.

2. Set CPU and memory

Leave enough memory and CPU capacity for the host desktop to stay responsive.

You can adjust these allocations later in the guest’s hardware details. If the host becomes sluggish while the guest runs, reduce its allocation after shutting it down.

3. Create a virtual disk and select networking

Choose a new virtual disk and set its capacity. The wizard stores that disk in a libvirt storage pool, so note the pool and disk name if you later need to locate or back up the guest files.

The disk is a file or block-backed volume managed by the host, not a partition that the guest installer should format on your Linux desktop.

Keep the default virtual network for a first guest unless you have a specific network design. A bridged interface, static address, or host-only network changes how the guest reaches other machines. Our Linux network configuration guide and Ubuntu static IP guide cover host networking separately.

4. Review and finish

Give the guest a name, review its disk, network, and resource settings, then finish the wizard. Start the guest to boot from the ISO and follow that operating system’s installer inside the console.

If the guest starts from its empty disk instead, shut it down and check the boot order or confirm that the ISO remains attached as installation media.

Virtual Machine Manager listing localhost QEMU guests with running and shutoff states
The upstream virt-manager project shows guest state and host activity in its VM inventory.

After installation, shut down the guest once if you need to change its boot order or remove the ISO. The upstream inventory view above shows the next useful distinction: virt-manager labels guests as running or shut off, and exposes their console when you open one.

Operate the guest from virt-manager

Select a guest in the main window to see its state. Use the toolbar or guest menu to start it, pause it, resume it, or request a shutdown. Opening the guest window displays its virtual screen and installation or desktop interaction.

  • Start boots a shut-off guest from its configured boot devices.
  • Pause suspends guest execution temporarily. Resume it to continue.
  • Shut down asks the guest operating system to stop cleanly. Use force-off only when it will not respond, because that is like cutting power to a physical computer.

Open the hardware details to adjust devices such as memory, CPUs, disks, and network interfaces. Shut the guest down before changing settings that require powered-off hardware, then start it again and check the guest’s network from inside its operating system.

Use our guide to find an IP address in Linux when checking guest connectivity.

When the QEMU/KVM connection is missing

A missing connection is a host-setup problem, not a broken virtual machine. Check which layer is absent before changing permissions or enabling services.

What you seeWhat to check
No QEMU/KVM connection in the managerConfirm the libvirt/QEMU packages and the distribution’s documented daemon or socket setup
Connection exists but authentication failsCheck the selected system or user session and the host’s authorization policy
Guest creation reports unavailable accelerationCheck that the processor exposes virtualization and the host kernel can access it
Guest runs but has no network accessCheck the selected virtual network and the guest’s address before changing host bridges

A system connection and a user-session connection are not interchangeable. They have different permission and networking boundaries, and the available libvirt service names vary across distributions. Follow your distribution’s current libvirt instructions rather than adding broad group access or copying an old daemon command.

Remote management is a separate setup. Ubuntu documents a QEMU-over-SSH connection, but it depends on working SSH access and a configured libvirt host. A local wizard does not configure those for you.

Keep the guest disk and host separate

A virtual machine is defined by more than the window that displays it. Its libvirt connection controls the guest, while its virtual disk and network determine what data it keeps and how it communicates.

Shut the guest down before changing a storage pool or virtual device.

Note which disk and connection it uses first. That check helps you avoid moving the wrong disk or changing the host network when the guest alone needs attention.

virt-manager

Virt-manager questions

These details depend on which libvirt connection and Linux distribution you use.

What is virt-manager used for?

virt-manager is a desktop interface for managing virtual machines through libvirt. It can create guests, show their state, and open their graphical consoles.

Where does virt-manager store virtual machines?

A guest’s virtual disk is stored in the libvirt storage pool selected during creation. Check the guest’s hardware details and pool configuration to locate the disk instead of assuming every system uses the same path.

Can you use virt-manager without a graphical desktop?

virt-manager is a graphical application and needs a graphical session. For command-line guest creation, the virt-manager project provides tools such as virt-install, but that is a separate workflow.

Why is QEMU/KVM missing from virt-manager?

The local libvirt/QEMU host setup may be missing, unavailable, or inaccessible to the selected user. Check your distribution’s current libvirt service and authorization instructions before changing permissions.