Posts RSS Comments RSS 253 Posts and 411 Comments till now

Vmotion with VI ToolKit (Playing Around Series)

I wanted to show you how simple it was to VMotion with new CMDLets. I also want to point out the most if not all the VMware CMDLets return VM Objects so you could easily do something like
Get-VM MyVM | Stop-VM | Remove-CDDrive | Move-VM -Dest $EsxHost | New-CDDrive -isoPath $isoPath -StartConnected | Start-VM

Best Viewed Full Screen

Get the Flash Player to see this content.

Demo File

# Connect to Virtual Center
# Get ESX host
$esxHost = Get-VMHost
# Verify we got the correct ESX Host
# Get Virtual Machine
$vm = Get-VM SDK-XPSP2
# Verify We have the correct VM
# Test VM move with -whatif
Move-VM -VM $VM -Destination $EsxHost -whatif
# Lets do it for real
Move-VM -VM $VM -Destination $EsxHost

One Response to “Vmotion with VI ToolKit (Playing Around Series)”

  1. on 21 May 2008 at 4:28 pmhalr9000

    Luckily, nobody knows the password is eight asterisks.

Trackback this post | Feed on Comments to this post

Leave a Reply

You must be logged in to post a comment.