HP-UX vPars and Integrity VM V6.1.5 Administrator Guide (5900-2295, April 2013)
12.2 Command line interface for online and offline migration
To migrate a virtual machine to another VSP, perform the following steps:
1. Set up SSH keys on both the source and target hosts, as described in Section 12.3.3 (page 214).
2. Present all SAN storage assigned to the virtual machine to the target VSP (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 11 (page 169).
4. On the source host, enter the hpvmmigrate command, as described in Section 12.2.1
(page 203). 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 VSPs, 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 VSP, 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 VSP, you can remove the virtual
machine configuration with the hpvmremove command. Once the guest is removed from the
VSP, 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.
12.2.1 Using the hpvmmigrate command
Use the hpvmmigrate command to move an online guest or an offline virtual machine or vPar
from a source VSP to a specified target VSP. Virtual machines and vPars can be migrated while
OFF, and online guests can be migrated while ON and running. Use the -o option with virtual
machines 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 or vPar's configuration information, and optionally local
disk contents, to the target VSP.
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 VSP. If there is a problem,
12.2 Command line interface for online and offline migration 203