I am trying to perform vmotion of multiple VMs between 2 ESXi hosts using 
the vmare_vmotion module. We need to set a cap for memory utilization of 
the destination host to <= 70% and the storage utilization to <= 90%. 

Required result: VMs have to be migrated until the memory and storage 
utilization has reached. The loop should stop VM migration once the memory 
& storage threshold has reached.

- name: Perform storage vMotion and host vMotion of virtual machine
  vmware_vmotion:
    hostname: "{{ running_host }}"
    username: "{{ esxi_user }}"
    password: "{{ esxi_pass }}"
    validate_certs: no
    vm_name: "{{ item.guest_name }}"
    destination_host: "{{ destination_host }}"
    destination_datastore: "{{ item.name }}"
  delegate_to: localhost
  with_nested:
    - "{{vm_info.virtual_machines}}"
    - "{{ansible_datastore}}"

Any inputs is highly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bb91949f-3df7-4072-bf26-00d4d72cbb24%40googlegroups.com.

Reply via email to