Automation · VMware Automation
vMotion
Cheat sheet · https://pcornel.dk/topic.php?topic=5739
Answer
vMotion automation moves running VMs between hosts with Move-VM, for maintenance or balancing, checking compatibility and network settings first.
Remember
- Move-VM performs vMotion.
- Check compatibility first.
- Network settings must match.
First checks
Move-VM -VM <vm> -Destination <host>— vMotionMove-VM -VM <vm> -Datastore <ds>— Storage vMotionSet-VMHost -VMHost <h> -State Maintenance -Evacuate— maintenance mode
Verify in this order
maintenance → evacuate (vMotion) → patch → exit maintenance
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5739