Powershell script to live migrate all running VMs including storage from one host to another
Powershell Script to live migrate all running VMs; including storage; from one host to another. Enter the source and destination host names (or IPs) in lines 4 and 5. Enter the drive letters of the destination host where you wish to live migrate the source host VMs to in line 6.
You can download this script from the Microsoft TechNet Gallery.
The script live migrates the VMs:
It also leaves 2 files on the folder where it runs:
– A log file that shows different information about the source and destination hosts, and the VMs being migrated.
– A CSV file that shows one record per migrated VM listing the source path of each of its disks. This may be useful for failback..