The following steps describe how to live migrate a VM using the Novalink command line.
In this example, I want to move the VM named “xwing” from FRAME1 to FRAME2.
I will use the “pvmctl vm migrate” command to achieve this outcome.
$ pvmctl vm migrate help
usage: pvmctl [help | --help] LogicalPartition migrate {--object-id | -i} <LogicalPartition field>=value {args}
optional arguments:
--mgmt-usr MGMT_USR The user ID to use on the target PowerVM management
platform.
--timeout TIMEOUT Maximum number of seconds for job to complete. If not
specified, will not timeout.
--sys SYS The name of the managed system to migrate to.
--validate Indication of whether to just validate the migration or
actually perform it. Default: False.
help arguments:
help show this help message and exit
--help show this help message and exit
identifier arguments:
--object-id id=value, -i id=value
Identifier used when querying for an object type. Specified as a name=value pair. Example: --object-id name=value
required arguments:
--mgmt-svr MGMT_SVR Required. The IP of the PowerVM management platform
managing the target host.
The source and destination machines and Novalink partition details are:
Source Machine = FRAME1
Source Novalink IP = 10.1.1.17
Destination Novalink IP = 10.1.1.16
Destination Machine = FRAME2
Prior to the live migrate (LPM), I configure SSH
communication between the padmin accounts on both the source and
destination Novalink partitions. This is accomplished using the “pvmctl sys add-auth-key” command.
$ pvmctl sys add-auth-key help
usage: pvmctl [help | --help] ManagedSystem add-auth-key {args}
required arguments:
--key KEY The new authorized public key to be added, if it does
not already exist.
identifier arguments:
--object-id id=value, -i id=value
Identifier used when querying for an object type. Specified as a name=value pair. Example: --object-id name=value
help arguments:
help show this help message and exit
--help show this help message and exit
Example:
$ pvmctl sys add-auth-key --key "$(ssh padmin@<other host> pvmctl sys list-public-key)"
$ pvmctl sys list-public-key
ssh-rsa DDDDB3NzaC1yc2EFDDDDAQABAAABAQC1tsHMYia7mR+2hzV7FPciUAg2bBP+X19mUyMtRTpvwhfDGlpuXMst/+YlGdaGKTB2343w/dx/5zuMDS3NApd5oVbQCMRH6eCmh+e2c1v+o4pHpxtEDETvsif+wW+yk13B2W6ZeZRAfISazH+d4uf4GXnMZ/3TtK7K5oNqinGa3xNGnbACyHGp/xwT14x5SHSws7wb4/7WLDKnmn4fqBz8639EpQCTqjpuPB3K8hq8y2/7Lc5dBj2zsJcLSAn+oH42SnedTwq6x90/pNXNFaApeyNDIZjFdr+lqpsvpYC3wnCOLK/7NBt0p50AVvRa2Y3LzVHaBxSerkcshcr90abc root@novalink-FRAME1
List the current (source) managed system, FRAME1.
padmin@novalink-FRAME1:~$ pvmctl sys list
Managed System
+----------------------------+------------------+--------+----------+------+-----------+
| Name | MTMS | Mem | Free Mem | Proc | Free Proc |
+----------------------------+------------------+--------+----------+------+-----------+
| FRAME1 | 8284-22A*999A9W | 262144 | 220160 | 10.0 | 6.3 |
+----------------------------+------------------+--------+----------+------+-----------+
List VMs on FRAME1.
padmin@novalink-FRAME1:~$ pvmctl vm list
Logical Partitions
+---------------------------------+----+---------+--------+-----------+---------------+------+-----+-----+
| Name | ID | State | RMC | Env | Ref Code | Mem | CPU | Ent |
+---------------------------------+----+---------+--------+-----------+---------------+------+-----+-----+
| novalink-FRAME1 | 3 | running | ---- | AIX/Linux | Linux ppc64le | 8192 | 2 | 1.0 |
| xwing-99eda99c-00000017 | 4 | running | active | AIX/Linux | | 6144 | 2 | 0.2 |
+---------------------------------+----+---------+--------+-----------+---------------+------+-----+-----+
Validate the Live Migration. Does not actually migrate the VM.
padmin@novalink-FRAME1:~$ pvmctl vm migrate -i id=4 --mgmt-svr 10.1.1.16 --validate
Validating logical partition xwing-99eda67c-00000017 migration...
Validation of logical partition xwing-99eda67c-00000017 succeeded.
Migrate the VM from FRAME1 to FRAME2.
padmin@novalink-FRAME1:~$ pvmctl vm migrate -i id=4 --mgmt-svr 10.1.1.16
Migration of logical partition xwing-99eda99c-00000017 starting. This may take a while.
Migration of logical partition xwing-99eda99c-00000017 succeeded.
List the destination managed system, FRAME2.
padmin@novalink-FRAME2:~$ pvmctl sys list
Managed System
+----------------------------+------------------+--------+----------+------+-----------+
| Name | MTMS | Mem | Free Mem | Proc | Free Proc |
+----------------------------+------------------+--------+----------+------+-----------+
| FRAME1 | 8284-22A*999A8W | 262144 | 220160 | 10.0 | 6.3 |
+----------------------------+------------------+--------+----------+------+-----------+
List VMs on FRAME2. The VM xwing is shown, in a running state, on this system.
padmin@novalink-FRAME2:~$ pvmctl vm list
Logical Partitions
+---------------------------------+----+---------+--------+-----------+---------------+------+-----+-----+
| Name | ID | State | RMC | Env | Ref Code | Mem | CPU | Ent |
+---------------------------------+----+---------+--------+-----------+---------------+------+-----+-----+
| novalink-FRAME2 | 3 | running | ---- | AIX/Linux | Linux ppc64le | 8192 | 2 | 1.0 |
| xwing-99eda99c-00000017 | 4 | running | active | AIX/Linux | | 6144 | 2 | 0.2 |
+---------------------------------+----+---------+--------+-----------+---------------+------+-----+-----+
Note: Be careful! if you just migrate without
validating first, and if the vlan tag id is absent on the target, you
will migrate but then lose the network on your vm... It doesnt check it
first (on HMC, migration is preceded by validation, no such thing on
novalink...). Thanks to Christophe Rousseau for the safety tip.
Note: Be careful if you migrate a VM that
is under the control of PowerVC. PowerVC may or may not (more likely
not) recognise that the VM has moved to a different Host. As this is
considered an "out of band" operation, PowerVC may never recover from
this state automatically and may require manual intervention to resolve.
Tags:
partition
the
live
gibson
powervm
line
mobility
aix
vios
novalink
chris
command
from