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.

Moveall2

You can download this script from the Microsoft TechNet Gallery.

The script live migrates the VMs:

Moveall1

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..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s