Chapter 6. Managing Virtual Resources

The Red Hat Enterprise Virtualization platform supports both virtual servers and virtual desktops. The Virtual Machines tab on the Administration Portal provides an efficient graphical way to view and manage virtual machines. For more information on virtual machines, virtual disk formats and storage of guest images, see Red Hat Enterprise Linux Virtualization Guide.
The Virtual Machines Tab

Figure 6.1. The Virtual Machines Tab


Administrative tasks for virtual machines include:
  • Creating virtual machines manually or from templates.
  • Starting, suspending and migrating virtual machines.
  • Backing up and restoring virtual machines by taking a snapshot.
  • Importing or exporting virtual machines.
  • Converting virtual machines from foreign hypervisors.
  • Assigning virtual machines to users.
This chapter describes how to create and maintain virtual machines. A virtual desktop fulfills the tasks of a physical desktop without the actual hardware. Virtual machines in a cluster can be migrated to other hosts within the same cluster. An understanding of how virtual machines access networked storage is helpful.

6.1. About Virtual Machines

This section briefly describes the storage, processing and network parameters of virtual machines in the Red Hat Enterprise Virtualization platform.
It is recommended that the overcommit memory feature be used in order to achieve density. However this may result in some virtual machines running with a 'Not enough memory' error message. This is a transient state, running the virtual machines again should succeed. For more information on setting memory overcommit, see Creating a New Host Cluster.

6.1.1. Supported Virtual Machines

Red Hat Enterprise Virtualization presently supports the following virtual machines:

Supported Guests

Red Hat Enterprise Virtualization presently supports the following virtualized guest operating systems:
  • Red Hat Enterprise Linux 3 (32 bit and 64 bit)
  • Red Hat Enterprise Linux 4 (32 bit and 64 bit)
  • Red Hat Enterprise Linux 5 (32 bit and 64 bit)
  • Red Hat Enterprise Linux 6 (32 bit and 64 bit)
  • Windows XP Service Pack 3 and newer (32 bit only)
  • Windows 7 (32 bit and 64 bit)
  • Windows Server 2003 Service Pack 2 and newer (32 bit and 64 bit)
  • Windows Server 2008 (32 bit and 64 bit)
  • Windows Server 2008 R2 (64 bit only)
Para-virtualized drivers (the virtio drivers) that increase the performance for a virtual machine's block and network devices are available for the following operating systems and versions.

Table 6.1. Para-virtualized driver support

Guest operating system Para-virtualized drivers
Red Hat Enterprise Linux 4.8 and newer (32 bit and 64 bit) Block and network drivers
Red Hat Enterprise Linux 5.4 and newer (32 bit and 64 bit) Block and network drivers
Red Hat Enterprise Linux 6.0 and newer (32 bit and 64 bit) Block and network drivers
Windows XP Block and network drivers
Windows 7 (32 bit and 64 bit) Block and network drivers
Windows Server 2003 R2 (32 bit and 64 bit) Block and network drivers
Windows Server 2008 (32 bit and 64 bit) Block and network drivers

Important

If a network interface on a Windows virtual machine is configured using the default network drivers, the network configuration settings are lost if the Red Hat Enterprise Virtualization para-virtualized network drivers are installed subsequently. To avoid this issue, you should install the Red Hat Enterprise Virtualization para-virtualized network drivers before configuring network interfaces on Windows virtual machines.

6.1.2. Virtual Machine Performance Parameters

Red Hat Enterprise Virtualization virtual machines can support the following parameters:

Table 6.2. Supported virtual machine parameters

Parameter Number Note
Virtualized CPUs 16 per virtual machine
Virtualized RAM 256GB For a 64 bit virtual machine
Virtualized RAM 4GB per 32 bit virtual machine. Note, the virtual machine may not register the entire 4GB. The amount of RAM that the virtual machine recognizes is limited by its operating system.
Virtualized storage devices 8 per virtual machine
Virtualized network interface controllers 8 per virtual machine
Virtualized PCI devices 32 per virtual machine

6.1.3. Understanding Virtual Machine Storage

Red Hat Enterprise Virtualization platform supports three storage types: NFS, iSCSI and FCP. In each type, a host known as the Storage Pool Manager (SPM) manages access between hosts and storage. The SPM host is the only node that has full access within the storage pool; the SPM can modify the images data, and meta-data and the pool's meta-data.
In an NFS data center, the SPM creates the virtual disk on top of a regular file system as a normal disk in preallocated (RAW) format. Where sparse allocation is chosen additional layers on the disk will be created in thinly provisioned Qcow2 (sparse) format. For iSCSI and SAN, the SPM creates a Volume group (VG) on top of the Logical Unit Numbers (LUNs) provided. During the virtual disk creation, either a preallocated format (RAW) or a thinly provisioned Qcow2 (sparse) format is created.
For a virtual disk with a preallocated format, a Logical Volume (LV) of the specified size in GB is created. If necessary, the virtual machine (VM) can be mounted on a Red Hat Enterprise Linux server using kpartx, vgscan, vgchange and mount to investigate the VM's processes or problems.
For a virtual disk with a thin provision format, a 512M LV is created initially. The LV is continuously monitored by the host on which the VM is running. As soon as the usage nears a threshold the host notifies the SPM, and the SPM extends the LV by 512M. The host is responsible for resuming the VM after the LV has been extended. If the VM goes into a pause state it means that the SPM could not extend the disk on time. This can occur if the SPM is too busy or there is not enough storage space.
From a performance point of view, a virtual disk with a preallocated (RAW) format is significantly faster than a virtual disk with a thin provisioning (Qcow2) format. It is recommended that the thin provision format be used for non-IO intensive virtual desktops.

6.1.3.1. Understanding Virtual Disks

Virtual disks are of two types, Sparse or Preallocated, and each behaves in a different manner. The available formats are either Raw or Qcow2.
  1. Sparse or Preallocated
    A preallocated virtual disk has reserved storage of the same size as the virtual disk itself. This results in better performance because no storage allocation is required during runtime.
    On SAN (iSCSI, FCP) this is achieved by creating a block device with the same size as the virtual disk. On NFS this is achieved by filling the backing hard disk image file with zeros. Preallocating storage on an NFS storage domain presumes that the backing storage is not Qcow2 formatted and zeroes will not be de-duplicated in the hard disk image file. (If these assumptions are incorrect, do not select Preallocated for NFS virtual disks).
    For sparse virtual disks backing storage is not reserved and is allocated as needed during runtime. This allows for storage over commitment under the assumption that most disks are not fully utilized and storage capacity can be utilized better. This requires the backing storage to monitor write requests and can cause some performance issues. On NFS backing storage is achieved simply by using files. On SAN this is achieved by creating a block device smaller than the virtual disk's defined size and communicating with the hypervisor to monitor necessary allocations. This does not require support from the underlying storage devices.
  2. Raw
    For raw virtual disks the backing storage device (file/block device) is presented as is to the virtual machine with no additional layering in between. This gives better performance but has several limitations.
The possible combinations of storage types and formats are described in the following table.

Table 6.3. Permitted Storage Combinations

Storage Format Type Note
NFS or iSCSI/FCP Raw or Qcow2 Sparse or Preallocated
NFS Raw Preallocated A file with an initial size which equals the amount of storage defined for the virtual disk, and has no formatting.
NFS Raw Sparse A file with an initial size which is close to zero, and has no formatting.
NFS Qcow2 Sparse A file with an initial size which is close to zero, and has RAW formatting. Subsequent layers will be Qcow2 formatted.
SAN Raw Preallocated A block device with an initial size which equals the amount of storage defined for the virtual disk, and has no formatting.
SAN Qcow2 Preallocated A block device with an initial size which equals the amount of storage defined for the virtual disk, and has qcow2 formatting.
SAN Qcow2 Sparse A block device with an initial size which is much smaller than the size defined for the VDisk (currently 1GB), and has Qcow2 formatting for which space is allocated as needed (currently in 1GB increments).