Moved differencing VM by just file copy.. Tried to restore it but configurations were not there

Odpovědět Moved differencing VM by just file copy.. Tried to restore it but configurations were not there

  • 9 พฤษภาคม 2555 7:09
     
     

    Hi all,

    I have a problem with my Differencing VMs. Before, they were stored on drive "D:". However, my hard disk got corrupted but fortunately I have a backup of the VHD files of my VMs.

    Now I tried restoring those VMs which are now on drive "E:". The Hyper-V entries for the VM got corrupted so I just chose to create a "New Virtual Machine". I chose "An existing VHD" and selected the appropriate VHDs.

    Problem is, my differencing VMs which were supposed to have changes reverted to their clean state. I used the "Inspect" command and saw that the VHDs were configured properly with the parent VM.

    Is there any solution to this problem? I want my Differencing VMs to be configured the way they was.

    Thank you!

    PS: I also have a copy of the AVHDs. Is that helpful?

ตอบทั้งหมด

  • 9 พฤษภาคม 2555 7:59
    ผู้ดูแล
     
     

    Hi,

    Problem is, my differencing VMs which were supposed to have changes reverted to their clean state. I used the "Inspect" command and saw that the VHDs were configured properly with the parent VM.

    >> I didn’t get your description clearly.

    Let’s say, if there is a base VHD(D:\base.vhd), you create a differencing VHD(E:\new.vhd) based on it. Now if you move the D:\base.vhd to E: drive, then you will find that the chain of E:\new.vhd is broken, however, you can use inspect to connect to the base VHD in new location.

    For more information, you can refer to:

    How to reassign the parent to the exported difference disk VHD

    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/7bc63e15-1293-4b2b-9cef-0f91cdfa8f0f

    By the way, AVHD file is snapshot file. If the chain of the snapshot is not broken, you can attach the AVHD file to a new virtual machine.

  • 9 พฤษภาคม 2555 8:43
     
     

    Hi Vincent, thanks for replying

    Sorry, I would like to make it clearer. I also moved the Parent VM. for example I have:

    • Base VHD: D:\base.vhd
    • Differencing VHD: D:\differencing.vhd

    After moving both the Base and Differencing VHDs, when I use the "inspect command", it seems that it automatically configures the Parent (Base) VHD already:

    • Differencing VHD: E:\differencing.vhd
    • Parent (Base) VHD: E:\base.vhd

    However, when I boot up my new VM using the differencing VHD, my previous configurations were gone. For example, in my previous config, I am joined to the domain. After creating new VM, I am just joined to WORKGROUP. Another example is for created users.

    Thanks!

  • 9 พฤษภาคม 2555 8:48
    ผู้ดูแล
     
     
    Hi,

    If you didn’t export or backup the virtual machines, there is no way to get the configuration back. That means you have to create a new configuration file. This configuration is for Hyper-V, such as MAC address, hardware configuration, it will not affect the inside of the virtual machine.

  • 9 พฤษภาคม 2555 8:53
     
     

    Hello again,

    Is there a way to do this? Or is it more recommended that I just reinstall everything again? I have a lot of VMs (about 6) and I would like if there are some alternatives to this.

    Thank you!

  • 9 พฤษภาคม 2555 8:55
    ผู้ดูแล
     
     

    Hi,

    The configuration file will not affect the inside of the virtual machine, expect some networking settings. For example, If you have applications installed within the virtual machine, the applications are still there.

  • 9 พฤษภาคม 2555 9:04
     
     
    Thanks! I'll try this and get back if it is successful.
  • 9 พฤษภาคม 2555 11:12
     
     

    Hi again,

    I tried something, although I'm not quite sure if this is a valid way.. I created a new VM and then selected "attach a vhd later". I then go to Settings then attached the latest .avhd file.

    When I booted the VM, it retained the latest configuration. Is this a valid way? Is there a way to use this way to fix my problem?

    Also... Is it possible to merge the AVHD to the VHD of the VMs? I noticed that when I opened the Hyper-V manager after re-installing and reformatting, they were in a  "Saved-Critical State" and all had AVHDs of the same date taken. Does it make sense if I were to merge these AVHDs to their VHDs?

    Thanks!


    • แก้ไขโดย LAA4838 9 พฤษภาคม 2555 12:03
    •  
  • 9 พฤษภาคม 2555 12:02
    ผู้ดูแล
     
     คำตอบ
    Hi,

    When I booted the VM, it retained the latest configuration. Is this a valid way?
    >> According to the description, it seems that there were some snapshots with the virtual machine when you backup it. If you can’t restore the whole virtual machine completely, you can create a new virtual machine and then attach the latest AVHD file, this is acceptable if you want to get the latest data with the virtual machine.

    Is there a way to use this way to fix my problem?
    >> What problem did you want to fix? With the method in your last reply, you can get your virtual machine back. You can also merge the AVHD file to its parent and then attach the merged VHD file to the virtual machine.

    Manually Merge avhd to vhd in Hyper-V
    http://social.technet.microsoft.com/wiki/contents/articles/6257.aspx

    • ทำเครื่องหมายเป็นคำตอบโดย LAA4838 10 พฤษภาคม 2555 4:56
    •  
  • 9 พฤษภาคม 2555 14:42
     
     
    Hi,

    When I booted the VM, it retained the latest configuration. Is this a valid way?
    >> According to the description, it seems that there were some snapshots with the virtual machine when you backup it. If you can’t restore the whole virtual machine completely, you can create a new virtual machine and then attach the latest AVHD file, this is acceptable if you want to get the latest data with the virtual machine.

    Is there a way to use this way to fix my problem?
    >> What problem did you want to fix? With the method in your last reply, you can get your virtual machine back. You can also merge the AVHD file to its parent and then attach the merged VHD file to the virtual machine.

    Manually Merge avhd to vhd in Hyper-V
    http://social.technet.microsoft.com/wiki/contents/articles/6257.aspx

    This looks promising! I'll do this and post again about what happened.

    Thanks!

  • 10 พฤษภาคม 2555 4:58
     
     คำตอบ
    Hi,

    When I booted the VM, it retained the latest configuration. Is this a valid way?
    >> According to the description, it seems that there were some snapshots with the virtual machine when you backup it. If you can’t restore the whole virtual machine completely, you can create a new virtual machine and then attach the latest AVHD file, this is acceptable if you want to get the latest data with the virtual machine.

    Is there a way to use this way to fix my problem?
    >> What problem did you want to fix? With the method in your last reply, you can get your virtual machine back. You can also merge the AVHD file to its parent and then attach the merged VHD file to the virtual machine.

    Manually Merge avhd to vhd in Hyper-V
    http://social.technet.microsoft.com/wiki/contents/articles/6257.aspx

    Great! I followed the link above and I was able to successfully rebuild my Lab!

    There were a few issues like the VMBus Adapter became a Ghost Adapter, and I also had to reconfigure the new Network Adapter, VMBus Adapater 2. But once I got that, I was able to get my Lab back!

    Thanks very much Vincent!

    • ทำเครื่องหมายเป็นคำตอบโดย LAA4838 10 พฤษภาคม 2555 4:58
    •