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

Script name:    massmigrate.ps1

$SourceHost=$args[0]
$DestinationHost=$args[1]
$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

Komentarze

Popularne posty z tego bloga

PROXMOX & GlusterFS - HA Cluster with shared redundant storage

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

DRBD 8.4 on Debian Jessie