Monday, August 31, 2009

Power CLI - Quick Migrate VM to another host ( not using Vmotion)

VMware Quick Migration Function


Author: Justin Grote
Credit: Inspired by Mike DiPetrillo's Quick Migration Script: http://www.mikedipetrillo.com/mikedvirtualization/2008/10/quick-migration-for-vmware-the-power-of-powershell.html

Version: 0.1
Description: Performs the fucntional equivalent of a Hyper-V Quick Migration by suspending a VM,
moving it to a new host, and resuming it. This does not require vMotion licensing.
it works by providing required VM objects via the pipeline or the second argument,
and specifying the Destination host in the first argument.
The commeand accepts both text strings and VMHost objects for the VMHost Parameter
Prerequisites:
Powershell v1
VMWare PowerCLI 4.0 (May work with earlier version but not tested)

Instructions to Install: Save this script and import into your session with, for example, . C:\temp\quickmigrate.ps1
You can also include it in your PowerCLI profile to have it automatically included.
Command Usage: get-vm MyTestVM
Quick-MigrateVM "MyTestHost2"

Original Link
http://communities.vmware.com/docs/DOC-10441

Want to Learn Powershell for ESX?

A VI Toolkit Hands-on Lab Manual to help you started with Powershell and VMware

Top-10-PowerShell-scripts-that-VMware-administrators-should-use

No comments:

Post a Comment