PowerShell script exchange
Post Reply
sjutras
Service Provider
Posts: 22
Liked: 1 time
Joined: Oct 14, 2009 4:23 am
Contact:

Veeam v6 - Start-VBRRestoreVM use wrong datastore

Post by sjutras »

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
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Post by ThomasMc »

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"
sjutras
Service Provider
Posts: 22
Liked: 1 time
Joined: Oct 14, 2009 4:23 am
Contact:

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Post by sjutras »

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
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Post by ThomasMc »

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.
sjutras
Service Provider
Posts: 22
Liked: 1 time
Joined: Oct 14, 2009 4:23 am
Contact:

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Post by sjutras »

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
Service Provider
Posts: 22
Liked: 1 time
Joined: Oct 14, 2009 4:23 am
Contact:

Re: Veeam v6 - Start-VBRRestoreVM use wrong datastore

Post by sjutras »

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 :)
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests