PowerShell script exchange
Post Reply
steegy
Novice
Posts: 4
Liked: never
Joined: Nov 13, 2014 7:49 am
Full Name: kevin
Contact:

Start-VBRvCloudInstantRecovery not working

Post by steegy »

Hello,

I'm trying to create a powershell script, that will do an "Instant Recovery" restore from a customer's vmware backup (non-vCloud backup), to a vCloud Director vApp.
This does not seem to be possible from the GUI, since you can only select the option "Instant VM Recovery", instead of "Instant VM Recovery --> Into vCloud vApp".

So I started using powershell to do this, but I seem to have found an issue with the "Start-VBRvCloudInstantRecovery" command.
This is the script I'm testing with:


Add-PSSnapin VeeamPSSnapin
$CustBackupJobName = "DEMO1*"
$vmcounter = Get-VBRBackup -Name $CustBackupJobName | Select-Object VmCount
$vmcounter2 = $vmcounter.vmcount
$vmrestorepoints = Get-VBRBackup -Name $CustBackupJobName | Get-VBRRestorePoint -Name * | Select -Last $vmcounter2

foreach ($vmrestorepoint in $vmrestorepoints) {
echo $vmrestorepoint
Start-VBRvCloudInstantRecovery -Restorepoint $vmrestorepoint
}

This script will list the amount of VM's in a backup, and use the last created version for each VM.
I didn't specify a target vApp or VDC yet, but when I want to start the restore, I keep getting the error "There is no oib with id '00000000-0000-0000-0000-000000000000'". I've tried every possible VM-ID in the "-Restorepoint" option, but I just will not accept anything.

I've tried contacting Veeam support, because I suspect there is an issue with the "Start-VBRvCloudInstantRecovery" command, but this is their answer;

Seems like we can not pipe Veeam.Backup.Core.COib type to the System.String.
I would recommend searching and posting on our forums for assistance with crafting such a script.


Can someone please help me with this?

Thanks in advance
tsightler
VP, Product Management
Posts: 6009
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Start-VBRvCloudInstantRecovery not working

Post by tsightler »

As far as I know what you are trying to accomplish isn't supported via Powershell either. To be able to restore into vCloud Director the VM had to be backed up as part of a vApp. You can't just take a "regular" VM backed up from vSphere and perform a vCloud Instant Recovery on it.

You could perform an traditional vSphere based Instant Recovery and then use the vCloud PowerCLI to import those VMs into vCD. Example:
http://www.simongreaves.co.uk/import-vm ... -powercli/
steegy
Novice
Posts: 4
Liked: never
Joined: Nov 13, 2014 7:49 am
Full Name: kevin
Contact:

Re: Start-VBRvCloudInstantRecovery not working

Post by steegy »

Hi tsightler,

Thanks for the quick reply.
I was hoping to avoid a restore before being able to import the VM's into vCloud director.
That's why the Instant recovery from vSphere to vCloud Director would be an ideal solution for customers that want a disaster recovery solution to vCloud, if you import their local backups from a Veeam Cloud Connect server first
Anyway, I guess Instant Recovery to vCloud is not an option then.

Thanks again.

best regards,
Kevin
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests