Running KVM Virtual Machines with Virt-Manager on Ubuntu

Using KVM and Virt-Manager to Create Virtual Machines on Ubuntu gives you a practical way to test operating systems, run isolated development environments, and use software that needs a different platform. KVM provides hardware-assisted virtualisation through the Linux kernel, while QEMU supplies the machine emulation and Virt-Manager gives you a friendly graphical interface for managing it all.

This arrangement is well suited to everyday Ubuntu users because most tasks can be completed without memorising long command sequences. You can create a guest machine, attach an ISO image, allocate storage and memory, then install Ubuntu, Debian, Windows or another compatible system in a separate window.

Virtual machines are also useful on Australian home connections and hardware. You can download an installation image during a quieter evening period, keep a test environment separate from your main desktop, and avoid altering a reliable workstation used for work or study. On an NBN connection, download speeds can be excellent, although upload performance and evening congestion still vary between plans and suburbs.

Check Hardware And Install The Virtualisation Tools

Before installing anything, confirm that your processor supports virtualisation and that the feature is enabled in the computer’s UEFI settings. Intel systems usually label it Intel VT-x, while AMD systems generally call it AMD-V or SVM. The setting is often found under Advanced CPU, Security or System Configuration menus.

Ubuntu can check whether the required CPU flags are visible with a terminal command:

egrep -c '(vmx|svm)' /proc/cpuinfo

A result above zero usually means the processor exposes virtualisation support. If the result is zero, restart the computer, enter its UEFI setup screen and look for the relevant option. Business laptops may have the setting locked by an administrator, and some older machines may lack hardware virtualisation altogether.

Install the main packages with:

sudo apt update
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients virt-manager

Ubuntu normally starts the libvirt service during installation. Add your account to the groups that allow ordinary desktop access to virtual machines:

sudo adduser "$USER" libvirt
sudo adduser "$USER" kvm

Sign out and sign back in afterwards, or reboot. Without a fresh login, Virt-Manager may report permission errors even though the installation is correct. The libvirt service manages virtual machine definitions and networks, while /dev/kvm gives QEMU access to accelerated processor support.

Create A Guest Machine In Virt-Manager

Open Virtual Machine Manager from the applications menu. The first time it starts, it should show a local QEMU/KVM connection. If the connection is inactive, right-click it and choose to connect. The local connection is generally the correct choice for a desktop PC, rather than a remote server connection.

Click the button to create a new virtual machine and select installation media. You can use a downloaded ISO file, a physical optical disc or, in some cases, a network installation source. For a normal Ubuntu guest, choose the local ISO option and browse to the file. Virt-Manager may identify the operating system automatically; selecting the closest match helps it choose sensible default hardware.

Allocate memory and processor cores carefully. A guest running a lightweight Linux desktop may work well with 2–4 GB of RAM and two virtual CPUs. A modern Windows guest commonly needs at least 4–8 GB of RAM, along with more storage and patience during installation. Leave enough memory for Ubuntu itself: a machine with 8 GB total should not give 6 GB to a guest unless the host is doing very little else.

Create a virtual disk rather than using a physical drive unless you have a specific reason to pass through hardware. A dynamically allocated 40 GB or 60 GB qcow2 disk grows as the guest uses space, up to its configured maximum. Keep the image on a fast internal SSD where possible. A USB hard drive can work for larger laboratories, but slower storage will make booting, updates and application launches feel sluggish.

Before finishing the wizard, select the option to customise the hardware configuration. Confirm that the boot order includes the virtual CD-ROM while installing, check the display device, and give the machine a useful name such as ubuntu-test-24-04 or windows-lab. Click Finish, start the guest and follow the operating system installer.

Configure Networking And Shared Resources

Virt-Manager normally creates a libvirt NAT network called default. This gives the guest outbound internet access through the Ubuntu host without exposing the guest directly to your home network. It is the safest and simplest choice for browsing, updates and testing ordinary applications.

A bridged network is different: it places the virtual machine directly on the same local network as the host. That can be useful when testing a server, accessing the guest from another computer or giving it an address on a home router. It also makes the guest more visible to other devices, so firewall rules and guest security become more important. Network Manager settings on Ubuntu can make bridge configuration vary between releases and hardware, so NAT is the sensible starting point.

For an Australian household, NAT avoids unnecessary work when a modem or router already handles address allocation. If your NBN provider uses a particular router setup, VLAN configuration or carrier-grade NAT, that usually affects internet access at the host level rather than the basic virtual machine configuration. The guest should receive a private address and reach the internet through the host’s connection.

Shared folders require more thought than simply dragging files into the guest window. Virtiofs is a fast modern option when supported by both the host and guest, while Samba shares work across Linux and Windows. Clipboard integration and drag-and-drop may depend on the guest display tools. For occasional transfers, an ISO containing files or a dedicated shared directory can be easier to troubleshoot than changing several virtual hardware settings.

Install guest integration packages where appropriate. On a Linux guest, SPICE tools and the QEMU guest agent can improve display resizing, mouse behaviour, shutdown handling and host visibility. Windows guests may need VirtIO storage or network drivers, which can be attached through a second virtual CD image during setup.

Improve Performance And Keep Guests Manageable

Virtual machine performance depends on the host’s available resources as much as the guest’s settings. Assigning every CPU core to a guest can make the Ubuntu desktop unresponsive, and allocating almost all available RAM may trigger swapping. Keep at least two cores and a useful amount of memory available to the host for the file manager, browser and background services.

Use VirtIO devices where the guest supports them. VirtIO network and disk controllers reduce emulation overhead and usually perform better than older IDE or e1000-style devices. For a Linux guest, Virt-Manager often offers these options directly. For Windows, download the current VirtIO driver ISO from a trusted project source and keep it available during installation.

Snapshots are helpful before a risky software change, a distribution upgrade or a configuration experiment. A snapshot records a guest’s state so you can return to an earlier point, but it is not a complete backup. Long chains of snapshots can consume storage and reduce clarity, particularly when a qcow2 image keeps accumulating changes.

Back up important virtual disks separately. Shut down the guest cleanly, copy its qcow2 image and save the virtual machine definition if the environment matters. A second local disk, a network-attached storage device or an encrypted backup drive can protect against host failure. Australian users working from regional areas may also appreciate an offline copy when internet access is limited or mobile data is expensive.

Use clear names and descriptions for every guest. Virt-Manager allows you to adjust memory, CPUs, storage and devices after creation, provided the guest is powered off for settings that cannot change safely while running. Keeping a short note of the operating system version, login details and purpose of each guest prevents confusion when several test machines are open during a busy arvo.

Troubleshoot Common Problems Safely

A guest that refuses to start often points to a service, permission or firmware issue. Check that the libvirt daemon is active:

systemctl status libvirtd

On newer Ubuntu releases, related socket-activated services may appear instead of one continuously running daemon. The useful evidence is usually in the error message shown by Virt-Manager or in the system journal. Permission problems after adding yourself to the libvirt or kvm group normally disappear after signing out and back in.

If installation boots to a blank screen, open the guest’s hardware details and verify that the ISO is attached to the virtual optical drive. Try changing the video model to QXL or Virtio, and disable 3D acceleration temporarily. Some operating systems need UEFI firmware, while others install more reliably with the default BIOS-style firmware. Match the firmware mode to the operating system’s requirements rather than changing it randomly after installation.

Slow disk activity can come from an overcommitted host, a nearly full drive or an image stored on a slow external disk. Check free space with df -h, close unnecessary applications and monitor system memory. If the guest has internet access but name lookups fail, inspect its DNS settings and the host’s connection before changing the libvirt network.

Virtual machines are isolated environments, not magical security boxes. Keep the guest updated, use a firewall where appropriate and avoid passing through USB devices you do not trust. A Windows guest used for testing unfamiliar software should have limited access to shared folders and personal data. For broader Linux guidance, application coverage and distribution news, the UbuntuNext community offers useful context alongside the official Ubuntu documentation.

A well-configured KVM guest should feel like a separate computer without requiring a second physical machine. Start with NAT networking, modest resource allocations and a disposable test installation. Once that works, add shared folders, VirtIO drivers, snapshots and more advanced networking one change at a time.

The practical rule is simple: protect the host first, allocate only what the guest needs, and treat virtual disks as valuable data. With those habits, Virt-Manager turns Ubuntu into a flexible laboratory for testing releases, learning server administration and running additional platforms without disrupting the system you rely on every day.