The requested article is not available. Either it doesn't apply to this version of the product or the relevant information is organized differently in this version of the docs. You can search, browse, or go back to the other version.
REST API workflow to restore VMs
To restore VM backups with the SnapCenter Plug-in for VMware vSphere REST APIs, follow the required sequence of REST API calls as outlined below.
For each REST API, add https://<server>:<port>
at the front of the REST API to form a complete endpoint.
Step |
REST API |
Comments |
1 |
Go to http://<vCenter-IP>/mob |
Find the VM moref from the VMware Managed Objects URL.
Note the moref for the VM that you want to restore. |
2 |
/4.1/vm/{moref}/backups
|
Get VM Backups gets a list of backups for the specified VM.
Pass the moref from Step 1.
Note the backupId of the backup you want to restore.
|
3 |
/4.1/vm/backups/{backupId}/
snapshotlocations
|
Get snapshot locations gets the location of the snapshot for the specified backup.
Pass the backupId from Step 2.
Note the snapshotLocationsList information.
|
4 |
/4.1/vm/{moref}/backups/
availableesxhosts
|
Get available ESX Hosts gets the information for the host on which the backup is stored.
Note the availableEsxHostsList information.
|
5 |
/4.1/vm/{moref}/backups/
{backupId}/restore
|
Restore a VM from a backup restores the specified backup.
Pass the information from Steps 3 and 4 in the restoreLocations attribute.
|
If the VM backup is a partial backup, set the restartVM parameter to "false".
|
|
You cannot restore a VM that is a template.
|
|