PowerCLI – vMotion VM between clusters

Thanks to my college Sebastian, here his linkedin profile , I have an opportunity to post very nice PowerCLI script. Script do vMotion VM between clusters \ vDS switches and storage.

What script does:

  1. Import list of the virtual machines to migrate
  2. reconfigure VM to use standard switch
  3. migrate VM to new cluster
  4. reconfigure VM to use new vDS switch and portgroup on new cluster

[box type=”info”]

  • variable $vCenter is not needed when you work only with one vCenter server
  • clusters belongs to different virtual distributed switches
  • storage between clusters isn’t shared

[/box]

 

Artur Krzywdzinski

Artur is Consulting Architect at Nutanix. He has been using, designing and deploying VMware based solutions since 2005 and Microsoft since 2012. He specialize in designing and implementing private and hybrid cloud solution based on VMware and Microsoft software stacks, datacenter migrations and transformation, disaster avoidance. Artur holds VMware Certified Design Expert certification (VCDX #077).