Instant Recovery Powershell Error

PowerShell script exchange

Instant Recovery Powershell Error

Veeam Logoby gcanales » Tue Oct 01, 2013 5:59 pm

Hi, I'm new to powershell and need some help. Here are something I wrote to start a Instant recovery job

Code: Select all
$vm = "AD1"
$irvm = "IR-AD1"
$rp = Get-VBRBackup | where {$_.JobName -eq "job1"} | Get-VBRRestorePoint -Name $vm | Sort CreationTime -Descending | Select -First 1
$server = Get-VBRServer | where {$_.Name -eq "esx1.infragig.lab"}
$res = Find-VBRResourcePool -Server ($server) | where {$_.Name -eq "Resources"}

Start-VBRInstantRecovery -RestorePoint $rp -VMName $irvm -Server $server -ResourcePool $res

And the result is an error message I cannot figure out

Start-VBRInstantRecovery : Failed to start task using provider "vmsSharing". Task type: "mountVm". Task configuration:
"<vmNfsSharingInfo vmRegName="ID-AD1" oibID="00563664-f9d8-45df-a2cc-978180604b0b" powerOn="False"
shareCredsId="00000000-0000-0000-0000-000000000000" uiSessionId="b2fe3691-7b78-4afc-b000-e09154033161"><targetEsx
dbObjectID="b77b9c7e-1c3f-499f-801b-86282b3a4432" resPoolRef="ha-root-pool" resPoolName="Resources"
datacenterRef="ha-datacenter" folderRef="ha-folder-vm" restoreToOrigLocation="False" /><redoLogs isEnabled="False"
datastoreRef="" datastoreName="" /><restoreReason></restoreReason><networkSettings NICsEnabled="False"
/></vmNfsSharingInfo>".
En línea: 1 Carácter: 1
+ Start-VBRInstantRecovery -RestorePoint $rp -VMName $irvm -Server $server -Resour ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Veeam.Backup.Po...InstantRecovery:StartVBRInstantRecovery) [Start-VBR
InstantRecovery], CRegeneratedTraceException
+ FullyQualifiedErrorId : Backup,Veeam.Backup.PowerShell.Command.StartVBRInstantRecovery

Can someone could help me find out what am I doing wrong? :cry:

Thanks!
gcanales
Novice
 
Posts: 9
Liked: never
Joined: Sun Feb 24, 2013 6:51 pm
Full Name: Gilberto Canales

Re: Instant Recovery Powershell Error

Veeam Logoby v.Eremin » Wed Oct 02, 2013 10:23 am

Hmm, I haven’t seen this error so far. Though, I have a few questions:

• Is your resource pool, indeed, named “Resources” or you’ve just taken this line up from the provided example?
• What happens if you also specify a datastore?

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Instant Recovery Powershell Error

Veeam Logoby gcanales » Thu Oct 03, 2013 5:30 am

Hello Vladimir,

I've added the datastore info as you suggested, but got the same output

Code: Select all
Add-PSSnapIn -Name VeeamPSSnapIn
$jobName = Get-VBRjob | where {$_.Name -eq "job1"}
$vm = Find-VBRViEntity -Name AD1
$server = Get-VBRServer | where {$_.Name -eq "esx1.infragig.lab"}
$rp = Get-VBRBackup -Name job1 | Get-VBRRestorePoint -Name AD1 | Sort CreationTime -Descending | Select -First 1
$res = Find-VBRResourcePool -Server $server -Name "Resources"
$ds = Find-VBRDatastore -Server ($server) | where {$_.Name -eq "Nexenta-01"}
Start-VBRInstantRecovery -RestorePoint $rp -VMName($vm + "_IR") -Server $server -ResourcePool $res -Datastore $ds


PS C:\Users\VMReport> $rp


Info : Veeam.Backup.Model.COibInfo
Id : 72d649a2-9002-44ff-b76a-59e8d077c3b6
CreationTime : 02/10/2013 23:58:12
CreationTimeUtc : 03/10/2013 4:58:12
Type : Increment
Algorithm : Increment
PointId : bd481a1b-9c32-4f6d-8a7c-75785e86b432
ObjectId : 3a536a84-8e5a-4d9e-ade2-caac4f8aaddf
StorageId : 1462b595-8a71-4510-9490-3f61bf28f3c9
InsideDir : b77b9c7e-1c3f-499f-801b-86282b3a4432 (89)
IsFailoved : False
FailoverState :
IsCorrupted : False
IsConsistent : True
ApproxSize : 8589934592
VmName : AD1
Name : AD1
EffectiveMemoryMb : 1024
GuestInfo : Veeam.Backup.Model.CGuestInfo
ProcessID : -1
AuxData : Veeam.Backup.Core.CViOibAuxData
HvAuxData :



PS C:\Users\VMReport> $server


Info : esx1.infragig.lab
Id : b77b9c7e-1c3f-499f-801b-86282b3a4432
Name : esx1.infragig.lab
RealName : esx1.infragig.lab
Reference : ha-host
Description : Created by Powershell at 01/10/2013 11:46:42.
IsUnavailable : False
Type : ESXi
ApiVersion : Unknown
PhysHostId : fddc9a33-66f2-40d0-afe4-448c2ddb3043
ProxyServicesCreds :



PS C:\Users\VMReport> $res


Childs : {}
Type : ResourcePool
Ref : ha-root-pool
Id : ha-root-pool
Name : Resources
Path :
Parent : esx1.infragig.lab



PS C:\Users\VMReport> $ds


Uuid : 524ceea7-67d5bbd7-01c7-001b785700ec
Capacity : 96368328704
FreeSpace : 95350161408
FsId : Veeam.Backup.ViSoap.VmfsFileSystemId
MultipleHostsAccess : False
HostRefs : {ha-host}
DsPath : [Nexenta-01]
ScPath : /vmfs/volumes/524ceea7-67d5bbd7-01c7-001b785700ec
Childs : {}
Type : Datastore
Ref : 524ceea7-67d5bbd7-01c7-001b785700ec
Id : 524ceea7-67d5bbd7-01c7-001b785700ec
Name : Nexenta-01
Path :
Parent : esx1.infragig.lab



PS C:\Users\VMReport> Start-VBRInstantRecovery -RestorePoint $rp -Server $server -ResourcePool $res -Datastore $ds
Start-VBRInstantRecovery : Failed to start task using provider "vmsSharing". Task type: "mountVm". Task configuration:
"<vmNfsSharingInfo vmRegName="AD1" oibID="72d649a2-9002-44ff-b76a-59e8d077c3b6" powerOn="False"
shareCredsId="00000000-0000-0000-0000-000000000000" uiSessionId="18ed90d6-0d69-4860-acd6-aba1c0d7fd43"><targetEsx
dbObjectID="b77b9c7e-1c3f-499f-801b-86282b3a4432" resPoolRef="ha-root-pool" resPoolName="Resources"
datacenterRef="ha-datacenter" folderRef="ha-folder-vm" restoreToOrigLocation="False" /><redoLogs isEnabled="True"
datastoreRef="524ceea7-67d5bbd7-01c7-001b785700ec" datastoreName="Nexenta-01"
/><restoreReason></restoreReason><networkSettings NICsEnabled="False" /></vmNfsSharingInfo>".
En línea: 1 Carácter: 1
+ Start-VBRInstantRecovery -RestorePoint $rp -Server $server -ResourcePool $res -D ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Veeam.Backup.Po...InstantRecovery:StartVBRInstantRecovery) [Start-VBR
InstantRecovery], CRegeneratedTraceException
+ FullyQualifiedErrorId : Backup,Veeam.Backup.PowerShell.Command.StartVBRInstantRecovery


Also tried...

PS C:\Users\VMReport> Start-VBRInstantRecovery

cmdlet Start-VBRInstantRecovery en la posición 1 de la canalización de comandos
Proporcione valores para los parámetros siguientes:
RestorePoint: $rp
Server: $server
ResourcePool: $res
Start-VBRInstantRecovery : No se puede enlazar el parámetro 'RestorePoint'. No se puede convertir el valor "$rp" de
tipo "System.String" al tipo "Veeam.Backup.Core.COib".
En línea: 1 Carácter: 1
+ Start-VBRInstantRecovery
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-VBRInstantRecovery], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.PowerShell.Command.StartVBRInstantRecovery

PS C:\Users\VMReport> $rp


Info : Veeam.Backup.Model.COibInfo
Id : 72d649a2-9002-44ff-b76a-59e8d077c3b6
CreationTime : 02/10/2013 23:58:12
CreationTimeUtc : 03/10/2013 4:58:12
Type : Increment
Algorithm : Increment
PointId : bd481a1b-9c32-4f6d-8a7c-75785e86b432
ObjectId : 3a536a84-8e5a-4d9e-ade2-caac4f8aaddf
StorageId : 1462b595-8a71-4510-9490-3f61bf28f3c9
InsideDir : b77b9c7e-1c3f-499f-801b-86282b3a4432 (89)
IsFailoved : False
FailoverState :
IsCorrupted : False
IsConsistent : True
ApproxSize : 8589934592
VmName : AD1
Name : AD1
EffectiveMemoryMb : 1024
GuestInfo : Veeam.Backup.Model.CGuestInfo
ProcessID : -1
AuxData : Veeam.Backup.Core.CViOibAuxData
HvAuxData :


I very lost here, I'm running PowerShell 3.0, Veeam 6.5.0.144 (32-bit)

If you have any idea of what else I could try, please let me know...

Thanks!!
gcanales
Novice
 
Posts: 9
Liked: never
Joined: Sun Feb 24, 2013 6:51 pm
Full Name: Gilberto Canales

Re: Instant Recovery Powershell Error

Veeam Logoby v.Eremin » Thu Oct 03, 2013 10:01 am

Everything looks good with the script provided. So, you might want to contact support team and let them investigate it directly.

However, I’m wondering whether you’re able to instantly recover a given VM via GUI of backup server. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 6 guests