powervm_lpar_migration – validate, migrate and recover of the LPAR
Synopsis
Validate provided LPAR/s for migration
Migrate provided LPAR/s
Recover provided LPAR
Authenticate HMC
Parameters
- hmc_host (True, str, None)
The IP Address or hostname of the HMC.
- hmc_auth (True, dict, None)
Username and Password credential of the HMC.
- username (True, str, None)
Username of the HMC to login.
- password (optional, str, None)
Password of the HMC.
- src_system (optional, str, None)
The name of the source managed system.
- dest_system (optional, str, None)
The name of the destination managed system.
valid only for
validate
andmigrate
action operation.- vm_names (optional, list, None)
Name of the partition/s to be migrated/validated.
To perform action on multiple partitions, provide comma separated partition names or in list form.
For
recover
action only one partition name is allowed.- vm_ids (optional, list, None)
ID/s of the partition to be migrated/validated.
To perform action on multiple partitions, provide comma separated partition ids or in list form.
For
recover
action only one partition id is allowed.- all_vms (optional, bool, None)
All the partitions of the src_system to be migrated.
valid only for
migrate
action- remote_ip (optional, str, None)
If the destination managed system is not managed by the same management console that is managing the source managed system, then use this option to specify the IP address or host name of the management console that is managing the destination managed system. This option is mandatory for
authenticate
action and optional for other action- remote_username (optional, str, None)
Username of the remote HMC
This option can be used only with
authenticate
action- remote_passwd (optional, str, None)
Password of the remote HMC
This option can be used only with
authenticate
action- wait (optional, int, None)
The maximum time, in minutes, to wait for operation to complete
This option can be used only with
migrate
andvalidate
action- shared_proc_pool (optional, list, None)
list of the details of the shared processor pools to use on the destination managed system.
this parameter support single and multiple pools.
This option can be used only with
migrate
- lpar_name (optional, str, None)
Name of the partition to be migrated.
lpar_name and lpar_id are mutually exclusive.
- lpar_id (optional, int, None)
Id of the partition to be migrated.
lpar_name and lpar_id are mutually exclusive.
- pool_id (optional, int, None)
IDs of the shared processor pools to use on the destination managed.
pool_id and pool_name are mutually exclusive.
- pool_name (optional, str, None)
Names of the shared processor pools to use on the destination managed.
pool_id and pool_name are mutually exclusive.
- action (True, str, None)
validate
validate a specified partition/s.
migrate
migrate a specified partition/s from src_system to dest_system.
recover
recover a specified partition.
authenticate
adds SSH authentication key of remote management console.
Notes
Note
All the actions support passwordless authentication.
Examples
- name: Validate that the input partitions can be migrated to the destination
powervm_lpar_migration:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
src_system: <managed_system_name>
dest_system: <destination_managed_system>
vm_names:
- <vm_name1>
- <vm_name2>
action: validate
- name: Recover specifed vm_id from migration failure
powervm_lpar_migration:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
src_system: <managed_system_name>
vm_ids:
- <id1>
action: recover
- name: Migrate all partitions of the cec to remote HMC
powervm_lpar_migration:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
src_system: <managed_system_name>
dest_system: <destination_system_name>
remote_ip: <ipaddress of the remote HMC>
all_vms: true
action: migrate
- name: Migrate 2 partitions of the cec to another
powervm_lpar_migration:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
src_system: <managed_system_name>
dest_system: <destination_system_name>
vm_ids:
- <id1>
- <id2>
shared_proc_pool:
- lpar_id: <id1>
pool_id: <poolid1>
- lpar_id: <id2>
pool_id: <poolid2>
action: migrate
- name: Adds SSH authentication key of remote HMC.
powervm_lpar_migration:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
remote_ip: <IP Address of the remote HMC>
remote_username: <Username of the remote HMC>
remote_passwd: <Password of the remote HMC>
action: authenticate
Return Values
- system_info (always, dict, )
Respective partition migration information
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.