Add playbooks/xcp_xo_vm_migrate.yml
This commit is contained in:
17
playbooks/xcp_xo_vm_migrate.yml
Normal file
17
playbooks/xcp_xo_vm_migrate.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: Migrate VM with Memory
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
vm_to_migrate: "my_workload_vm"
|
||||
destination_host: "xcp-node-02"
|
||||
|
||||
tasks:
|
||||
- name: Migrate {{ vm_to_migrate }} to {{ destination_host }}
|
||||
community.general.xen_orchestra_vm:
|
||||
api_url: "{{ xo_host }}"
|
||||
api_user: "{{ xo_user }}"
|
||||
api_password: "{{ xo_password }}"
|
||||
name: "{{ vm_to_migrate }}"
|
||||
host: "{{ destination_host }}"
|
||||
state: present # Ensures VM stays running during/after migration
|
||||
Reference in New Issue
Block a user