Restore vApp in vCloud Director to different resources

PowerShell script exchange

Restore vApp in vCloud Director to different resources

Veeam Logoby vmm » Mon Nov 30, 2015 12:25 pm

Hi!

We need to do a script which can restore a vApp in vCloud Director no only to different OrgVDC or Organization but also to a different resources if they are unavailable (datastore and other settings).

Code: Select all
$restoreparams=Get-VBRRestorePoint -Backup $backup | Where {$_.Name -eq "vApp_01"} | New-VBRvCloudVAppRestoreSettings
$restoreparams.OrgVdc=Find-VBRvCloudEntity -OrganizationVdc -Name "Org_02"
$restoreparams.Org=Find-VBRvCloudEntity -Organization -Name "Org_02"
Start-VBRvCloudRestoreVApp -RestoreParams $restoreparams
vmm
Service Provider
 
Posts: 15
Liked: never
Joined: Mon Nov 23, 2015 10:09 am
Full Name: Marat Akhmetianov

Re: Restore vApp in vCloud Director to different resources

Veeam Logoby vmm » Mon Nov 30, 2015 2:01 pm

As far as I see for vApp we can't do that. The only possible solution is for VM.

What is wrong with these commands:
Code: Select all
$restorepoint = Get-VBRBackup -Name "cloud" | Get-VBRRestorePoint -Name *vApp-Templ-CentOS-7* | Sort-Object $_.creationtime -Descending | Select -First 1
$vapp = Find-VBRvCloudEntity -vApp -Name "vApp_CentOS7_V3"
$profile = Find-VBRvCloudEntity -StorageProfile -Name *
$datastore = Find-VBRvCloudEntity -Datastore -Name "Solidfire-test-1"
$template = Find-VBRvCloudEntity -VmTemplate -Name "vApp-Templ-CentOS-7"
Start-VBRvCloudRestoreVm -RestorePoint $restorepoint -vApp $vapp -StorageProfile $profile -vCloudDatastore $datastore -VmTemplate $template -PowerUp
vmm
Service Provider
 
Posts: 15
Liked: never
Joined: Mon Nov 23, 2015 10:09 am
Full Name: Marat Akhmetianov


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 6 guests