none
Export then Import to a different Hyper-V server

    Question

  • When I export a VM from one Hyper-V server and try and import it into a different Hyper-V server I get an error 0x80070057 and the event log contains:

    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.

     Looking back through the forum I see this has cropped up a number of times but the only solution so far has been to build a new VM with the .vhd files i.e. abandon all attempts to use the export/import facility. Surely this isn't acceptable, is it?

    Looking at the .exp file I see it references \\<oldserver> several times, where <oldserver> is the name of the server from which the VM was exported. There are also GUIDs that presumably only make sense to the original Hyper-V server. It must be possible to edit the .exp file and correct these references to make the machine importable to the new Hyper-V server. My somewhat naive attempts to do this manually succeeded only in generating "Import file format error" messages.

    If anyone knows how to do this please shout. With VMWare we used to routinely copy VMs to a backup server for fault tolerance, and as things stand I can't do this with Hyper-V.

    John Rennie
    Monday, September 29, 2008 8:09 AM

Answers

All replies

  • An error meaning you were unable to complete the import? Just did several import/exports and had to reconfigure the network card but did not have to reinstall.
    Monday, September 29, 2008 10:27 AM
  • >An error meaning you were unable to complete the import?

    Yes. The import just displayed an error and would go no further.

    JR
    Monday, September 29, 2008 2:44 PM
  • From the error it says failed to configure network connection which was exact error I received over past few days moving VMs around in a test environment. Even with those errors a VM would be created in server manager in my test situation. On import I leave boxed "Import old virtual machine ID's" unchecked". Only other thing I would mention is before importing, turn off all other VM's and do a clean reboot and try import as first task.  That is all this knowledge I have that could help you at this point.

    J
    Monday, September 29, 2008 4:56 PM
  • I haven't had issues like that when I use export-import to clone an existing VM...  Since I intend to leave the original VM running, and am making a copy I never tick that checkbox to retain the machine ID's  (I think you'd only do that if you were using export-import as a way to move around the files for the VM, and were going relocate to a different server and were going to remove-delete the original files from the first server.   One of the MS guys had some blog entries on using this feature that might be worth your hunting down.

    Note that when cloning a system I generally do the following (unless I'm sysprepping instead)
      1) rename the VM (so I will know which is which.. the manager could care less if I have two with the same display name, it's going by the GUID type ID's under the covers)
      2) verify in the settings that the system does NOT have a network connection configured
      3) boot the box up 'off the network' (see step 2)  so I don't cause a name conflict on the net with my existing server
      4) Remove the system from the domain  (note I only want IT to think it's out of the domain, I want the original system left alone, which is another reason to be 'off the net' at this point.
      5) rename the system.  and let it restart.  (if you have SQL server running on it you may need to rename things there also)
     6) change the settings to put it onto whatever network it's going to live on
     7) Join to a domain if needed.
    --Chuck
    Monday, September 29, 2008 10:33 PM
  • Thanks all for the suggestions. I've done a bit more playing around and found:

    - the VMs export and import fine if I stick to the same server. It's only when moving between different servers that I get the problem.

    - if I set the network to "Not connected" before exporting then the import still fails, but it no longer gives the error about the network connection. The event log now just contains:

    Failed to import the virtual machine from import directory 'D:\temp\TextExport\'. Error: One or more arguments are invalid(0x80070057)

    with no further details. I tried removing the network before exporting and got the same result i.e. the import failed again with no details.

    So no progress :-(

     

    Tuesday, September 30, 2008 7:43 AM
  • More experiments, though nothing conclusive yet.

    First note that the original network error was a red herring. The real error appears to be something to do with the disks. If I create a new VM with no disks then it will export then import to a different server with no problem. If I add a disk then export it sometimes fails to import. If I mess around with the disk e.g. remove it and create a new one a few times the virtual machine will always eventually fail to import.

    When I can pin down the problem I'll paste it here.

    JR

    Tuesday, September 30, 2008 4:44 PM
    • Marked as answer by John Rennie Wednesday, October 01, 2008 5:01 PM
    Wednesday, October 01, 2008 5:01 PM
  •  From the solution, it looks like in the original machine the VM was in a scope of residence that did not exist in the destination machinem, right?
    This posting is provided "AS IS" with no warranties, and confers no rights
    Sunday, October 19, 2008 8:35 PM
  • Just want to share with those that are trying to import from Windows 2012 to Windows 2008. The above workaround does not work when ones try to import hyper-v guest os that was exported from Windows 2012 hyper-v then try to import to Windows 2008 hyper-v.

    Thursday, October 11, 2012 3:07 PM