NVP vProxy: How to get the exact command syntax for running a VM recovery from CLI with debug
Summary: This KB provides an overview of how to get the exact "nsrvproxy_recover" command syntax needed for performing a CLI debug Virtual Machine (VM) restore.
Instructions
nsrvproxy_recover commands require several switches and VMware Managed Object Reference (MoRef) values. This can be tricky to determine sometimes. This KB provides a process which allows you to generate the recover command needed by first creating an "NSR Recover" resource.
1. From the NetWorker Management Console (NMC), go to the Recover tab and select Recover->New Recover.
2. Choose The Virtual Machine Recovery type, then select the vCenter server the VM was backed up from:
3. Search for the VM and select it. Once selected it, appear in the Source virtual machine window:
4. Choose the save set date from the list of Available backups:
5. Choose the VM image recovery (In this example Virtual Machine Recovery):
6. Configure the Recovery options:
- Choose a target vCenter and location.
- Specify a name for the new VM.
- Select datastore locations for the VM files and disks.
- (Optional) Select if you would like for the VM to be powered on (default is no.)
- (Optional) Select if you would like for the VM to be connected to the network. This option is only available if you have also chosen to power on the VM.
- (Optional) Specify a vProxy appliance if you would like the restore to use a specific vProxy.
7. Choose the volume that you want to restore from:
8. Provide a Recover Name and select the option to Schedule recovery start at. Set the date a few days after the current date.
9. Click Schedule Recovery.
10. You should see the scheduled recovery job on NMC now:
11. On the NetWorker server, open an Administrator command prompt or root shell.
12. Run the nsradmin command to enter the nsradmin prompt.
A. From the nsradmin prompt, enter: show recover command; recover options
B. From the nsradmin prompt, use the print command to display the recovery resource created from the NMC.
print type: nsr recover; name: RECOVER_NAME_FROM_STEP_8
Example:
[root@nsr ~]# nsradmin NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. nsradmin> show recover command; recover options nsradmin> print type: nsr recover; name: CLI_Recover_Syntax recover command: nsrvproxy_recover; recover options: \ " -m I -c vcsa.amer.lan -M vm-17020 -V 'win-client01.amer.lan_1' -A datacente\ r-3 -L domain-c8 -F 'group-v4' -o P -o N -d 'Hard disk 1/2000/datastore-12' -E\ datastore-12 -p nsr-vproxy01.amer.lan -S 2801297820";
\. Copy out the command into Notepad++ and remove the \. The command should be one continuous line (see below). It is recommended to use notepad++ over regular notepad as notepad may change the encoding of special characters when copied back to a command prompt.
13. Run the recover command and recover options shown in the NSR Recover resource:
-D [1-9] debug levels and -v[vv] verbosity can be added to the command to increase logging levels. Other debugging can be applied on the vProxy appliance: NetWorker VMware Protection-vProxy: How to Enable Debug Logging. If the VM has multiple disk files, the disks can be recovered in parallel (concurrently) using the -k option. NetWorker 19.8 and later supports parallel VM disk restores.
nsrvproxy_recover -vvv -D9 -m I -c vcsa.amer.lan -M vm-17020 -V 'win-client01.amer.lan_1' -A datacenter-3 -L domain-c8 -F 'group-v4' -o P -o N -d 'Hard disk 1/2000/datastore-12' -E datastore-12 -p nsr-vproxy01.amer.lan -S 2801297820
The output can be redirected to a file by appending: > nsrvproxy_recover.out 2<&1
14. Monitor the output or collect the output file for further analysis.
15. Return to the NMC and Delete the scheduled restore so that it is not automatically started at the scheduled date and time.
Additional Information
- NVP vProxy: How to perform parallel (concurrent) recovery of multiple VMDKs
- NVP-vProxy: How to use the nsrvproxy_flr command for File Level Recovery from the NetWorker Server
- NVP-vProxy: How To Identify a VM Name From the UUID Presented In NetWorker
- NetWorker: How To Collect MoReF (Managed Object Reference) Values for VMware Objects
- NVP vProxy: How to manually clone a VM save set from a non-Data Domain device to a Data Domain clone device?
- NetWorker VMware Protection-vProxy: How to Enable Debug Logging.