HP Integrity Virtual Machines 4.3: Installation, Configuration, Administration
9.2 Command Line Interface for Online and Offline Migration
To migrate a virtual machine to another VM Host, perform the following steps:
1. Set up SSH keys on both the source and target hosts, as described in Section 9.3.3 (page 190).
2. Present all SAN storage assigned to the virtual machine to the target VM Host (if it is not
already there).
3. If using offline migration and the guest is booted, stop the guest on the source host, using
the hpvmstop or hpvmconsole command. You can also use the hpvmmigrate -d
command to stop the guest during the migration. This has an advantage in that resource
checks are made on the target before the guest is stopped on the source. However, for many
cases, it is actually best to log into the guest and shut it down before starting an offline
migration. This ensures that all guest data is properly flushed to the disks.
For information about starting and stopping guests, see Chapter 8 (page 143).
4. On the source host, enter the hpvmmigrate command, as described in Section 9.2.1 (page 179).
When migrating an online guest, there are several reasons why the migration might abort,
leaving the guest running on the source host. Causes might include: insufficient resources
on the target host, excessively busy VM Hosts, a slow network connection, or an extremely
busy guest. If conditions like this exist, the attempted migration is aborted so the guest's
workload can continue running on the source host. This is not a serious problem, because
the migration can be re-attempted when conditions improve.
5. If migrating the guest offline, restart the guest on the target host using the hpvmstart or
hpvmconsole command. You can also use the hpvmmigrate -b option with an offline
migration to automatically restart the guest on the target.
6. If you do not use the hpvmmigrate -D option to remove the virtual machine configuration
on the source VM Host, it is marked Not Runnable, and it is configured with all its devices.
This protects the storage from unintended use by Integrity VM commands.
If you never intend to migrate the guest back to the source VM Host, you can remove the
virtual machine configuration with the hpvmremove command. Once the guest is removed
from the VM Host, you should unpresent the guest's SAN storage and remove the associated
device special files (using the rmsf command). Or, if you cannot unpresent the storage, you
should use the hpvmdevmgmt -a rdev:/device command for each device to mark them
restricted.
The hpvmmigrate command verifies that the target host has sufficient resources (such as
memory, network switches and storage devices) for the guest to run. If the resources are
insufficient or do not exist, or if other errors occur, the guest is not migrated to the target host.
After successfully migrating the guest, the hpvmmigrate command automatically disables the
guest on the source host.
9.2.1 Using the hpvmmigrate Command
Use the hpvmmigrate command to move an online guest or an offline virtual machine from a
source VM Host to a specified target VM Host. Virtual machines can be migrated while OFF,
and online guests can be migrated while ON and running. Use the -o option to migrate an online
guest, which involves copying all the virtual machine's configuration information and transferring
the active guest memory and virtual CPU state. Omit the -o option to migrate just the offline
virtual machine's configuration information, and optionally local disk contents, to the target VM
Host.
The resources that are defined in the virtual machine's configuration information are checked
to determine whether the migrated virtual machine can boot on the target VM Host. If there is
9.2 Command Line Interface for Online and Offline Migration 179