migrate_vm – Perform live or cold VM migration in IBM PowerVC
Synopsis
Supports live and cold VM migration in IBM PowerVC.
Live migration moves a running virtual machine.
Cold migration moves a powered off virtual machine.
Supports migration to a specified host or placement policy based host selection.
Supports cross host-group migration using ignore_az.
Parameters
- name (optional, str, None)
Name of the virtual machine to migrate.
- id (optional, str, None)
UUID of the virtual machine to migrate.
- host (optional, str, None)
MTMS of the target compute host.
If not specified, the destination host is selected using placement policy.
Required when ignore_az is set to true.
- type (True, str, None)
Type of migration to perform.
livemigrates a running virtual machine.
coldmigrates a powered off virtual machine.- ignore_az (optional, bool, False)
Allows migration across availability zones or host groups.
- block_migration (optional, bool, False)
Enables block migration during live migration.
Applicable only for live migration.
- disk_over_commit (optional, bool, True)
Enables disk overcommit during live migration.
Applicable only for live migration.
- force (optional, bool, False)
Forces live migration without scheduler verification.
Applicable only for live migration.
Examples
---
- name: Live migrate VM using VM name
hosts: localhost
gather_facts: false
tasks:
- name: Perform live migration using VM name
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
type: live
- name: Live migrate VM using VM ID
hosts: localhost
gather_facts: false
tasks:
- name: Perform live migration using VM ID
ibm.powervc.migrate_vm:
cloud: powervc
id: "8f4d9b4f-1234-5678-abcd-123456789abc"
type: live
- name: Live migrate VM with target host
hosts: localhost
gather_facts: false
tasks:
- name: Perform live migration to specific host
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
host: 828384A_215ABCD
type: live
- name: Live migrate VM with placement policy
hosts: localhost
gather_facts: false
tasks:
- name: Perform live migration using placement policy
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
type: live
- name: Live migrate VM with block migration
hosts: localhost
gather_facts: false
tasks:
- name: Perform block live migration
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
host: 828384A_215ABCD
type: live
block_migration: true
- name: Live migrate VM across host groups
hosts: localhost
gather_facts: false
tasks:
- name: Perform live migration across host groups
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
host: 828384A_215ABCD
type: live
ignore_az: true
- name: Cold migrate VM
hosts: localhost
gather_facts: false
tasks:
- name: Perform cold migration
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
type: cold
- name: Cold migrate VM with placement policy
hosts: localhost
gather_facts: false
tasks:
- name: Perform cold migration using placement policy
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
type: cold
- name: Cold migrate VM across host groups
hosts: localhost
gather_facts: false
tasks:
- name: Perform cold migration across host groups
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
host: 828384A_216ABCD
type: cold
ignore_az: true
- name: Force live migration
hosts: localhost
gather_facts: false
tasks:
- name: Perform forced live migration
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
host: 828384A_216ABCD
type: live
force: true
- name: Live migration with disk overcommit
hosts: localhost
gather_facts: false
tasks:
- name: Perform live migration with disk overcommit
ibm.powervc.migrate_vm:
cloud: powervc
name: test-vm
host: 828384A_217ABCD
type: live
disk_over_commit: true
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by PowerVC.