Home > PowerCLI, Scripting, VMware > VMware bulk vMotion via PowerCLI

VMware bulk vMotion via PowerCLI

Unfortunately VMware licesning for Enterprise and Enterprise Plus is not cheap. Some of the customers I work with cannot afford this licensing so they get Advanced and miss out on DRS. One of my biggest issues with this is putting hosts into Maintenance mode, although the host will start entering maintenance mode it cannot automagically move all the VM’s off onto other hosts. I get around having to manaully migrate each VM I use the following script. It’s limited to moving all the VM’s from one host to one other host, enjoy!

Get-VM -Location (Get-VMHost ‘sourcehostname’) | Move-VM -Destination (GetVM-Host ‘destinationhostname’)

PowerCLI rocks!

http://www.vmware.com/support/developer/windowstoolkit/wintk40/doc/viwin_admg.pdf

Advertisements
Categories: PowerCLI, Scripting, VMware
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: