How to Manage Virtual Machines in KVM Using Virt-Manager

The virt-manager application provides an easy-to-use interface that allows users to perform a wide range of tasks including creating guest machines and assigning critical virtual resources such as CPU, memory, and disk space. Users can also configure networking, pause, and resume the guest machines as well as monitor performance.

As you get started, make sure that the KVM hypervisor is installed and guest virtual machines created on the system using virt-manager.

We have elaborate articles on:

Without much further ado, let’s focus on how you can manage KVM virtual machines using virt-manager in Linux.

Managing the Virtual Machine using Virt-Manager

Once the installation of the guest OS is complete. It should appear on virt-manager in a ‘Running’ state as shown.

Running KVM Virtual Machines
Running KVM Virtual Machines

To display the virtual hardware details, click on the ‘Edit’ button on the menu bar, and select ‘Virtual machine details’.

Check Virtual Machine Hardware
Check Virtual Machine Hardware

On the guest machine window, click on the blue ‘Show virtual hardware details’ icon.

Show Virtual Machine Hardware Details
Show Virtual Machine Hardware Details

The window gives you an overview of the available virtual hardware properties associated with the VM. These include the virtual CPUs, RAM, network cards and so much more.

In addition, you can perform some tweaks, for example, adding hardware resources such as a USB drive. To achieve this, ensure that you have plugged in a USB drive and click on the ‘Add hardware’ button.

VM Hardware Overview
VM Hardware Overview

Navigate and click on the ‘USB Host device’ button, and on the right pane, select your USB device. In my case, I have selected the ‘SanDisk Cruzer Blade’ USB stick. Then click ‘Finish’.

Add USB Device to VM
Add USB Device to VM

Just below the menu bar, the virt-manager presents some options for controlling the state of the virtual machine. For example, to access the virtual machine console hit the ‘Open’ button.

Open VM Console
Open VM Console

To pause the virtual machine, click on the ‘Pause’ button.

The poweroff button presents an array of options including Reboot, Shut Down, Force Reset, Force Off, and Save.

Manage KVM Virtual Machines
Manage KVM Virtual Machines

Clone KVM Virtual Machine

Also, just like VirtualBox, you can clone a VM by right-clicking and selecting the ‘Clone’ option. This creates a new, independent copy of the original disk.

Clone KVM Virtual Machine
Clone KVM Virtual Machine

Feel free to configure other options such as networking and storage, and when you are done, click on the ‘Clone’ option.

Clone Virtual Machine Settings
Clone Virtual Machine Settings

The clone VM will appear as shown.

Virtual Machine Clone
Virtual Machine Clone

And that’s pretty much it. There are plenty of other options that virt-manager provides that might pique your curiosity. So, feel free to explore. Hopefully, you have a decent idea of how to create and manage your virtual machines using KVM. Alternatively, you can also use the Cockpit web console to manage KVM virtual machines.

Source: access.redhat.com

Two small things before you go

If something didn’t work on your setup, leave a comment and tell me which distro and version you’re on. I read every one, and most of these articles got better because a reader pointed out what was missing.

And if it did work, share it. TecMint has stayed free for 14 years because people pass these articles around, and that traffic is what pays for writing the next one.

Leave a comment
Get two free Linux courses

Learn the Linux basics with two free courses and join 34,000+ readers getting practical TecMint tutorials and selected Pro TecMint articles every week.

Pro TecMint
Get lifetime access for $99

If you want to go beyond the free tutorials, Pro gives you 18 courses, 5 ebooks, and every future course I add. One payment, lifetime access, no renewals.

James Kiarie
James Kiarie
Contributor
About the author

This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.