none
hyper-v export and copy issues.

    Question

  • 1st I shut down the VM then I exported to a new folder called New VM.   The original folder is called Original VM folder.

    Wrote down the path to the Original VM folder from settings where there is one vhd.

    I was unable to copy the New VM folder to another server. (error -the file was in use)

    Finally I deleted this VM which was shut down.  When I checked in the New VM folder there was nothing inside,... no vhd.

    So by default I copied Original VM folder to another server(Server B) successfully.  

    When I went to delete the Original VM folder on Server A it failed.   I cut the Original VM folder on Server A and pasted it on Server B again.  This time I was able to delete the Original VM folder on Server A.

    Please explain -  I though the exported folder was the folder that I could copy to Server B.   Why is it the Original Folder had the vhd to export?  I expected to be able to copy the New VM folder(browsed to this folder when exporting) to Server B.    Why did the the Original VM folder not delete after copying it?,... I had to cut it then it deleted successfully.

    Another thing I noticed was the New VM folder has no XML and EXP files while the VM was shut off.  The Old VM folder has XML and EXP files before I copied to another server.  However after I copied the folder there were no XML and EXP files but just the vhd file.  


    dsk


    • Edited by kimdav111 Thursday, March 09, 2017 3:58 AM additional questions
    Thursday, March 09, 2017 2:11 AM

All replies

  • Windows 2008 R2 hyper-v host(Server A) and exporting a VM which is also a win 2008 r2.

    The goal was to export then copy the VM to another server B

    1st I shut down the VM then I exported to a new folder called New VM.   The original folder is called Original VM folder.

    Wrote down the path to the Original VM folder from settings where there is one vhd.

    I was unable to copy the New VM folder to another server. (error -the file was in use)

    Finally I deleted this VM which was shut down.  When I checked in the New VM folder there was nothing inside,... no vhd.

    So by default I copied Original VM folder to another server(Server B) successfully.  

    When I went to delete the Original VM folder on Server A it failed.   I cut the Original VM folder on Server A and pasted it on Server B again.  This time I was able to delete the Original VM folder on Server A.

    Please explain -  I though the exported folder was the folder that I could copy to Server B.   Why is it the Original Folder had the vhd to export?  I expected to be able to copy the New VM folder(browsed to this folder when exporting) to Server B.    Why did the the Original VM folder not delete after copying it?,... I had to cut it then it deleted successfully.

    Thursday, March 09, 2017 2:08 AM
  • Hi,

    The way You explained copying the VHD from Original VM folder to New VM folder is manual process... like normal copy and paste... When You say export VM then it means to run Export from Hyper-V Manager which copied all files (vhdx file with configuration to be used in new VM on either same host or different host) to the other folder where You want to export... Once export is completed then You can either copy that exported folder or file to other host or cut and paste...

    Later on if You want to delete the Old VM files then You have to first delete the VM and then You have to delete the file... but before deleting VM directly, make sure You must delete snapshot for VM if any was taken.... it is noticed that sometimes due to any reason, if You have taken snapshot for VM and then deleted VM directly then later You faced challenge in deleting files for that VM...

    Export and Import feature of Hyper-V is very simple, refer below reference link for the same:

    http://www.thegeekstuff.com/2014/03/import-export-vm-hyper-v/

    Thanks,

    -------------------

    Mark as Answer if this helps You!

    Refer: http://www.mdtechskillssolutions.com/


    Mayank Dhama


    Thursday, March 09, 2017 8:40 AM
  • What I was trying to explain that the export folder which contained the vhd files could NOT be copied.

    I had seen your link previously.  When I deleted the VM the contents of the Export folder DISAPPEARED.  

    The Original folder which (I had recorded from settings) was able to be copied to another server. 

    None of this was expected.


    dsk



    • Edited by kimdav111 Friday, March 10, 2017 6:48 PM clarification
    Friday, March 10, 2017 6:45 PM
  • It is pretty difficult to determine exactly what your original configuration was, so it is difficult for us to completely understand your exact steps.  In your original post you state "Wrote down the path to the Original VM folder from settings where there is one vhd".  If all you found in the Original VM folder was a single VHD, then you did not use defaults when you created your original VM.  Had you used defaults, you would have had at least two subdirectories in the Original VM folder, Virtual Machines and Virtual Hard Disks.  And within those two subdirectories you would have had files.  We can't guess how you had things set up if you say that all that was in the Original VM folder was a VHD.

    My only guess about your problems is that you might have done something out of sequence.  An export from a stopped VM on 2008 R2 would have created another complete directory structure that mirrored the original VM.  You should have been able to copy that new directory structure anywhere you wanted and then used an import to bring it into another Hyper-V instance.  Deleting a VM from the Hyper-V management console does not delete any content from disk related to the VM.  Since you appeared to have issues with both of these things, and both of those have been done over and over and thousands of other locations makes it seem like you had something completely different going on in your environment.  Can you recreate the exact same steps and get the exact same results?  If so, you should open a case with Microsoft to help you get your issue resolved because Hyper-V does not work in the manner you reported.  Since it is so different from the way it is working elsewhere, it will require some debugging in your particular environment to figure out what is happening.


    . : | : . : | : . tim

    Friday, March 10, 2017 8:32 PM
  • Hi,
    Are there any updates on the issue?
    You could mark the reply as answer if it is helpful.
    Best Regards,
    Leo

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 22, 2017 5:42 AM
    Moderator