VMware vSphere

 View Only

 vMotion readiness script

VMwareGeek_'s profile image
VMwareGeek_ posted Apr 11, 2025 09:18 AM

Hi,

I need a script to get a result for a vMotion list for a cluster.

We have multiple clusters in different vcenters.
Each cluster has esxi hosts more than 10 to 90. Most of the clusters has multiple different application VMs.

There are DRS vm-rules for affinity and anti-affinity.
We want to save some hosts on each cluster to mark them as spare for our esxi upgrade period.
Planning vmotion for a large environment is a bit difficult for us we want to get a powershell or powercli script to provide us a list of possible vmotion list checking by cpu and memory resources used by vms and considering drs rules to give a result with this subjects; "Source Host, VM name, Destination Host, vMotion readiness (ready/not ready)

After this result we will plan vmotion tasks for available maintenance windows.

Do you have any scripts similar to this need?