How to import Hyper-V virtual machines in Windows 10
General information
As we know, Hyper-V allows running virtual computer systems on a physical server.These virtualization systems (also known as guest) can be used and managed similarly to physical computer systems, however, they basically exist in Virtualized and isolated environment.
You can use Hyper-V export and import functions to quickly copy virtual machines.Virtual machines can then be used to back up data, or it could be a way to move a virtual machine between Hyper-V servers.
The import function allows you to restore virtual machines.You don't need to export a virtual machine to import it again.Simply understood, the import function will attempt to recreate the virtual machine from anything available.The import of a virtual machine will register that virtual machine with the Hyper-V server.An exported virtual machine can be imported back into the server from which it was created, or it can also be imported into a new server.
This article will show you how to import a Hyper-V virtual machine (client) on your Windows 10 computer (server).However, you must log on to Windows as an administrator to be able to import the Hyper-V virtual machine.
Note: Hyper-V is only supported in Windows 10 Pro, Windows 10 Enterprise, and Windows 10 Education versions.
How to import Hyper-V virtual machines in Windows 10
- General information
- Proceed to import Hyper-V virtual machines using the Hyper-V Manager
- Enter Hyper-V virtual machines using PowerShell
Proceed to import Hyper-V virtual machines using the Hyper-V Manager
1. Open the Hyper-V manager (Hyper-V Manager).
2. On the left side, select the Hyper-V server you want to import a virtual machine into (for example: "BRINK-DESKTOP") and click Import Virtual Machine in the Actions pane on the right (see screenshot below).
3. In the Before you Begin window, click Next (see screenshot below).
4. Click Browse , then navigate to and select the folder (eg "Windows 7 Ultimate") containing the virtual machine (.vmcx file) you want to import, click Select Folder and then Next (see snapshot) screen below).
5. Select the virtual machine (eg "Windows 7 Ultimate") that you want to import, and click on Next (see screenshot below).
6. Select the input type you want to perform, click Next and go to step 7 or step 8 below (depending on the input method you have selected (see screenshot below).
Input type
Describe
Register the virtual machine in-place (register the virtual machine in place)
The current location of the Export file is the place from which the virtual machine will be run.When imported, the virtual machine will have the same ID as when it was exported.Therefore, if the virtual machine has been registered with Hyper-V, it needs to be deleted before the import is performed.When the import process is complete, the Export files will become files in the running state and cannot be deleted.
Restore the virtual machine
You are given the option to store VM files in a specific location or use the default locations for Hyper-V.This input will create a copy of the exported file and move them to the selected location.When imported, the virtual machine will have the same ID as when it was exported.Therefore, if the virtual machine is already running in Hyper-V it needs to be deleted before the import can be completed.Once the import process is complete, the exported files will not be affected and can be deleted or re-imported.
Copy the virtual machine
This input is similar to the recovery type above, in which you select a location for VM files.The difference is that when you import the virtual machine there will be a new unique ID.This allows virtual machines to be imported into the same server multiple times.
7. If you select Register the virtual machine in-place
Click Finish on the Summary window and go to step 9 below (see screenshot below).
8. If you select Restore the virtual machine or Copy the virtual machine
A) If you want, you can specify new or immediate use of existing directories to store virtual machine files.When done, click Next .(see screenshot below).
B) Browse and select the folder where you want to store the imported virtual hard disks (.vhdx files) for this virtual machine and click on Next (see screenshot below).
In the Summary window, click Finish and move on to step 9 below.(see screenshot below)
Note: It may take a while for the computer to finish copying virtual machine files and hard disks to the selected folder location (s).
9. The Hyper-V virtual machine (for example, "Windows 7 Ultimate") is now imported into the selected Hyper-V server (for example, "BRINK-DESKTOP").(see screenshot below)
10. After completing the virtual machine import, you can close Hyper-V Manager if you want.
Enter Hyper-V virtual machines using PowerShell
1. Open PowerShell.
2. Perform step 3 (in-place), step 4 (in-place) (in-place) or step 5 (copy) below for the input type you want to perform.
3. Register the virtual machine in place (Register the virtual machine in-place) (use existing unique ID)
Attention
The current location of the Export files is where the virtual machine will be run.When imported, the virtual machine has the same ID as when it was exported.Therefore, if the virtual machine has been registered with Hyper-V, it needs to be deleted before the import process can proceed.When the import process is complete, the Export files will become running status files and cannot be deleted.
A) Type the command below into PowerShell, press Enter and go to step 6 below (see screenshot below).
Import-VM -Path ' full path of virtual machine file .vmcx '
Note: Replace the ' full path of the virtual machine file .vmcx ' in the above command with the actual full path of where the .vmcx virtual machine file you want to import is located.
For example
Import-VM -Path ' D: Vitual Machines Windows 7 UltimateVirtual Machines7BEDECF9-E91F-4115-9E86-BBFEE136D881.vmcx '
4. Restore virtual machine (Restore the virtual machine) ((using existing unique ID)
Attention
You have the option of storing VM files in a specific location or using the default locations for Hyper-V.This input will create a copy of the exported file and move them to the selected location.When imported, the virtual machine has the same ID as when it was exported.Therefore, if the virtual machine is already running in Hyper-V, it needs to be deleted before the import process can be completed.Once the import process has completed, the exported files will not be affected and can be deleted or re-imported.
A) Type the following command in PowerShell, press Enter and go to step 6 below (see screenshot).
(To use the default Hyper-V directory for importing and copying virtual machines .vmcx and .vhdx files on virtual hard disks)
Import-VM -Path ' full path of .vmcx ' file -Copy
Or
(To specify the Hyper-V directory for importing and copying virtual machines .vmcx and .vhdx files on virtual hard disks)
Import-VM -Path ' full path of the .vmcx ' -Copy -VhdDestinationPath file ' full path of the directory to copy the full .vhdx' -VirtualMachinePath 'file of the directory to copy the .vmcx file '
Note
- Replace the ' full path of the .vmcx file ' in the above commands with the actual full path of where the .vmcx virtual machine file you want to import is located.
- Replace the ' full path of the directory to copy the .vhdx file ' in the second command above with the actual directory path of where you want to copy the virtual hard disk .vhdx file of the virtual machine you want to import.
- Replace the ' full path of the directory to copy the .vhdx file in the second command above with the actual directory path of where you want to copy the .vmcx virtual machine file of the virtual machine you want to import.
For example:
Import-VM -Path ' D: Vitual Machines Windows 7 UltimateVirtual Machines7BEDECF9-E91F-4115-9E86-BBFEE136D881.vmcx' -Copy -VhdDestinationPath 'D: Vitual MachinesWindows 7 Ultimate - Copy' -VirtualMachinePath 'D: Vitual MachinesWindows 7 Ultimate - Copy '
5. Copy the virtual machine (Copy the virtual machine) (create a new unique ID)
This type of input is similar to the Restore type above, in which you select a location for VM files.The difference is that when the virtual machine is imported, it will have a new unique ID.This allows Virtual Machines to be imported into the same server multiple times.
A) Type the following command in PowerShell, press Enter and go to step 6 below (see screenshot).
(Use the default Hyper-V directory to import and copy the virtual machine .vmcx and the .vhdx files on the virtual hard disk)
Import-VM -Path ' full path of the .vmcx file ' -Copy -GenerateNewId
Or
(Specify the Hyper-V directory to import and copy the virtual machine .vmcx and the .vhdx files on the virtual hard disk)
Import-VM -Path ' full path of the .vmcx ' -Copy -VhdDestinationPath file ' full path of the directory to copy the .vhdx' -VirtualMachinePath 'file The full path of the directory to copy the .vmcx file -GenerateNewId
Attention
- Replace the ' full path of the .vmcx file ' in the above commands with the actual full path of where the .vmcx virtual machine file you want to import is located.
- Replace the ' full path of the directory to copy the .vhdx file ' in the second command above with the actual path of the directory where you want to copy the virtual hard disk .vhdx file of the virtual machine you want to import.
- Replace the ' full path of the directory to copy the .vhdx file ' in the second command above with the actual path of the directory where you want to copy the .vmcx virtual machine file of the virtual machine you want to import.
For example:
Import-VM -Path ' D: Vitual Machines Windows 7 UltimateVirtual Machines7BEDECF9-E91F-4115-9E86-BBFEE136D881.vmcx' -Copy -VhdDestinationPath 'D: Vitual MachinesWindows 7 Ultimate - Cop y' -VirtualMachinePath ' D: Vitual MachinesWindowsPath ' D: Vitual MachinesWindows 7 Ultimate - Copy -GenerateNewId
6. Once done, you can close PowerShel if you want.
Good luck!
See more:
- How to export Hyper-V virtual machines in Windows 10
- Setting up Ubuntu virtual machine with Hyper-V Quick Create on Windows 10
- Create virtual machines with Hyper-V on Windows 8 and Windows 10
- Instructions for installing Ubuntu on VMware Workstation - Part 1
You should read it
- Create virtual machines with Hyper-V on Windows 8 and Windows 10
- Create virtual machines in Hyper-V on Windows Server 2008
- How to check if your computer is running Windows 10 Hyper-V?
- Monitor Hyper-V with the command line (Part 2): Basic monitoring commands
- Monitor Hyper-V with the command line (Part 3): Check virtual machine status
- Monitor Hyper-V with the command line (Part 1): Install the monitoring library
- Instructions for using Hyper-V on Windows 8 (Part 1)
- Instructions for installing Hyper-V
May be interested
- Create private cloud with Hyper-V (Part 3)in the previous lesson, we created the hyper-v task sequence. now is the time to make this task sequence change so that we can use them to create hyper-v servers that manage virtual machines in the private cloud.
- How to create a virtual machine repository for Hyper-V Quick Createquick create is a feature in hyper-v that allows users to set up new virtual machines with just a few mouse clicks.
- Monitor Hyper-V with the command line (Part 4)among the hardware resources that are usually assigned to virtual machines, perhaps the memory is most fixed. this tutorial will show you how to manage virtual machine memory through windows powershell.
- Monitor Hyper-V with the command line (Part 2): Basic monitoring commandsin this article, we will learn how to access the virtual machine list and see general information about virtual machines with simple powershell statements. we will also look at stop commands and start virtual machines from the command window.
- How to create a virtual machine in Windows Server 2012in this article, we will look at how to create a virtual machine. first, you need to open the hyper-v manager and then follow the steps below.
- How to fix the problem of not being able to start Windows 11 after enabling Hyper-VORhyper-v is microsoft's out-of-the-box solution for running virtual machines. while it may not have as many features as other hypervisors, it still gets the job done.
- Monitor Hyper-V with the command line (Part 3): Check virtual machine statusthe previous article showed you how to turn on and off the virtual machine with the command line. this article will introduce two methods of validating that virtual machines are running and responding.
- Create private cloud with Hyper-V (Part 4)the previous article showed users how to create executable image files and assign image files to windows deployment services. although the image file that we created can start immediately, it is not ready for use yet. because we are creating a private cloud with the ultimate goal of being able to create machines
- Use Quick Migration to move virtual machines between Hyper-V hostswith quick migration, users can easily move an active virtual machine from a real host system through another system with a minimum downtime, while ensuring performance and performance. necessary stability. by using windows server hyper-v or windows server 2008 with hyper-v, along with quick migration, the manager can fully take the initiative.
- Use the Virtual Machine Manager to quickly deploy Hyper-Vthe tips in this article will show you how to quickly deploy virtual machines using the system center virtual machine manager (scvmm) management program of hyper-v.