Skip to content

KVM Configuration Methods

There are several methods to configure a KVM virtual machine, and each method is suitable for different purposes.

The diagram below shows the scope of customization possibilities depending on the method that you are using – CLI, GUI, or editing the XML file directly.

There are pros and cons to each configuration method. Review the table below to decide which method is appropriate for you.

ProsCons

CLI (virsh)

  • Allows for a quick start with predefined templates or scripts.

  • Best for default deployments.

  • Special configurations require crafting long commands.

  • Command syntax can change with updates.

Virtual Machine Manager GUI (virt-manager)

  • Best for testing new features, prototyping, and learning.

  • Quite powerful, especially when coupled with the internal XML editor.

Some settings are unavailable.

Web-based GUI (Cockpit)

  • Friendly UI.

  • Provides easy management of configured virtual machines (can be done remotely via a web interface).

Limited ability to create virtual machines and change essential settings.

XML editing

  • Best for advanced deployments.

  • Provides the most customizability.

Higher risk of configuration errors.

Regardless of the method you use to configure your KVM virtual machine, all settings will be stored in an XML configuration file.

This guide discusses how to perform tasks with your KVM virtual machine using CLI, Virtual Machine Manager GUI, or by editing the XML configuration directly.

Note

A window manager is required on Linux to use the Virtual Machine Manager GUI.

The Cockpit GUI is also a good tool for managing a KVM virtual machine without the need for a terminal, as you can access your virtual machine’s serial console via a browser. Further documentation on Cockpit can be found in this Red Hat Enterprise Linux article.