New-VBRvCloudVAppRestoreSettings
Short Description
Creates a set of vApp restore parameters.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
New-VBRvCloudVAppRestoreSettings [-RestorePoint] <COib> [-vAppName <String>] [-OrgVdc <IVcdItem>] [-PowerUp] [-Reason <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>] |
Detailed Description
This cmdlet is an assistant command creating a CVcdVAppRestoreSettings object that is further used in the Start-VBRvCloudRestoreVApp cmdlet. This object gathers the parameters of a selected vApp that will be needed for restore.
The vApp that you want to restore and its parameters are derived from the specified restore point data. Use the -OrgVdc parameter to set another organization where you want to restore the vApp to.
You can customize any of the parameters that are derived from the restore point. For more information, see the Advanced Setup below.
Parameter | Description | Required | Position | Accept | Accept |
RestorePoint | Specifies the restore point of the vApp you want to restore the vApp to. | True | 1 | True (ByValue, | False |
vAppName | Specifies the name of the restored vApp. Use this parameter in case you want to restore the vApp with different name. | False | Named | False | False |
OrgVdc | Specifies the Organization vDC you want to restore the vApp to. If not set, the vApp will be restored to the original Organization vDC. | False | Named | False | False |
PowerUp | If set to True, the vApp will be powered up right after it is restored. Otherwise, you will need to power up the vApp manually. | False | Named | False | False |
Reason | Specifies the reason for performing restore of the selected vApp. The information you provide will be saved in the session history so that you can reference it later. | False | Named | False | False |
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Example
This command creates settings for the future restore of the vApp in another Organization vDC.
- The $restorepoint variable contains the restore point of the vApp. The restore point is obtained with Get-VBRRestorePoint and assigned to the variable beforehand.
- The $vdc variable contains the Organization vDC object where the vApp will be restored. The vDC object is obtained with Find-VBRvCloudEntity ([-OrganizationVdc]) and assigned to the variable beforehand.
- The PowerUp parameter is set to True to start the vApp automatically right after the restore.
$restoreparams = New-VBRvCloudVAppRestoreSettings -RestorePoint $restorepoint -vAppName "vApp01" -OrgVdc $Org |
Here you get the $restorepoint variable containing the vApp settings:
- vAppOib - the restore point of the vApp,
- OrgVdc - the organization vDataCenter where the vApp is registered,
- Vms - the list of VMs whithin the vApp,
- vAppName - the name of the vApp.
vAppOib OrgVdc Vms vAppName |
You can view the properties of the VMs within the vApp by typing "$restoreparams.vms":
- VmOib - the VM restorepoint,
- StorageProfile - the VM storage profile,
- vCloudDatastore - the datastore that the VM uses,
- VmTemplate - the VM template.
VmOib StorageProfile vCloudDatastore VmTemplate |
You need to specify the new organization to where you want to restore the vApp. The new organization object is assigned to the $org variable. All other VM parameters are set to null.
$restoreparams = New-VBRvCloudVAppRestoreSettings -RestorePoint $restoreparams.vms[0].vCloudDatastore=$null $restoreparams.vms[0].StorageProfile=$null $restoreparams.vms[0].VmTemplate=$null |
The $restoreparams variable now contains the data needed for the restore and can be used in the Start-VBRvCloudRestoreVApp cmdlet.
Related Commands
Find-VBRvCloudEntity ([-OrganizationVdc])