locked
Exporting and Importing Virtual Machines RRS feed

  • Question

  • Hi Everyone,
                      I have exported Virtual Machines from Microsoft Windows Server 2008 R2 based Hyper-V and I am trying to Import them in Microsoft Windows Server 2008 SP2 based Hyper-V, but I am getting following error:



    Unable to find virtual hard disk file 'D:\Virtual Machines\TESTAD\Snapshots\40BFFB26-ED68-4F1A-B05D-106011A16454\TESTAD_6FBD97EB-138E-47D8-969B-A696D7FB7872.avhd'. Error: The system cannot find the file specified. (0x80070002).

    Virtual network switch name was not found (Local Area Connection - Virtual Network). Network adapter will be disconnected from the network.

    Import failed to configure network connection for network card '{ResourceType=10, OtherResourceType="<null>", ResourceSubType="Microsoft Synthetic Ethernet Port"}'. You must modify the connection of all affected network adapters to be able to run the virtual machine. If you imported snapshots and apply any of those snapshots after modifying the connection, you must modify the connection again to be able to run the virtual machine.

    Virtual network switch name was not found (Local Area Connection - Virtual Network). Network adapter will be disconnected from the network.

    Import failed to configure network connection for network card '{ResourceType=10, OtherResourceType="<null>", ResourceSubType="Microsoft Synthetic Ethernet Port"}'. You must modify the connection of all affected network adapters to be able to run the virtual machine. If you imported snapshots and apply any of those snapshots after modifying the connection, you must modify the connection again to be able to run the virtual machine.

    'TESTAD': Attachment 'D:\Virtual Machines\TESTAD\Snapshots\40BFFB26-ED68-4F1A-B05D-106011A16454\TESTAD_6FBD97EB-138E-47D8-969B-A696D7FB7872.avhd' not found. Error: 'The system cannot find the path specified.' (7864368). (Virtual machine ID 40BFFB26-ED68-4F1A-B05D-106011A16454)

    'TESTAD' failed to add device 'Microsoft Virtual Hard Disk'. (Virtual machine ID 40BFFB26-ED68-4F1A-B05D-106011A16454)

    Failed to import the device '{ResourceType=21, OtherResourceType="<null>", ResourceSubType="Microsoft Virtual Hard Disk"}' for 'TESTAD'(Virtual machine ID 40BFFB26-ED68-4F1A-B05D-106011A16454). Error: The system cannot find the path specified. (0x80070003).

    Unable to find virtual hard disk file 'D:\Virtual Machines\TESTAD\Snapshots\40BFFB26-ED68-4F1A-B05D-106011A16454\01-FBLTESTAD_6FBD97EB-138E-47D8-969B-A696D7FB7872.avhd'. Error: The system cannot find the file specified. (0x80070002).

    Failed to import the virtual machine from import directory 'D:\Virtual Machines\TESTAD\'. Error: The system cannot find the path specified.(0x80070003)


    Kindly, advise.

    Thanks in advance.




    Monday, February 1, 2010 9:59 AM

Answers

  • The virtual switch error is simply a warning - the Import cannot find a virtual switch of the same name.

    Not a big deal, just manually modify the networking configuration manually.

    The snapshot error.
    This is a bit more complex since you are going from R2 back to SP2.  I suspect that there is a differencing disk behavior cahnge that is causing the error.

    First of all - can you verify that the AVHD resides where the system expects it to be (as described in the error)?

    Second - how important is the full snapshot history?
    As the snapshot history might not transfer backward (since you are actually downgrading the hyper-V server).

    The snapshots can be manually merged back together to give you an intact machine, but you will lose your snapshost history in the UI.
    Brian Ehlert (hopefully you have found this useful)
    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Monday, February 1, 2010 3:57 PM
  • Hi,

     

    Yes, you can export a VM from Windows Server 2008 R2 Hyper-V to Windows Server 2008 Hyper-V. Please delete or merge all snapshots before you export them and be sure that the VM is power off.

     

    If you create a new VM use the existing VHD, you will lost all the configuration files of the original VM, so you need to configure the network once more.

     

    In Windows Server 2008 R2, the avhd file will be the same folder with the VHD files, it’s an expected behavior. The following post discussed the similar issue, you can refer to:

     

    Hyper-V ignoring "Snapshot file location" setting?

    http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2virtualization/thread/d4294c77-0630-4684-ac4f-6b6a886cf3a1

     

    You can perform the following guide to merge the snapshots manually.

     

    http://itproctology.blogspot.com/2008/06/how-to-manually-merge-hyper-v-snapshots.html

     

     

    Best Regards,

    Vincent Hu

     

    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Tuesday, February 2, 2010 9:15 AM
  • Is it supported??  Hmm, interesting question.  Moving forward is supported, but backward... I have not heard a statement that it is, but that does not mean that it isn't - but i also know that some significant behavior has changed, so it might not be.
    Notice that Vincent points out to delete and merge snapshots prior to exporting - that is an important point.

    If you still have the R2 host, then do this and export again.

    Activation, tcpip, etc. - basicailly reconfiguraiton of the VM OS - yes, totally normal - the OS in the VM sees different hardware and so it reacts in the way that any Windows system does.

    R2 behavior is that hte VHDs and AVHDs all reside int eh same folder - it is new default behavior.
    Do the AVHDs need to be in the 'snapshots' folder?  - no.

    If you attached to the root VHD and modified it - you might have voided it and need to recover a copy from your backup or origional.

    Also, when merging an AVHD to a VHD - neither of them can be mounted in a VM.  So you detach the VHD prior to merging the AVHDs into each other, or into the VHD.

    Either of these points could be the root of your corruption problem.

    Brian Ehlert (hopefully you have found this useful)
    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Tuesday, February 2, 2010 4:50 PM
  • To clear things up, exporting from Win2008 R2 and importing on Win2008 is NOT supported. We are not supporting going back in releases.

    Since AVHD default location is changed in R2 from a dedicated folder to being next to their parent VHDs, AVHD problems above may be expected.

    Thanks,
    Serdar Sutay [MSFT] Program Manager, Hyper-V This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Tuesday, February 2, 2010 7:40 PM

All replies

  • The virtual switch error is simply a warning - the Import cannot find a virtual switch of the same name.

    Not a big deal, just manually modify the networking configuration manually.

    The snapshot error.
    This is a bit more complex since you are going from R2 back to SP2.  I suspect that there is a differencing disk behavior cahnge that is causing the error.

    First of all - can you verify that the AVHD resides where the system expects it to be (as described in the error)?

    Second - how important is the full snapshot history?
    As the snapshot history might not transfer backward (since you are actually downgrading the hyper-V server).

    The snapshots can be manually merged back together to give you an intact machine, but you will lose your snapshost history in the UI.
    Brian Ehlert (hopefully you have found this useful)
    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Monday, February 1, 2010 3:57 PM
  • Thank for the reply Brian.


    I have one major question - Is it supported to export from Windows Server 2008 R2 to Windows Server 2008 SP2?

    I went ahead and created new machines and used the VHDs from Windows Server 2008 R2.  I had to activate the windows again, configure TCPIP, etc. - Is this behavior normal?

    First Answer - The AVHD File is not in the Snapshots Folder, but it is in the Virtual Hard Disks Folder - How to rectify it now? if I do go with the import? Is it possible now to import virtual machines? I have the folder structure saved? 

    Second Answer - The snapshot history is not important


    Another Question - How to manually merge snapshots? I have the AVHD files? Will it keep the changes that now I have made like windows activation and tcpip settings.


     
    Tuesday, February 2, 2010 6:17 AM
  • I shutdown one of the virtual machines, renamed the snapshot to VHD and then tried the Edit Disk Wizard to merge it by browsing to the snapshot, but it gave me following error:


    Unable to edit virtual disk D:\Virtual Machine\(name of the vhd).

    The file or directory is corrupted and unreadable.
    Tuesday, February 2, 2010 6:36 AM
  • Hi,

     

    Yes, you can export a VM from Windows Server 2008 R2 Hyper-V to Windows Server 2008 Hyper-V. Please delete or merge all snapshots before you export them and be sure that the VM is power off.

     

    If you create a new VM use the existing VHD, you will lost all the configuration files of the original VM, so you need to configure the network once more.

     

    In Windows Server 2008 R2, the avhd file will be the same folder with the VHD files, it’s an expected behavior. The following post discussed the similar issue, you can refer to:

     

    Hyper-V ignoring "Snapshot file location" setting?

    http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2virtualization/thread/d4294c77-0630-4684-ac4f-6b6a886cf3a1

     

    You can perform the following guide to merge the snapshots manually.

     

    http://itproctology.blogspot.com/2008/06/how-to-manually-merge-hyper-v-snapshots.html

     

     

    Best Regards,

    Vincent Hu

     

    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Tuesday, February 2, 2010 9:15 AM
  • Is it supported??  Hmm, interesting question.  Moving forward is supported, but backward... I have not heard a statement that it is, but that does not mean that it isn't - but i also know that some significant behavior has changed, so it might not be.
    Notice that Vincent points out to delete and merge snapshots prior to exporting - that is an important point.

    If you still have the R2 host, then do this and export again.

    Activation, tcpip, etc. - basicailly reconfiguraiton of the VM OS - yes, totally normal - the OS in the VM sees different hardware and so it reacts in the way that any Windows system does.

    R2 behavior is that hte VHDs and AVHDs all reside int eh same folder - it is new default behavior.
    Do the AVHDs need to be in the 'snapshots' folder?  - no.

    If you attached to the root VHD and modified it - you might have voided it and need to recover a copy from your backup or origional.

    Also, when merging an AVHD to a VHD - neither of them can be mounted in a VM.  So you detach the VHD prior to merging the AVHDs into each other, or into the VHD.

    Either of these points could be the root of your corruption problem.

    Brian Ehlert (hopefully you have found this useful)
    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Tuesday, February 2, 2010 4:50 PM
  • To clear things up, exporting from Win2008 R2 and importing on Win2008 is NOT supported. We are not supporting going back in releases.

    Since AVHD default location is changed in R2 from a dedicated folder to being next to their parent VHDs, AVHD problems above may be expected.

    Thanks,
    Serdar Sutay [MSFT] Program Manager, Hyper-V This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Vincent Hu Friday, February 5, 2010 7:06 AM
    Tuesday, February 2, 2010 7:40 PM