Powercli Storage Vmotion Script

Powercli script vmware storage vmotion automation.
Powercli storage vmotion script. Here are a couple of quick storage vmotion scripts easy enough but they come in useful when moving to a new datastore. Storage vmotion then creates a child disk for each virtual machine disk that is being moved to capture a copy of write activity while the parent disk is in read only mode. Powercli storage vmotion vms from one datastore to another january 20 2016 shanfitz script synopsis reason created we are doing a good bit of underlying infrastructure work on our san environments so we needed a script to move all vms from an old datastore to a new or different datastore. I recently got a task to migrate more than 100 vmware virtual machine from one sets of datastores to another.
They will obviously be bound by the amount of concurrent svmotions allowed for your version of esx the rest will queue until others have completed. In order to automate this process i draft a simple powershell script to perform below tasks. Vmware vmotion moves vms between hypervisors and storage devices to keep those vms running. This helps me evacuate vms from a datastore that will be decommissioned and this serves like an automation.
You can use powercli to easily automate complex vmotion tasks. The child disk is re parented to the newly copied parent disk in the new location.