A virtual machine (VM) can be migrated from one host to another host. This migration can be a live migration or pause migration. You can initiate the migration using:
The virsh migrate command or virt-manager console in case of Kernel-based Virtual Machine (KVM) environment
RHEV-M web interface in case of Red Hat Enterprise Virtualization (RHEV) environment
The Cluster Server (VCS) hagrp -migrate operation (the hagrp -migrate command initiates live migration only)
If virtual machine migration is initiated outside VCS (either using the virsh commands or the RHEV-M web interface), VCS monitors the migrated guest and can detect the migration process. VCS changes the resource state according to the virtual machine state, i.e. if the guest is live-migrated from one host to another host, the associated KVMGuest resource is brought online on the host where the guest is migrated and on the source node the KVMGuest resource state is reported as OFFLINE (Intentional OFFLINE).
For the KVM environment, Veritas recommends the use of CVM and CFS for live migration where a virtual image needs to be simultaneously accessible on a source and destination node.
Cluster Server (VCS) has introduced a new migrate operation for initiating service group migration. The KVMGuest agent has implemented a "migrate" entry point to initiate virtual machine migration in KVM and RHEV environment. You can initiate a virtual machine live migration using the hagrp -migrate command.
The syntax for the command is:
#hagrp -migrate service_group_name -to destination_node_name
To verify the password-less SSH requirement for live migration
# virsh "connect qemu+ssh://destination_node/system; list"
If this command asks for a password, then password-less SSH is not set between source and destination node.
If proper output is returned, then password-less SSH is set properly.
To configure VCS to initiate virtual machine migration
# hasys -modify sys_name PhysicalServer physical_server_name
# haconf -makerw # hasys -modify sys_name PhysicalServer "'hostname'"
The PhysicalServer name is used while initiating the migration.
The KVMGuest Agent migrate entry point: