Hyper-V Virtual Machine - Import in Windows 10

    Hyper-V Virtual Machine - Import in Windows 10

    How to Import Hyper-V Virtual Machines in Windows 10
    Published by
    2016-07-19
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 16,593

    Show Printable Version 


    How to Import Hyper-V Virtual Machines

    information   Information
    Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical computer systems, however they exist in a virtualized and isolated environment.

    You can use Hyper-V's export and import functionality to quickly duplicate virtual machines. Exported virtual machines can be used for backup or as a way to move a virtual machine between Hyper-V hosts.

    Import allows you to restore virtual machines. You don't need to export a virtual machine to be able to import it. Import will try to recreate the virtual machine from whatever is available. Importing a virtual machine registers the virtual machine with the Hyper-V host. A virtual machine export can be imported back into the host from which it was derived or new host.

    This tutorial will show you how to import a Hyper-V virtual machine (guest) on your Windows 10 PC (host).

    You must be signed in as an administrator to be able to import a Hyper-V virtual machine.

    Note   Note
    Hyper-V is only available in the Windows 10 Pro, Windows 10 Enterprise, and Windows 10 Education editions.


    CONTENTS:
    • Option One: To Import Hyper-V Virtual Machine using Hyper-V Manager
    • Option Two: To Import Hyper-V Virtual Machine using PowerShell



    Video by: Kari in TF Video thread






    Hyper-V Virtual Machine - Import in Windows 10 OPTION ONE Hyper-V Virtual Machine - Import in Windows 10
    To Import Hyper-V Virtual Machine using Hyper-V Manager

    1. Open Hyper-V Manager.

    2. Select the Hyper-V host (ex: "BRINK-DESKTOP") in the left pane you want to import a virtual machine to, and click/tap on Import Virtual Machine in the right Actions pane. (see screenshot below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-1.png 
Views:	40 
Size:	60.9 KB 
ID:	90917

    3. Click/tap on Next on the "Before you Begin" screen. (see screenshot below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-2.png 
Views:	40 
Size:	19.2 KB 
ID:	90918

    4. Click/tap on Browse, navigate to and select the folder (ex: "Windows 7 Ultimate") that contains the virtual machine (.vmcx file) you want to import, click/tap Select Folder, and click/tap on Next. (see screenshots below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-3.png 
Views:	52 
Size:	91.9 KB 
ID:	90919

    5. Select the virtual machine (ex: "Windows 7 Ultimate") you want to import, and click/tap on Next. (see screenshots below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-4.png 
Views:	40 
Size:	17.5 KB 
ID:	90920

    6. Select (dot) an import type you want to perform, click/tap on Next, and go to step 7 or step 8 below depending on what import type you selected. (see screenshot below)

    Import Type Description
    Register the virtual machine in-place The current location of the Export files is where the virtual machine will be run from. When imported, the virtual machine has the same ID as it did at the time of export. Because of this, If the virtual machine is already registered with Hyper-V it needs to be deleted before the import will work. When the import has completed, the export files become the running state files and cannot be removed.
    Restore the virtual machine You are given an option to store the VM files in a specific location or use the locations default to Hyper-V. This import type creates a copy of the exported file and moves them to the selected location. When imported, the virtual machine has the same ID as it did at the time of export. Because of this, if the virtual machine is already running in Hyper-V it needs to be deleted before the import can be completed. When the import has completed the exported files remain untouched and can be removed and / or imported again.
    Copy the virtual machine This import type is similar to the Restore type in that you select a location for the VM files. The difference is that when imported the virtual machine has a new unique ID. This allows for the Virtual Machine to be imported into the same host multiple time.

    Click image for larger version. 

Name:	Import_Hyper-V_VM-5.png 
Views:	34 
Size:	22.8 KB 
ID:	90921


     7. If you selected to "Register the virtual machine in-place"

    A) Click/tap on Finish on the "Summary" screen, and go to step 9 below. (see screenshot below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-6.png 
Views:	35 
Size:	22.9 KB 
ID:	90922


     8. If you selected to "Restore the virtual machine" or "Copy the virtual machine"

    A) If you like, you can specify new or use existing folders to store the virtual machine files. When finished, click/tap on Next. (see screenshot below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-7a.png 
Views:	38 
Size:	26.6 KB 
ID:	90923

    B) Browse to and select the folder where you want to store the imported virtual hard disks (.vhdx file) for this virtual machine, and click/tap on Next. (see screenshot below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-7b.png 
Views:	35 
Size:	17.2 KB 
ID:	90924

    C) Click/tap on Finish on the "Summary" screen, and go to step 9 below. (see screenshot below)
    Note   Note
    This may take a while to finish copying the virtual machine files and hard disk to the selected folder location(s).


    Click image for larger version. 

Name:	Import_Hyper-V_VM-7c.png 
Views:	34 
Size:	27.6 KB 
ID:	90925

    9. The Hyper-V virtual machine (ex: "Windows 7 Ultimate") has now been imported to the selected Hyper-V host (ex: "BRINK-DESKTOP"). (see screenshot below)

    Click image for larger version. 

Name:	Import_Hyper-V_VM-8.png 
Views:	41 
Size:	53.7 KB 
ID:	90926

    10. When finished, you can close Hyper-V Manager if you like.






    Hyper-V Virtual Machine - Import in Windows 10 OPTION TWO Hyper-V Virtual Machine - Import in Windows 10
    To Import Hyper-V Virtual Machine using PowerShell

    Note   Note
    For more details about the Import-VM command used in this option, see: Import-VM


    1. Open an elevated PowerShell.

    2. Do step 3 (in-place), step 4 (in-place) (restore) or step 5 (copy) below for the import type you want to perform.


     3. To "Register the virtual machine in-place (use the existing unique ID)"

    Note   Note
    The current location of the Export files is where the virtual machine will be run from. When imported, the virtual machine has the same ID as it did at the time of export. Because of this, If the virtual machine is already registered with Hyper-V it needs to be deleted before the import will work. When the import has completed, the export files become the running state files and cannot be removed.


    A) Type the command below into the elevated PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    Import-VM -Path 'Full path of virtual machine .vmcx file'

    Note   Note
    Substitute Full path of virtual machine .vmcx file in the command above with the actual full path of where the virtual machine .vmcx file you want to import is located.

    For example:
    Code:
    Import-VM -Path 'D:\Vitual Machines\Windows 7 Ultimate\Virtual Machines\7BEDECF9-E91F-4115-9E86-BBFEE136D881.vmcx'
    Click image for larger version. 

Name:	vmcx.png 
Views:	35 
Size:	45.6 KB 
ID:	90945

    Click image for larger version. 

Name:	PowerShell_Register_in-place_Hyper-V.png 
Views:	36 
Size:	30.3 KB 
ID:	90927


     4. To "Restore the virtual machine (use the existing unique ID)"

    Note   Note
    You have the option to store the VM files in a specific location or use the locations default to Hyper-V. This import type creates a copy of the exported file and moves them to the selected location. When imported, the virtual machine has the same ID as it did at the time of export. Because of this, if the virtual machine is already running in Hyper-V it needs to be deleted before the import can be completed. When the import has completed the exported files remain untouched and can be removed and / or imported again.


    A) Type the command below you want to use into the elevated PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    (To use default Hyper-V folders to import and copy virtual machine .vmcx and virtual hard disk .vhdx files)
    Import-VM -Path 'Full path of .vmcx file' -Copy

    OR

    (To specify Hyper-V folders to import and copy virtual machine .vmcx and virtual hard disk .vhdx files)
    Code:
    Import-VM -Path 'Full path of .vmcx file' -Copy -VhdDestinationPath 'Full path of folder to copy .vhdx file' -VirtualMachinePath 'Full path of folder to copy .vmcx file'
    Note   Note
    Substitute Full path of .vmcx file in the commands above with the actual full path of where the virtual machine .vmcx file you want to import is located.

    Substitute Full path of folder to copy .vhdx file in the second command above with the actual folder path where you want to copy the virtual hard disk .vhdx file of the virtual machine you want to import.

    Substitute Full path of folder to copy .vhdx file in the second command above with the actual folder path where you want to copy the virtual machine .vmcx file of the virtual machine you want to import.

    For example:
    Code:
    Import-VM -Path 'D:\Vitual Machines\Windows 7 Ultimate\Virtual Machines\7BEDECF9-E91F-4115-9E86-BBFEE136D881.vmcx' -Copy -VhdDestinationPath 'D:\Vitual Machines\Windows 7 Ultimate - Copy' -VirtualMachinePath 'D:\Vitual Machines\Windows 7 Ultimate - Copy'

    Click image for larger version. 

Name:	PowerShell_Restore_Hyper-V.png 
Views:	33 
Size:	19.5 KB 
ID:	90929


     5. To "Copy the virtual machine (create a new unique ID)"

    Note   Note
    This import type is similar to the Restore type in that you select a location for the VM files. The difference is that when imported the virtual machine has a new unique ID. This allows for the Virtual Machine to be imported into the same host multiple time.


    A) Type the command below you want to use into the elevated PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    (To use default Hyper-V folders to import and copy virtual machine .vmcx and virtual hard disk .vhdx files)
    Import-VM -Path 'Full path of .vmcx file' -Copy -GenerateNewId

    OR

    (To specify Hyper-V folders to import and copy virtual machine .vmcx and virtual hard disk .vhdx files)
    Code:
    Import-VM -Path 'Full path of .vmcx file' -Copy -VhdDestinationPath 'Full path of folder to copy .vhdx file' -VirtualMachinePath 'Full path of folder to copy .vmcx file' -GenerateNewId
    Note   Note
    Substitute Full path of .vmcx file in the commands above with the actual full path of where the virtual machine .vmcx file you want to import is located.

    Substitute Full path of folder to copy .vhdx file in the second command above with the actual folder path where you want to copy the virtual hard disk .vhdx file of the virtual machine you want to import.

    Substitute Full path of folder to copy .vhdx file in the second command above with the actual folder path where you want to copy the virtual machine .vmcx file of the virtual machine you want to import.

    For example:
    Code:
    Import-VM -Path 'D:\Vitual Machines\Windows 7 Ultimate\Virtual Machines\7BEDECF9-E91F-4115-9E86-BBFEE136D881.vmcx' -Copy -VhdDestinationPath 'D:\Vitual Machines\Windows 7 Ultimate - Copy' -VirtualMachinePath 'D:\Vitual Machines\Windows 7 Ultimate - Copy' -GenerateNewId

    Click image for larger version. 

Name:	PowerShell_Copy_Hyper-V.png 
Views:	37 
Size:	29.1 KB 
ID:	90928


    6. When finished, you can close PowerShell.
    Note   Note
    This may take a while to finish copying the virtual machine files and hard disk to the selected folder location(s).



    That's it,
    Shawn



  1. Joined : Feb 2015
    Bamberg Germany
    Posts : 12,388
    Microsoft Windows 10 Pro 64-bit 14393 Multiprocessor Free
       2016-10-10 #1

    @Brink,
    I just had to use this today
    Thanks to you and @Kari, I started exporting my VMs a short while ago(specially now that my Insider and Windows 8.1 VMs are licensed) and never needed to import.

    Today I did something really, really dumb!

    I was deleting my checkpoint sub trees totally on all three of my VMs(to recover what space, and all machines are/were working perfectly(yes, even the insider build)), and on my 3rd(insider build) I accidentally deleted it!
    Name:  Swearing.gif
Views: 396
Size:  43.2 KBName:  Swearing.gif
Views: 396
Size:  43.2 KBName:  Swearing.gif
Views: 396
Size:  43.2 KB

    Well, I'm now reimporting it...
    Click image for larger version. 

Name:	image.png 
Views:	23 
Size:	27.6 KB 
ID:	105213

    So I posted this to thank you & Kari, and also to show Hyper-V Geeks why it is very important to export!
      My System SpecsSystem Spec


  2. Joined : Feb 2015
    Bamberg Germany
    Posts : 12,388
    Microsoft Windows 10 Pro 64-bit 14393 Multiprocessor Free
       2016-10-10 #2

    Finished!
    Now to upgrade
    Again...!
    Click image for larger version. 

Name:	Image 001.png 
Views:	25 
Size:	38.3 KB 
ID:	105215
      My System SpecsSystem Spec


  3. Joined : Oct 2013
    Posts : 16,593
    64-bit Windows 10 Pro build 14986
       2016-10-10 #3

      My System SpecsSystem Spec


 


Similar Threads
Tutorial Category
Hyper-V Virtual Machine - Create Shortcut in Windows
How to Create Shortcut of Hyper-V Virtual Machine in Windows 8 and 10 There's nothing wrong in running the Hyper-V Manager and launch your virtual machines from there. However, creating a shortcut for each vm you have you can start them fast...
Tutorials
Hyper-V Virtual Machine - Add or Remove Physical Hard Disk
How to Add or Remove a Physical Hard Disk to Hyper-V Virtual Machine Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical...
Tutorials
Hyper-V Virtual Machine - See if Generation 1 or Generation 2
How to See if Hyper-V Virtual Machine is Generation 1 or Generation 2 Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical...
Tutorials
Solved Hyper-V Virtual Machine Crash When Audio Activates (Event 1000, 1026)
UPDATE: Problem solved. See post #14's "long story" for steps that led to the findings above as the same steps can aid in hunting down this type of issue if neither of the above applies. Hello, I recently did an in place upgrade to Windows...
Virtualization
Hyper-V Floppy Disk Drive - Remove in Windows Virtual Machine
How to Remove Floppy Disk Drive in Windows Hyper-V Virtual Machine Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical...
Tutorials
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 06:55.
Find Us
Twitter Facebook Google+



Windows 10 Forums