Forum Discussion

stucci's avatar
stucci
Level 6
9 years ago

How I restore Hyper-v VM in a different location

Hi all,

I do not understand how perform a restore of a VM Hyper-v in different Hyper-v server.

I have two cluster "SYSCLUHVP01M" (source) and "SYSCLUHVP01S" (destination) and each cluster has 2 node:

SYSHVP01M01

SYSCLUHVP01M

SYSHVP01M02

 

SYSHVP01S01

SYSCLUHVP01S

SYSHVP01S02

Both the clusters are under the same VMM (Virtual Machine Manager):

SYSSVCVMM02G

For restore I use "Backup, archive and restore" from master server and easily I arrive at this screen:

hyper2.JPG

1. I sected different Hyper-v server

2. I inserted the destination Hyper-v server

3. I can see that the destination is empty and I m not able to browse or fill manually.

4. If I try fill this field, I see ONLY the source directory, but I am not able to browse and select other path, a screenshot below:

hyper3.JPG

I can fill this field with any words, I do not understand.

 

Some information about this evironment:

Master server - OS Windows server 2012 standard - NBU 7.7.1

All cluster Hyper-v - OS windows server 2012 R2 Datacenter - NBU 7.6.1.1

 

Thank you for any suggestion and comment,

regards

  • Hello,

    Redirected restore of Hyper-V VM, using the GUI is completly broken/ineffective/half-implemented since years (HV customers really needs more love...). As shown in your screenshot, the restore path will include all the c\clusterstorage\etc.. crap.

    So, the only workaround is to use the command-line to perform the restore, using a "change file":

    nbrestorevm -vmhvnew -C [vm to restore] -R [path to the change file] -vmserver [any node of the target cluster]

    The change file must looks like:

    change /C/ClusterStorage/[myVM]/7BC92-8661-999925F01436.xml to /C/ClusterStorage/RestoredVMs/[myVM]/7BC92-8661-999925F01436.xml
    change /C/ClusterStorage/[myVM]/MyVM_C.vhd to /C/ClusterStorage/RestoredVMs/[myVM]/MyVM_C.vhd
    change /C/ClusterStorage/[myVM]/MyVM_E.vhd to /C/ClusterStorage/RestoredVMs/[myVM]/MyVM_E.vhd

    Basically one line per vm file, paths are in unix format.

    I personnaly use this command to generate a template file that I modify later to act as a change file:

    bplist -flops 33554432 -S [master server] -C [VM] -R 999 -t 29 -unix_files "/" > C:\Temp\MyChangeFile.txt

     

    I hope it helps.

     

     

     

     

     

     

  • Hello,

    Redirected restore of Hyper-V VM, using the GUI is completly broken/ineffective/half-implemented since years (HV customers really needs more love...). As shown in your screenshot, the restore path will include all the c\clusterstorage\etc.. crap.

    So, the only workaround is to use the command-line to perform the restore, using a "change file":

    nbrestorevm -vmhvnew -C [vm to restore] -R [path to the change file] -vmserver [any node of the target cluster]

    The change file must looks like:

    change /C/ClusterStorage/[myVM]/7BC92-8661-999925F01436.xml to /C/ClusterStorage/RestoredVMs/[myVM]/7BC92-8661-999925F01436.xml
    change /C/ClusterStorage/[myVM]/MyVM_C.vhd to /C/ClusterStorage/RestoredVMs/[myVM]/MyVM_C.vhd
    change /C/ClusterStorage/[myVM]/MyVM_E.vhd to /C/ClusterStorage/RestoredVMs/[myVM]/MyVM_E.vhd

    Basically one line per vm file, paths are in unix format.

    I personnaly use this command to generate a template file that I modify later to act as a change file:

    bplist -flops 33554432 -S [master server] -C [VM] -R 999 -t 29 -unix_files "/" > C:\Temp\MyChangeFile.txt

     

    I hope it helps.

     

     

     

     

     

     

    • arunprasad619's avatar
      arunprasad619
      Level 0

      Do you commands for Linux Media server? for restoring Hyper-v VM's from Linux media servers?

      • Marianne's avatar
        Marianne
        Level 6

        Commands are exactly the same on Windows and Linux.

        The only difference will be path of the output file that you create with bplist command.
        e.g. /tmp/MyChangeFile.txt

        The 'change file' will look similar to the solution post as the paths must match the Windows Hyper-V server paths.

        Please start a new discussion if you need further assistance. 

        This 2015 issue has been solved.

  • Yes, directory is not verified at the time of filing up the dialog box. You can fill in "anything" and then restore can fail.

    Fill a directory which is valid for the destination Hyper-V and run the restore

    Michal

  • hi Michal,

    thank you for feedback.

     

    I have some comment about your reply.


    1. So, the backup user (in this case I ) must know compulsorily the destination path ? We were used with VMware where we can browse in folder tree.


    2. I do not understand the auto fill, I inserted only "hallo", but the path that follow is filled automatically and I am not able to change it.

     

    thank you very much,

    Stefano

  • Hello Fabrice,

    I started work with Hyper-v VM recently, and I agree that the GUI is not clear and absolutely not intuitive.

    I appreciate your suggestion and I will use command line like you, but just for information, if I fill the field with a correct destination path, work fine ? the restore is implemented on server destination ??

     

    thank you very much for your comment,

    best regards

    Stefano

  • Yes, it will be redirected to the correct server but you won't be able to fin tune the path (it will always add \C\ClusterStorage\... to the path).

  • Hi Fabrice,

    I ask you again your kindly support.

    I tried launch restore from command line but I have some issue that I do not understand. Below the command that I launch

     

    nbrestorevm.exe -vmhvnew -C sysctxwitm401 -R change \C\ClusterStorage\A_001_XIO_BRONZE_SYSCLUHVP01M\sysctxwitm401\Snapshots\9BA9C9EC-FC3A-4AB4-93A0-072C2427AE09.xml to \C\ClusterStorage\A_001_PURE_BRONZE_SYSCLUHVP01M\sysctxwitm401_restore\Snapshots\9BA9C9EC-FC3A-4AB4-93A0-072C2427AE09.xml -vmserver SYSHVP01M01

     

    the result it every the same:

     

     -- To reEXIT STATUS 144: invalid command usage

     

    have you some idea or comment ??

     

    thank you

  • After -R you must put the path to a txt file that contains the line "change..."

    Do not put the change directly into the command-line !   :)

     

     

    nbrestorevm.exe -vmhvnew -C sysctxwitm401 -R C:\temp\mychangefile.txt -vmserver SYSHVP01M01
  • noooooooooooooooooooooooooooooooooooooooooooooooooo ahahahaha, I am sorry I try immediately

  • Ok guys, I have understand the settings and functionality (gui and command line).

    A special thanks Fabrice, without your help I would not be able to restore nothing :)

     

    best regards

  • Please remember to mark Fabrice's post that pointed you in the right direction as Solution.