VMware PowerCLI - Mass Migrate all VM'v from one host to another

Script name:    massmigrate.ps1

$VMs = Get-VMHost $SourceHost | Get-VM | select Name
foreach ($VM in $VMs) {Get-VM -Name $VM.Name | Move-VM -Destination $DestinationHost –RunAsync}

Now we just simply run it:

PowerCLI X:> .\massmigrate.ps1 SourceHostIP DestinationHostIP


Popularne posty z tego bloga

PROXMOX & GlusterFS - HA Cluster with shared redundant storage

DRBD 8.4 on Debian Jessie

Site 2 Site tunnel with multiple identical subnets on remote sites - without virtual hosts ( Route Based VPN )