Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ for Hyper-V Administrator's Guide
  3. Appendix C. NetBackup commands to back up and restore Hyper-V virtual machines
  4. Examples of nbrestorevm for restoring VMs to Hyper-V
  5. Hyper-V examples of restore to alternate locations
Veritas NetBackup™ for Hyper-V Administrator's Guide

Hyper-V examples of restore to alternate locations

For restore to an alternate location, NetBackup 8.0 adds new restore features for VMs that were backed up with the WMI method:

  • A new VM GUID is generated by default when you restore a VM to an alternate location.

    As an option, you can choose to keep the original GUID.

  • You can specify a new display name when you restore the VM.

A. Restore to a different location on the same Hyper-V server

nbrestorevm -vmhvnew - C VM_to_restore - R absolute_path_to_rename_file

In the -R option rename file, enter the full path to a text file that contains the following kinds of entries:

change /original_VM_GUID.xml_path to /new_VM_GUID.xml_path
change /original_VM_GUID.bin_path to /new_VM_GUID.bin_path
change /original_VM_GUID.vsv_path to /new_VM_GUID.vsv_path 
change /original_VM.vhd_path to /new_VM.vhd_path
	

Make sure to include all four change entries to specify locations for the VM's files (xml, bin, vsv, vhd). If any of the VM file paths are omitted, the restore may not succeed.

Note:

From the backups that were made with the WMI method, nbrestorevm generates a new VM GUID by default when you restore to an alternate location. To retain the original GUID, add the -vmid option.

Note:

Each change line must end with a carriage return.

Note:

If the - R option is omitted, the VM is restored to its original location.

See The nbrestorevm -R rename file for Hyper-V.

B. From a backup that a different master server made with the WMI method, restore to an alternate location and retain the VM's original GUID

nbrestorevm.exe -vmhvnew -C vm1.acme.com -S master44.acme.com -vmserver HVserver6.acme.com -vmid -R \C:\vmadmin\renamefile1

  • The -vmserver option specifies the restore destination (HVserver6.acme.com).

  • The -S option specifies the master server that made the WMI backup (different from the current master).

  • The -vmid option retains the original GUID for the restored VM. To generate a new GUID, omit the -vmid option.

  • The -R option identifies a text file that uses change directives to specify file paths for restore to the alternate location.

    Note:

    The -R option must specify the absolute path to the rename file. In this example, renamefile1 contains the following directives to change the VM's file paths at the alternate restore location:

change /F/VMs/vm1/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.VMRS 
to /D/VMs/vm1/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.VMRS
change /F/VMs/vm1/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.vmcx 
to /D/VMs/vm1/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.vmcx
change /F/VMs/vm1/Virtual Hard Disks/vm1.vhdx 
to /D/VMs/vm1/Virtual Hard Disks/vm2.vhdx
C. Restore to a different Hyper-V server, and wait for completion status from the server before returning to the system prompt

nbrestorevm -vmhvnew - C VM_to_restore - R absolute_path_to_rename_file -vm_server Hyper-V_server -w

The -vm_server option specifies the target server for the restore.

See example A or B for rename file examples.

D. Restore the virtual machine files to a staging location
nbrestorevm.exe -vmhvstage -S master44.acme.com -C vm6.acme.com -O 
-vmserver HVserver6.acme.com -R "C:\Program Files\Veritas\NetBackup
\Logs\44\Admin\logs\rfile4.tmp.chg" -L "C:\Program Files\Veritas\NetBackup
\Logs\44\Admin\logs\rfile4.tmp.log" 
  • The -vmhvstage option restores the virtual machine files to a staging location.

  • The -vmserver option specifies the host for the staging location.

  • The -L option specifies the name of an existing file in which to write progress information.

  • For restore to a staging location, NetBackup does not generate a new GUID.

  • The file rfile4.tmp.chg specifies the new paths for the virtual machine files at the staging location:

change /F/VMs/vm6/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.VMRS 
to /E/VMs/vm6/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.VMRS
change /F/VMs/vm6/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.vmcx 
to /E/VMs/vm6/2D7C007E-90FB-44EC-ABB2-6733D42A51F5.vmcx
change /F/VMs/vm6/Virtual Hard Disks/vm1.vhdx 
to /E/VMs/vm6/Virtual Hard Disks/vm2.vhdx

Feedback

Was this page helpful?
Previous

Hyper-V examples of restore to original location

Next

The nbrestorevm -R rename file for Hyper-V

Feedback

Was this page helpful?