vsphere_static_160x300
Free Business and Tech Magazines and eBooks
Badges

vexpert_logo_100x57

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

Quick Migration PowerShell script for VMware VI Foundation

I missed Mike DiPetrillo’s Deploying VMware in a Microsoft Shop session at VMworld 2008, but Mike apparently provided a PowerShell example of automating the migration of an Ubuntu VM between ESX hosts without using VMotion. This script would be a great alternative to a cold migration for VI Foundation customers. Mike has now posted his script and a video of a demo on his blog.

From the VMware Field: Mike D’s Virtualization Blog: Quick Migration for VMware – The Power of PowerShell shows off the script and flirts with comparing this ability to the Microsoft Hyper-V Quick Migration feature.

“One of the things that was also brought up over and over again in the debate was the fact that Quick Migration was free and came with Hyper-V since it was based on Microsoft Clustering whereas VMware VMotion was only available in the most expensive Enterprise SKU of VMware Infrastructure. So there it was – I need to create Quick Migration for the lower priced and free VMware solutions. I went off, built my little script, and showed it off at VMworld. There was a GREAT response to it so I’m posting it here for others to use or improve upon however you see fit.

The script works just like Microsoft Quick Migration – the virtual disk is stored on shared storage, the VM is suspended to disk, and the VM is then resumed on the destination.”

Mike provides the various requirements and the links later in his post.

To set this up in your environment you’ll need a few things:

  1. 2 VMware Infrastructure 3 hosts
  2. Windows PowerShell (and all of the pre-requirements for that if needed)
  3. VMware Infrastructure Toolkit (for Windows)
  4. The VM Migrator script from me
  5. A VM you want to migrate – it doesn’t matter what the guest OS is

Read the entire post and watch the video at the link above. Mike comments at the end of his post that the shared storage requirement is actually not necessary, but without it makes the script take much longer when copying between local storage on ESX hosts. Obviously, if you are considering this script as an alternative for providing Quick Migration -like availability then shared storage is preferred.

I also noticed that Mike does not list VirtualCenter as a requirement, but the demo video shows one of the script’s first prompts is asking for the VC server name. The VI Foundation bundle provides a license for VC so it still makes this script appropriate for environments without VMotion, but Mike states that he created the script for the free versions of VMware products as well. I’m sure modifcation of Mike’s original PowerShell script used for the demo will make this work in any VMware Infrastructure.

Related Posts

blog comments powered by Disqus
Hyper9 Cowabunga
Support VM /ETC
Support VMETC.com

Support VMETC.com

@rbrambley tweets
Advertisements
VMTN Roundtable Podcasts
Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo