Export and import virtual machine in Hyper-V
The mechanism of export and import in Hyper-V is designed to move virtual machines from one computer or server to another. Export is, in fact, copying a virtual machine the configuration. When you export a copied virtual hard disk, hardware settings, saved the time of operation of the guest OS created checkpoints (snapshots).
The mechanism of export and import Hyper-V can also be used to create on the same server or on the same computer as the virtual machine clone to test and communicate with the virtual machine-the original. Machine-clone can get the other ID (ID), another internal IP address Hyper-V network, as a result, in fact, does not differ from virtual machines created from scratch.
Below we consider the process of export-import of virtual machines for example, Hyper-V, included in Windows 10, more details.
1. Export a virtual machine
One of the advantages of the new version of Hyper-V included in Windows Server 2012 R2, Windows client 8.1 and 10 is the ability to implement some resource-intensive tasks, in particular, the export on the fly, in the process of the virtual machine without stopping it, even without pausing. The export is done in the background, he is not fast, because it uses small amount of system resources, leaving the user the opportunity to work with the virtual machine on.
How to export a virtual machine? Select the Hyper-V Manager, the virtual machine context menu. We need the command «Export».
Next, use the browse button and specify the storage path of the export file. Click «Export».
2. Exporting a virtual machine snapshot
Another relatively new feature of Hyper-V, which was not in the older server versions of Windows – ability to export individual control points, i.e., the virtual machine state at the time of the creation of this checkpoint. Previously, the Microsoft hypervisor provides only export and import the entire virtual machine. And if needed as a separate checkpoint, I had to export the virtual machine with all of its control points, and after the import to roll back to the right. Now Hyper-V allows you to export each individual control point. Exporting individual snapshot, it can then be imported as a new VM, in particular, with its unique ID on the same server or computer.
To export a virtual machine from a control point, select the Hyper-V Manager, and control point. In the last context menu and select «Export».
3. The reliability of the export format Hyper-V
Export virtual machines Hyper-V is not in a separate compressed file format, and where to put the virtual hard disk and configuration files, and the saved state of the guest OS, as proposed by the mechanism of export-import in the program VirtualBox. In the case of virtual machines of VirtualBox export-import is possible with the assistance of a mediator – file OVA format. If you damage this file, you import the virtual machine VirtualBox can not take place. But in the case of Hyper-V export virtual machine means a complete copy of the virtual hard disk in its original format called VHDX (or VHD).
Thus, if data export is damaged, the virtual machine can still be recreated. You will need the Hyper-V tools to create a new virtual machine using an existing file VHDX (VHD).
4. Import virtual machine
Exported virtual machine can then be imported into compatible versions of Hyper-V in the server editions of Windows client and Windows 8.1 and 10.
To import virtual machines select an appropriate option from Hyper-V Manager.
Click «Next» in the welcome window of the wizard.
In the next window use the browse button and specify the path to the folder with the exported virtual machine. Click «Next».
Select the desired virtual machine if the specified folder has several. Click «Next».
Then you need to make a choice, how will the imported virtual machine. If migrated from another server or computer, you can use the first type of import, which includes registration with the source ID. This option registers the virtual machine in the same folder where the file is stored its exports, consequently, would not the time spent copying files.
The second type of import is also suitable for cases of moving a virtual machine from another server or computer, but it uses the exported files will be moved to the specified folder. The virtual machine ID will remain the same.
If the virtual machine is moved within a single server or computer, you should use the third import type, involving the generation of a new identifier. After all, one physical computer may not be virtual machines on Hyper-V with the same ID.
In our case, is the place to be to copy the virtual machine, this is the third type of import. Click «Next».
The storage path configuration files, checkpoint and other data to be imported virtual machine, the specified Hyper-V default, can be changed. It is necessary to tick the change the storage location and manually specify the correct path.
In our case, just fill in the path (after slash) create a separate folder and «Copy». Click «Next».
The same way we specify and the VHDX file that everything is in one place. Click «Next».
The final stage of the master summary data import. Click «Done».
Now, in our case, the Hyper-V Manager there are two identical virtual machines. They have different IDs, but they have the same name. Change the name of the newly imported virtual machine.
All the import process is implemented. The imported virtual machine can be run and tested.