NetWorker: How to POST VMware VM Image Restores with REST API
Сводка: This KB gives a brief overview of how to perform VMware Virtual Machine (VM) image restores from the REST API.
Данная статья применяется к
Данная статья не применяется к
Эта статья не привязана к какому-либо конкретному продукту.
В этой статье указаны не все версии продуктов.
Инструкции
This KB gives a brief overview of how to perform VMware VM image restores from the REST API. The full REST API guide is available under: https://developer.dell.com/apis/2378/versions/v3/docs/GettingStarted.md
- You can query all protected VMs to get the VM UUID of the VM you are looking to restore. The syntax of the link would follow:
https://NETWORKER_SERVER:9090/nwrestapi/v3/global/vmware/vcenters/VCENTER_SERVER/protectedvms
- You must collect the needed VMware Managed Object Reference (MoRef) values for the specific VM you are looking to restore: The syntax of the link would follow:
https://NETWORKER_SERVER:9090/nwrestapi/v3/global/vmware/vcenters/VCENTER_SERVER/protectedvms/VM_UUID/backups
The needed values appear under the vm_info line and under the vmInformation section of the output.
Example:
- You can collect additional information by adding the backup ID to the GET request:
https://NETWORKER_SERVER:9090/nwrestapi/v3/global/vmware/vcenters/VCENTER_SERVER/protectedvms/VM_UUID/backups/BACKUP_ID
- To POST the restore, you would use the following link syntax:
https://NETWORKER_SERVER:9090/nwrestapi/v3/global/vmware/vcenters/VCENTER_SERVER/protectedvms/VM_UUID/backups/BACKUP_ID/op/recover
An example of the JSON body content would be replacing the values with the values collected in step 2 and 3:
{
"recoverMode": "New",
"datacenterMoref": "DATACENTER_MOREF",
"datastoreMoref": "DATASTORE_MOREF",
"computeResourceMoref": "COMPUTE_RESOURCE_MOREF",
"disks": [
{
"datastoreMoref": "DATASTORE_MOREF",
"key": "2000",
"name": "Hard disk 1"
}
],
"vCenterHostname": "VCENTER_NAME",
"hostMoref": "VCENTER_MOREF",
"vmName": "RESTORED_VM_NAME",
"powerOn": "true/false",
"reconnectNic": "true/false"
}
Example:
NOTE: Status 201 indicates that the request was submitted. This is an example of a full image restore in a specific environment. Properties and requirements could change based on the VMware environment.
The restore session is seen in the VMware client.
Generic Troubleshooting:
| Code | Description | Examples |
| 1XX | Informational | 100 - Continue |
| 2XX | Success | 200 - OK 201 - Created 202 - Accepted |
| 3XX | Redirection | 301 - Moved Permanently 307 - Temporary redirect |
| 4XX | CLIENT error | 400 - Bad request 401 - Unauthorized 404 - Not Found |
| 5XX | SERVER error | 500 - Internal server error 503 - Service unavailable. |
Дополнительная информация
Logs for the restore session can be found:
NetWorker server:
Linux:
/nsr/logs/recover/
Windows:
[INSTALL_DRIVE]:\Program Files\EMC NetWorker\nsr\logs\recover
vProxy used for restore: /opt/emc/vproxy/runtime/logs/recycle/vrecoverd/
NOTE: Once the restore has been completed it will be moved to:
/opt/emc/vproxy/runtime/logs/recycle/vrecoverd/DATE
Затронутые продукты
NetWorkerПродукты
NetWorkerСвойства статьи
Номер статьи: 000021344
Тип статьи: How To
Последнее изменение: 06 May 2025
Версия: 5
Получите ответы на свои вопросы от других пользователей Dell
Услуги технической поддержки
Проверьте, распространяются ли на ваше устройство услуги технической поддержки.