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

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

James Kiarie
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.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

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.