Veeam v6 - Start-VBRRestoreVM use wrong datastore

PowerShell script exchange

Veeam v6 - Start-VBRRestoreVM use wrong datastore

Veeam Logoby sjutras » Thu Feb 16, 2012 1:21 am

Hi,

Using Veeam v6, when issuing this command:

Start-VBRRestoreVM -RestorePoint ($rp) -Server ($server) -ResourcePool ($res) -Datastore ($datast) -VMName "alba-UbuntuTrg"

It seems that the wrong datastore is passed to the job. Instead of using what is in $datast, it is using the source datastore (where the VM was backedup from), resulting in a failed restore.
If using the GUI to start the restore job, it works fine.

Any hints?

Thanks
Seb
sjutras
Influencer
 
Posts: 19
Liked: never
Joined: Wed Oct 14, 2009 4:23 am

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Veeam Logoby ThomasMc » Thu Feb 16, 2012 11:30 am

What type is your datastore object though? was it a string? I imagine it should look something like this

Code: Select all
$server = Get-VBRServer -Name "ESXi01"
$datast = Find-VBRDatastore -Server $server -Name "SSD-DST"
Start-VBRRestoreVM -RestorePoint ($rp) -Server ($server) -ResourcePool ($res) -Datastore ($datast) -VMName "alba-UbuntuTrg"
ThomasMc
Expert
 
Posts: 293
Liked: 17 times
Joined: Wed Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Veeam Logoby sjutras » Fri Feb 17, 2012 3:55 am

Here,s how i do it:

Code: Select all
$esx = 192.168.0.1  (fictive ip)
$vmname = "somevmname" (ficitive name)
$datast = Find-VBRDatastore -Server ($esx) | where {$_.Name -eq "datastore-name"}
$res = Find-VBRResourcePool -Server ($esx) | where {$_.Name -eq "Resources"}
$rp = Get-VBRBackup | Get-VBRRestorePoint | where {$_.Type -eq "Full" -and $_.VmName -eq $vmname}
Start-VBRRestoreVM -RestorePoint ($rp) -Server ($esx) -ResourcePool ($res) -Datastore ($datast) -VMName $vmname


The process seems to executing fine, just that the datastore used for the restore is not the one found by the find-vbrdatastore cmdlet, but it is the one that is used on the source (production environnement)

Seb
sjutras
Influencer
 
Posts: 19
Liked: never
Joined: Wed Oct 14, 2009 4:23 am

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Veeam Logoby ThomasMc » Fri Feb 17, 2012 12:13 pm

I would probably suggest opening a support ticket on this one, I've got no way of testing it at the moment but if the cmdlet is broken then the support team can get it escalated to be fixed in a later builds.
ThomasMc
Expert
 
Posts: 293
Liked: 17 times
Joined: Wed Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Veeam Logoby sjutras » Fri Feb 17, 2012 2:26 pm

A support ticket is indeed opened since 2 days already, no news yet, why i was checking in here in case it would of been something in my syntax :)
sjutras
Influencer
 
Posts: 19
Liked: never
Joined: Wed Oct 14, 2009 4:23 am

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Veeam Logoby sjutras » Mon Feb 27, 2012 3:42 am

For your information, support reported that this is a bug and that it is now escalated to r&d tier 3. Hopefully a patch soon :)
sjutras
Influencer
 
Posts: 19
Liked: never
Joined: Wed Oct 14, 2009 4:23 am


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests