An introduction to Virtual Machine Manager

Virt-manager provides a full range of options for spinning up virtual machines on Linux.
116 readers like this.
Jump-start your career with open source skills

Opensource.com

In my series about GNOME Boxes, I explained how Linux users can quickly spin up virtual machines on their desktop without much fuss. Boxes is ideal for creating virtual machines in a pinch when a simple configuration is all you need.

But if you need to configure more detail in your virtual machine, you need a tool that provides a full range of options for disks, network interface cards (NICs), and other hardware. This is where Virtual Machine Manager (virt-manager) comes in. If you don't see it in your applications menu, you can install it from your package manager or via the command line:

  • On Fedora: sudo dnf install virt-manager
  • On Ubuntu: sudo apt install virt-manager

Once it's installed, you can launch it from its application menu icon or from the command line by entering virt-manager.

 

Virtual Machine Manager's main screen

opensource.com

To demonstrate how to create a virtual machine using virt-manager, I'll go through the steps to set one up for Red Hat Enterprise Linux 8.

To start, click File then New Virtual Machine. Virt-manager's developers have thoughtfully titled each step of the process (e.g., Step 1 of 5) to make it easy. Click Local install media and Forward.

 

Step 1 virtual machine creation

opensource.com

On the next screen, browse to select the ISO file for the operating system you want to install. (My RHEL 8 image is located in my Downloads directory.) Virt-manager automatically detects the operating system.

 

Step 2 Choose the ISO File

opensource.com

In Step 3, you can specify the virtual machine's memory and CPU. The defaults are 1,024MB memory and one CPU.

 

Step 3 Set CPU and Memory

opensource.com

I want to give RHEL ample room to run—and the hardware I'm using can accommodate it—so I'll increase them (respectively) to 4,096MB and two CPUs.

The next step configures storage for the virtual machine; the default setting is a 10GB disk image. (I'll keep this setting, but you can adjust it for your needs.) You can also choose an existing disk image or create one in a custom location.

 

Step 4 Configure VM Storage

opensource.com

Step 5 is the place to name your virtual machine and click Finish. This is equivalent to creating a virtual machine or a Box in GNOME Boxes. While it's technically the last step, you have several options (as you can see in the screenshot below). Since the advantage of virt-manager is the ability to customize a virtual machine, I'll check the box labeled Customize configuration before install before I click Finish.

Since I chose to customize the configuration, virt-manager opens a screen displaying a bunch of devices and settings. This is the fun part!

Here you have another chance to name the virtual machine. In the list on the left, you can view details on various aspects, such as CPU, memory, disks, controllers, and many other items. For example, I can click on CPUs to verify the change I made in Step 3.

 

Changing the CPU count

opensource.com

I can also confirm the amount of memory I set.

When installing a VM to run as a server, I usually disable or remove its sound capability. To do so, select Sound and click Remove or right-click on Sound and choose Remove Hardware.

You can also add hardware with the Add Hardware button at the bottom. This brings up the Add New Virtual Hardware screen where you can add additional storage devices, memory, sound, etc. It's like having access to a very well-stocked (if virtual) computer hardware warehouse.

 

The Add New Hardware screen

opensource.com

Once you are happy with your VM configuration, click Begin Installation, and the system will boot and begin installing your specified operating system from the ISO.

 

Begin installing the OS

opensource.com

Once it completes, it reboots, and your new VM is ready for use.

 

Red Hat Enterprise Linux 8 running in VMM

opensource.com

Virtual Machine Manager is a powerful tool for desktop Linux users. It is open source and an excellent alternative to proprietary and closed virtualization products.

What to read next
Tags
Alan Formy-Duval Opensource.com Correspondent
Alan has 20 years of IT experience, mostly in the Government and Financial sectors. He started as a Value Added Reseller before moving into Systems Engineering. Alan's background is in high-availability clustered apps. He wrote the 'Users and Groups' and 'Apache and the Web Stack' chapters in the Oracle Press/McGraw Hill 'Oracle Solaris 11 System Administration' book.

3 Comments

Good article and nice tool! Thanks for share!

Thanks for article. Very informative.
I'd be interested in your comparative comments on Boxes, Virt-Manager and Proxmox.

John, I have not used Proxmox, so cannot provide any thoughts on it. As for the others, Virt-Manager provides the 'full-blown' virtualization experience where the user is able to customize many aspects of the virtual machine environment. Boxes, on the other hand, was designed explicitly to be a simple and clean tool allowing a user to quickly bring up a virtual machine.

In reply to by John R (not verified)

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.