Monitor Quick Migration Progress

PowerShell script exchange

Monitor Quick Migration Progress

Veeam Logoby tsightler » Wed Nov 20, 2013 8:32 pm

It's very easy to start a Quick Migration job with Powershell, however, I can't find any way to monitor the progress or to know when it's complete. Is it hiding somewhere that I just can't find?
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Monitor Quick Migration Progress

Veeam Logoby tsightler » Thu Nov 21, 2013 2:59 am

I still haven't found any method to monitor the progress of a Quick Migrate using Veeam session data, but I did figure out a crude method to determine when the migration is complete by querying the disk path of the VM.
Code: Select all
$VMName = "<VM_Name>"
$TargetDatastore = "<Datastore_Name>"
do {
    $VMDataStorePath = (Find-VBRViEntity -DatastoresAndVMs -Name $VMName).Path.Split("\")
    $VMDataStore = $VMDataStorePath[$VMDataStorePath.Length-2]
    if ($VMDataStore -ne $TargetDatastore) {
        Sleep 30
    } else {
        Write-Host "Migration Complete:" $VMName
    }
} while ($VMDataStore -ne $TargetDatastore)

I'm still interested in finding a better way if anyone knows of a better option, but this seems to work fairly well.
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests