I'm trying to automate Instant Disk Recovery with Powershell, and I have an issue with the documentation available.
https://helpcenter.veeam.com/docs/backu ... ml?ver=100
(Veeam 10.0.1.4854)
Example in https://helpcenter.veeam.com/docs/backu ... ml?ver=100
Code: Select all
$backup = Get-VBRBackup -Name "Winsrv4515"
$restorepoint = Get-VBRRestorePoint
$server = Get-VBRServer -Name "ESXiHost"
$vm = Find-VBRViEntity -Server $server -Name "Winsrv4515"
$device = Get-VBRViVirtualDevice -RestorePoint $restorepoint
Start-VBRViInstantVMDiskRecovery -RestorePoint $restorepoint[3] -TargetVM $vm -TargetVirtualDevice $device
Code: Select all
$server = Get-VBRServer -Name "tc3-lab-esx03.hosts.vdclab"
Find-VBRViEntity -Server $server -Name "Test-Veeam-API-Restore"
Code: Select all
$server = Get-VBRServer -Type VC -Name "vmwlab-tc3-vc01.vmwlab.local"
Find-VBRViEntity -Server $server -Name "Test-Veeam-API-Restore"
ConnHostId : e5dac1d0-9491-4200-acc3-6c320ce2d971
Type : Vm
Reference : vm-16053
Id : e5dac1d0-9491-4200-acc3-6c320ce2d971_vm-16053
Name : Test-Veeam-API-Restore
Path : vmwlab-tc3-vc01.vmwlab.local\TC3-Lab\TC3-Lab-Cluster\Test-Veeam-API-Restore
VmHostName : tc3-lab-esx03.hosts.vdclab
VmFolderName : Test-Env
IsLegacyFaultTolerance : False
FaultToleranceType : None
GuestInfo : Veeam.Backup.Model.CGuestInfo
Uuid : 4206e495-85d7-40a6-82ea-e4d703be0d3a
PowerState : PoweredOn
IsTemplate : False
ProvisionedSize : 462886744864
UsedSize : 462886743632
Platform : EVmware
Code: Select all
Start-VBRViInstantVMDiskRecovery -RestorePoint $restorepointVM[0] -TargetVM $vm -TargetVirtualDevice $restoredisk
Start-VBRViInstantVMDiskRecovery : There is no instant recovery session with ID '02e06ac7-0965-4c95-8db3-9e259f3c6be7'.
Au caractère Ligne:1 : 1
+ Start-VBRViInstantVMDiskRecovery -RestorePoint $restorepointVM[0] -Ta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VBRViInstantVMDiskRecovery], CAppException
+ FullyQualifiedErrorId : Veeam.Backup.Common.CAppException,Veeam.Backup.PowerShell.Cmdlets.StartVBRViInstantVMDiskRecovery
If I launch the Instant Disk Recovery through the Veeam Console, I can see that it will use the ESXi server...
What I am missing / doing wrong?
PS: is there a way to do this through API? Didn't manage to find it in the doc.