The nbrestorevm -R rename file for Hyper-V
The -R rename file is a text file that uses change directives to specify file paths for restore to a different location. The change directives specify the original paths of the VM's files (xml, bin, vsv, vhd) and the paths to the files when they are restored.
Note:
The -R option and rename file are not required when you restore the VM to its original location with all its original settings.
Note the following about restoring the VM to a different location:
You must use the -vmhvnew option on nbrestorevm (instead of the - vmhv option).
The -R option must specify the absolute path to the rename file.
Each change directive in the -R rename file must end with a carriage return.
The change directives can be in any order in the rename file.
The change directives take the following form:
change /original_VM_file_path to /target_VM_file_path
Use forward slashes (/) in the paths. See Table: Change directives for the -R rename file.
Unlike the Backup, Archive, and Restore interface, nbrestorevm does not validate its command options and rename file directives before the restore job begins. Make sure to include all required options and rename file change directives.
Table: Change directives for the -R rename file
-R rename file directives | Description and notes |
|---|---|
change /original_VM_GUID.xml_path to /new_VM_GUID.xml_path | The path to the VM's original .xml file and to the restored .xml file. |
change /original_VM_GUID.bin_path to /new_VM_GUID.bin_path | The path to the VM's original .bin file and to the restored .bin file. |
change /original_VM_GUID.vsv_path to /new_VM_GUID.vsv_path | The path to the VM's original .vsv file and to the restored .vsv file. |
change /original_VM.vhd_path to /new_VM.vhd_path | The path to the VM's original vhd file and to the restored vhd file. |