Skip to content

Instantly share code, notes, and snippets.

@ahnooie
Created June 3, 2019 17:42
Show Gist options
  • Save ahnooie/1646336ed0bd23921c5c553578db5d66 to your computer and use it in GitHub Desktop.
Save ahnooie/1646336ed0bd23921c5c553578db5d66 to your computer and use it in GitHub Desktop.
VMware VMotion Datastore Storage Migration with Ansible Example
[vmware_guests]
vm1
vm2
vm3
vm4
---
- name: Perform storage vMotion of of virtual machine
hosts: vmware_guests
serial: 10
connection: local
tasks:
- name: move storage
vmware_vmotion:
hostname: "{{ vmware_hostname }}"
username: "{{ vmware_user }}"
password: "{{ vmware_pass }}"
validate_certs: no
vm_name: "{{ inventory_hostname }}"
destination_datastore: 'new_datastore'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment