3.5. Virtual Machine Behaviors

RGManager handles virtual machines slightly differently from other non-VM services.

3.5.1. Normal Operations

VMs managed by RGManager should only be administered using clusvcadm or another cluster aware tool. Most of the behaviors are common with normal services. This includes:
  • Starting (enabling)
  • Stopping (disabling)
  • Status monitoring
  • Relocation
  • Recovery
To learn more about highly available virtual services, see Chapter 7, Virtualization and High Availability.

3.5.2. Migration

In addition to normal service operations, virtual machines support one behavior not supported by other services: migration. Migration minimizes downtime of virtual machines by removing the requirement for a start/stop in order to change the location of a virtual machine within a cluster.
There are two types of migration supported by RGManager which are selected on a per-VM basis by the migrate attribute:
  • live (default) — the virtual machine continues to run while most of its memory contents are copied to the destination host. This minimizes the inaccessibility of the VM (typically well under 1 second) at the expense of performance of the VM during the migration and total amount of time it takes for the migration to complete.
  • pause - the virtual machine is frozen in memory while its memory contents are copied to the destination host. This minimizes the amount of time it takes for a virtual machine migration to complete.
Which migration style you use is dependent on availability and performance requirements. For example, a live migration may mean 29 seconds of degraded performance and 1 second of complete unavailability while a pause migration may mean 8 seconds of complete unavailability and no otherwise degraded performance.

Important

A virtual machine may be a component of a service, but doing this disables all forms of migration and most of the below convenience features.
Additionally, the use of migration with KVM requires careful configuration of ssh.

3.5.3. RGManager Virtual Machine Features

The following section lists the various ways RGManager eases use of managing virtual machines.

3.5.3.1. Virtual Machine Tracking

Starting a virtual machine with clusvcadm if the VM is already running will cause RGManager to search the cluster for the VM and mark the VM as started wherever it is found.
Administrators who accidentally migrate a VM between cluster nodes with non-cluster tools such as virsh will cause RGManager to search the cluster for the VM and mark the VM as started wherever it is found.

Note

If the VM is running in multiple locations, RGManager does not warn you.

3.5.3.2. Transient Domain Support

RGManager supports transient virtual machines which are supported by libvirt. This enables RGManager to create and remove virtual machines on the fly, helping reduce the possibility of accidental double-starts of virtual machines due to the use of non-cluster tools.
Support of transient virtual machines also enables you to store libvirt XML description files on a clustered file system so that you do not have to manually keep /etc/libvirt/qemu in sync across the cluster.
3.5.3.2.1. Management Features
Adding or removing a VM from cluster.conf will not start or stop the VM; it will simply cause RGManager to start or stop paying attention to the VM
Failback (moving to a more preferred node) is performed using migration to minimize downtime.

3.5.4. Unhandled Behaviors

The following conditions and user actions are not supported in RGManager.
  • Using a non-cluster-aware tool (such as virsh or xm) to manipulate a virtual machine's state or configuration while the cluster is managing the virtual machine. Checking the virtual machine's state is fine (for example, virsh list, virsh dumpxml).
  • Migrating a cluster-managed VM to a non-cluster node or a node in the cluster which is not running RGManager. RGManager will restart the VM in the previous location, causing two instances of the VM to be running, resulting in file system corruption.