Can we invoke any script to capture the memory and datastore utilization?
On Thursday, 30 April 2020 00:26:53 UTC+5:30, Mani wrote:
>
> 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/a618aa95-c716-4b3a-a8fe-c16c3ac2d3a6%40googlegroups.com.