Use import and export feature, when you want to create a new virtual machine with the same configuration of an existing machine in Hyper-V.
The exported virtual machine files are saved in the server, and can be reused as many time as you want to create new VM.
Machine generates new SID while importing from the machine files. This future will help us to clone N number of virtual machine without any conflicts in same network.
I. Export Virtual Machine in Hyper-V
1. Export Menu Option
Connect to your Hyper-V server from Hyper-V Manger -> Right click on your virtual machine and select the export option.
In this example, we’ll export Windows 8 virtual machine from server1 (Hyper-v server).
2. Specify Export Folder Path
Specify the folder path to export virtual machine. After selecting folder path, export operation will start.
Please note that you can export a virtual machine even when it is in “On” (tun on) state.
3. Exported VM Files
After completing export operation you can see the virtual machine files in destination folder. This folder will contain Snapshots, Virtual Disks and Virtual machine files.
To import the VM, you need to copy all these three folders to the other server.
II. Import Virtual Machine in Hyper-V
1. Copy the VM Files
Copy the exported Virtual machine files and folders to your local server before you start import a virtual machine.
In this example, we will import a Windows 8 Virtual machine from Server 1 to Backup-Server.
Before importing virtual machine, I have Copied Windows 8 exported machine files from Server 1 to Backup-Server.
2. Import Virtual Machine Menu Option
Connect Hyper-V server from Hyper-V Manger, Right click on Hyper-V server and select Import Virtual Machine Option. Click next on the import virtual Machine page.
3. Select VM File Folder
Select the virtual machine folder path (This is the folder that contains the exported machine files).
4. Select the VM to Import
After selecting the path, it will show the machine name in import virtual Machine page. Select machine and click next.
5. Choose Import Type
Select the Import mode as per your requirement. Please note that exported files can be reused to clone machines only using “Copy The virtual machine (create a new unique ID)” option.
This has the following three options:
- Register the virtual machine in-place
- Restore the virtual machine
- Copy the virtual machine (In our example, we are going to select this option)
6. Choose Destination Location
Select the Virtual Machine storage location path to store virtual machine files. Accept the default values here. If you want to change the location, select the “Store the virtual machine in a different location” checkbox.
7. Choose Hard Disk Location
Select the folder path to store Virtual machine Hard disk. This is your storage location.
8. Finish the Import
Review your machine configuration selection, and click on Finish to complete the import process.