How to Create Virtual Machines in KVM Using Virt-Manager

As you get started, ensure that the KVM hypervisor is installed on your system. An acronym for Kernel-based Virtual Machine, KVM is a combination of kernel modules & utilities needed to run virtual machines on a host system. These include QEMU, virt-install, libvirtd daemon, virt-manager and so many more.

We have elaborate articles on:

For this guide, I’ll be working on Ubuntu 20.04 to illustrate how virt-manager can be used to create as well as manage virtual machines.

Creating Virtual Machines using Virt-Manager

To start off, launch virt-manager. This can be achieved in two ways. You can use the application manager to search for the virt-manager application as shown.

Launch Virt-Manager
Launch Virt-Manager

If you are running on a terminal, run the following command:

$ sudo virt-manager

This will launch the Virtual Machines manager GUI application as shown.

Virtual Machine Manager
Virtual Machine Manager

To get started with creating a virtual machine, click on the ‘New virtual machine’ icon at the top left corner, just below the ‘File’ menu item.

New Virtual Machine
New Virtual Machine

The next step presents a list of options that you can choose from when selecting your preferred operating system.

  • The first option – Local Install Media (ISO image or CDROM) – allows you to select an ISO image sitting on your local system or select an operating system from an inserted CD or DVD drive.
  • The second option – Network Install (HTTP, FTP, or NFS) – allows you to select an ISO image over the network. For this to work, the ISO image should be mounted on a web server, FTP server, or Network File System. We have a comprehensive guide on how to deploy a virtual machine over the network using HTTP, FTP, and NFS.
  • The third option – Network Boot (PXE) – allows the virtual machine to boot from the Network card.
  • And the fourth option – Import existing disk image – Allows you to spawn a virtual machine from an existing KVM virtual image.

Be sure to select the option that suits you. In my case, I already have a Debian 10 ISO image on my local system. Therefore, I’ll select the first option and click the ‘Forward’ button.

Create New Virtual Machine
Create New Virtual Machine

Next, click on the ‘browse local’ button and select your disk image.

Choose Disk Image
Choose Disk Image

In the image below, the ISO image has already been selected. Accept the defaults for ‘OS type’ and ‘Version’ and click ‘Forward’.

Choose OS Type
Choose OS Type

In the next step, specify the RAM size and the number of CPU cores to be assigned and click ‘Forward’.

Choose Memory and CPU Settings
Choose Memory and CPU Settings

Next, specify the disk space for the virtual machine and hit ‘Forward’.

Set Disk Space for VM
Set Disk Space for VM

In the last step, provide the preferred name of the virtual machine and confirm that all the other VM details are okay. Additionally, you can choose to configure the Network preferences. For example, you can opt to go with the default NAT network or change to a bridged network if you want your guest machine to be in the same network as the host.

To start the virtual machine, click on the ‘Finish’ button.

Finish VM Installation
Finish VM Installation

This launches the virtual machine. For those who have installed Debian 10 before, this step should look familiar. However, we will not complete the installation as our main focus is creating and managing virtual machines using KVM. We have an elaborate guide on how to install Debian 10.

Debian VM Installation
Debian VM Installation

That’s pretty much it. In the next article, we will see how to manage KVM virtual machines with Virt-manager or you can also use cockpit to manage virtual machines. If you have any queries about this article, feel free to ask in the comments.

Source: access.redhat.com

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

2 thoughts on “How to Create Virtual Machines in KVM Using Virt-Manager”

  1. Thank you for sharing. I wonder do you have a posting on how to script out a vm image with KVM for deployment or a create template for rapid deployment? Thank you in advance

    Reply

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.