Red Hat Enterprise Linux virtualization (KVM/Libvirt) FAQ

Updated -

Answers to Frequently Asked Questions about virtualization with KVM/Libvirt on Red Hat Enterprise Linux 7

What is virtualization?

Virtualization is a broad computing term used for running software (usually multiple guest operating systems) concurrently and in isolation from other programs on a single machine.

See the Virtualization Getting Started Guide for more information on the fundamentals of virtualization with KVM and libvirt on Red Hat Enterprise Linux 7.

What are the different types of virtualization?

There are three main types of virtualization: full virtualization, para-virtualization, and software virtualization.

Full virtualization uses the hardware features of the system's CPU to provide virtual guests with total abstraction of the underlying physical system.

Para-virtualization employs a collection of software and data structures that are presented to the virtualized guest, requiring software modifications in the guest to use the para-virtualized environment.

Software virtualization uses slower binary translation and other emulation techniques to run unmodified operating systems. Red Hat Enterprise Linux does not support software virtualization.

See the Virtualization Getting Started Guide for more information on the virtualization types.

How do I install the virtualization packages?

On a subscribed Red Hat Enterprise Linux 7 system, the simplest method is:

 # yum groupinstall "Virtualization Host"

However, if you intend to only use the command-line interface on your host, you can preserve disk space by installing a minimal set of packages, such as:

# yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install

How do I manage the libvirtd service?

Start the libvirtd service:

# systemctl start libvirtd.service

Stop the libvirtd service:

# systemctl stop libvirtd.service

Make the libvirtd service start at boot-time:

# systemctl enable libvirtd.service

Prevent the libvirtd service from starting at boot-time:

# systemctl disable libvirtd.service

How do I verify and enable CPU virtualization extensions?

Red Hat Enterprise Linux does not support software virtualization. In order to run fully-virtualized guests, the correct features should be present and enabled in your CPU. Run the following command to check that your CPU has the required extensions:

$ grep -E "vmx|svm" /proc/cpuinfo

If this command shows any output, the required extensions are enabled.

If this command shows no output, either your hardware does not support virtualization features, or these features are not enabled in your system's BIOS. See the Virtualization Deployment and Administration Guide for details on how to check for, and enable these features.

What are the host/hypervisor/guest support limits?

See the following resources at redhat.com for more details:

Certified hypervisors
Virtualization limits
Red Hat Enterprise Linux limits

What is virt-manager?

The Virtual Machine Manager is a graphical tool for deploying and managing virtual machines. See the Virtualization Getting Started Guide for more details.

If you do not already have virt-manager installed, run the following command on your subscribed system to install it and its dependencies.

# yum install virt-manager

How do I create a guest with virt-manager?

See the Virtualization Deployment and Administration Guide for details.

How do I create a guest with virt-install?

The virt-install command lets you install guests from the command-line interface. See the Virtualization Deployment and Administration Guide for details.

How do I install a guest with PXE?

See the Virtualization Deployment and Administration Guide for details.

How do I shutdown and reboot a guest?

See the Virtualization Deployment and Administration Guide for details.

How do I install the Virtio drivers on a Windows guest?

Virtio improves disk and network performance for fully virtualized guests by making their device drivers "aware" that they are running in a virtualized environment. Using Virtio provides most of the performance benefits of para-virtualization in fully virtualized environments. To install the Virtio drivers on a Windows guest, see the Virtualization Deployment and Administration Guide.

How do I install a fully-virtualized Windows guest with virt-install?

See the Virtualization Deployment and Administration Guide for details.

How do I add storage devices to a guest?

See the Virtualization Deployment and Administration Guide for details.

How do I enable bridged networking on an interface?

See Bridged networking with virt-manager and Bridged networking with libvirt for details.

How do I use iSCSI for storing disk images?

See the Virtualization Deployment and Administration Guide for details.

What is SR-IOV?

SR-IOV is a device assignment method by which a single physical device can be shared to multiple virtual machines. See the Virtualization Deployment and Administration Guide for more details on SR-IOV.

What are Huge Pages and Transparent Huge Pages?

Huge pages is the term given to an instance of memory addressed by the CPU that is larger than the typical default. Enabled by default in Red Hat Enterprise Linux 7, using huge pages can increase performance, especially in memory-intensive workloads. Enabling transparent huge pages automatically manages memory optimization and huge pages settings. See the Virtualizaton Tuning and Optimization Guide for more details.

What is KSM?

KSM (Kernel same-page merging) allows guest virtual machines to share memory pages that are identical. Because memory is shared, the combined memory usage of the guests can be reduced. See the Virtualization Deployment and Administration Guide for details on the KSM service.

What is PCI Device Assignment?

PCI Device Assignment lets you assign devices from your host machine to guests. A common example would be assigning a network card to a guest. See the Virtualization Deployment and Administration Guide for details.

What is NUMA and what is NUMA balancing?

NUMA (Non-Uniform Memory Access) is a feature that divides system memory into blocks that may directly correspond to (and be accessed by) particular CPU sockets or by a definable grouping of CPUs.

See the Virtualization Tuning & Optimization Guide for more details on configuring NUMA.

Enabled by default in Red Hat Enterprise Linux 7, automatic NUMA balancing moves tasks (such as threads or processes) physically closer to the memory they are accessing. It also moves application data to memory that is closer to the tasks that reference it.

See the Virtualization Tuning & Optimization Guide for more details on automatic NUMA balancing.

What is overcommitting with KVM and what are the pitfalls?

Overcommitting involves allocating more virtualized CPUs or memory than there are physical resources on the system. Overcommitting is not ideal in all situations, can be detrimental to performance, and should be done with caution. Make sure you fully understand and test the impact on your systems before overcommitting resources. See the Virtualization Deployment and Administration Guide for more details.

  • Component
  • kvm

1 Comments

Thanks so much for the great virtualization FAQ. Wish I'd have found it before I set up RHV the first time, I had to spend much time searching for information, I could have saved myself a lot of time with the information in this FAQ.

Cheers!

Mark G.