none
Hyper-V - Import Failed

    Question

  • Goal: Trying to clone Hyper-V VMs as part of virtual network.
    Running W2K8-R2 Hyper-V Version 6.1.7600.16385.

    When trying to import, I get:

    Import failed. Import failed. Unable to find virtual machine import files under location … You can import a virtual machine only if you used Hyper-V to create and export it.”

    First occurred on SysPrepped VM, then again on fully configured base install.

    Per Microsoft articles, tried deleting the VM in the console and importing and got same results. Also, renamed and copied to same directory as base installs.

    Also, copied/renamed the *.exp file so that I could re-use.

    Similar issues same to have been occuring for users over the years but haven't found a solution that worked.

    Is there a bug in this version? I've reached the aggravation stage.

    A side note. I have a multi-processor, quad core proliant server with 24GB Ram. I would like to eventually create a VM to serve as a redundant DC, e.g., my DC1 with FSMO roles would be physical, and DC2 would be the backup, then promote everything to a 2008 domain.

    I know Coach C. says not to run DCs in virtual environment but what do you think of this limited application. One reason for me to do this is that my backup W2K3-DC is getting long in the tooth - about 10 years old.

    Thanks.
    Friday, November 19, 2010 4:00 PM

All replies

  • The rule of thumb is that any particular export can only be imported one time.

    And, an Export is an entire folder, not just the .exp XML file.

    So, you would sysprep your VM, power off, Export.  then copy the entire export folder to a new folder, Import from the new folder.

    Each new VM from this Export, must be a full copy.

    R2 includes a feature to "copy a VM to allow it to be imported again" Hyper-V v1 does not. 

    Personally, I gave up trying to use this copy feature in R2 and simply duplicate the entire folder.  Then I know what is happening and I know where that VM is being stored.  I am a self admitted control freak of my environments.

     

     


    Brian Ehlert (hopefully you have found this useful) http://ITProctology.blogspot.com
    Friday, November 19, 2010 4:47 PM
    Moderator
  • Thanks. Tried your instructions but . . .

     

    Shut down VM named BaseInstall and exported to e:\\vmclones\baseinstall2. Appeared successful

    Copied entire folder to e:\vm machines where original baseinstall vm is installed.

    Imported with move option only selected - no joy.

    Imported with copy option - no joy.

    Same error as before.

     

     


    Gratefully, BadAssBass
    Friday, November 19, 2010 10:58 PM
  • Hi.

    When you copy an existing VM, you generate a new virtual machine ID

    When you move a VM or restore a backup copy of a vm, the previous virtual machine ID is reused.

    You cannot import a virtual machine if an existing virtual machine with the same virtual machine ID is running on the server running Hyper-V.


    Kristian
    Saturday, November 20, 2010 1:53 PM
  • Hi,

     

    Please check the following guides to see whether you get the same issue.

     

    Hyper-V - Export & Import (Part 1)

    http://blogs.msdn.com/virtual_pc_guy/archive/2008/08/26/hyper-v-export-import-part-1.aspx

     

    Hyper-V - Export & Import (Part 2)

    http://blogs.msdn.com/virtual_pc_guy/archive/2008/08/27/hyper-v-export-import-part-2.aspx

     

    Hyper-V Import / Export in Windows Server 2008 R2

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2009/06/12/hyper-v-import-export-in-windows-server-2008-r2.aspx

     

     

    Best Regards,

    Vincent Hu

     

    Monday, November 22, 2010 7:17 AM
    Moderator
  • Thanks. Read them all but I don't have the scripting skills required to use the API with confidence. I do believe that I'm using the UI correctly and that there is likely a bug or configuration issue that is causing the problem. May be time to expend an incidident with Microsoft support.

    BTW, are you by chance the same Vince Hu that worked as SysAdmin for Ariel in Tyson's Corner?

     

     


    Gratefully, BadAssBass
    Monday, November 22, 2010 3:06 PM
  • Hi,

     

    Please try to create a new VM and then export to see whether you get the same issue when you import the exported VM.

     

    By the way, please try to reboot the computer.

     

    In addition, I am not the guy.

     

    Best Regards,

    Vincent Hu

     

    Friday, November 26, 2010 5:51 AM
    Moderator
  • Hi Vince:

     

    Different error.

    1. Created new VM in e:\virtualmachines

    2. Exported to e:\V-clones

    3. Deleted the existing.

    4. After importing, got copy error, file exists.

    __________________________

    Second attempt

    1. Created new VM in e:\virtualmachines

    2. Exported to e:\V-clones

    3. Copied exported file folder to 3:\virtuamachines.

    4. Imported using copy options - Successful

    So, any clues as to why the first base install won't cooperate?

    Thanks.

     


    Gratefully, BadAssBass
    Wednesday, December 01, 2010 3:14 PM
  • I am not fully sure that I understand.

    Some background: 

    Deleting a VM in Hyper-V Manager does not delete all traces of a VM.  Deleting a VM in Hyper-V Manager deletes the configuraiton of the VM and then if the VM contained any snapshots it merges them to a single VHD.  The other thing that it does is that the VHD remains - the VHD is not deleted.  You, the admin, has to consiously do that - a double check if you want to call it that.

    This is different if you use SCVMM - you get no chance to fall back - you delete a VM and SCVMM deletes all traces of it.  It does the extra step of deleting the VHD and folder from the file system.


    Brian Ehlert (hopefully you have found this useful) http://ITProctology.blogspot.com
    • Proposed as answer by David Burg Wednesday, January 04, 2012 7:30 PM
    Wednesday, December 01, 2010 4:52 PM
    Moderator
  • When I export/import after a sysprep as a way to clone an Hyper-V VM, I had the same "File exists" issue with the option "Duplicate all files so the same virtual machine can be imported again". So instead I copied the entire export folder to "C:\Users\Public\Documents\Hyper-V" where I want the new VM to be (but you could choose any location) and did not check the option "Duplicate all files so the same virtual machine can be imported again". With this manual copy, the cloning works without using SCVMM.

    It might make sense for the Hyper-V Manager to have an option to rename the VHD during import to avoid such issue during cloning. (Hint hint for my Hyper-V colleagues when reading this :-))


    Soft. Dev. Eng. | User Experience Group | Microsoft Corporation
    Wednesday, January 04, 2012 7:35 PM