diff --git a/playbooks/xcp_xo_vm_migrate.yml b/playbooks/xcp_xo_vm_migrate.yml new file mode 100644 index 0000000..6098b71 --- /dev/null +++ b/playbooks/xcp_xo_vm_migrate.yml @@ -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 \ No newline at end of file