Home VM Backup How to Easily Clone VM in Hyper-V in 4 Ways?

How to Easily Clone VM in Hyper-V in 4 Ways?

2023-01-12 | Nick Zhao

Table of contents
  • Why you need to clone VM in Hyper-V?
  • How to directly clone VM in Hyper-V with Windows Admin Center?
  • How to make VM template and clone VM in Hyper-V Manager?
  • How to clone VM in Hyper-V with PowerShell?
  • How to backup and restore Hyper-V VM with Vinchin Backup & Recovery?
  • Sum Up
Are you looking for an easy Hyper-V backup and migration solution? Try Vinchin Backup & Recovery!↘ Download Free Trial

Hyper-V is a popular server virtualization solution. It can be easily enabled on Windows operating systems including Windows 10, Windows Server, etc. In the daily use of Hyper-V, sometimes VM clone is needed for VM backup or migration.

Why you need to clone VM in Hyper-V?

One of the features of virtual environment is flexibility. New VMs are frequently created and old VMs are frequently moved. When some applications are needed on a host, migrating applications will take a long time and the procedures are sophisticated. Cloning the entire VM can help skip the procedures of VM configuration and application installation so it's time-saving.

You can directly clone a Hyper-V VM with Windows Admin Center, but it is still recommended to get to know the way to make a Hyper-V template with Hyper-V Manager.

Except for once-off clone, you can also get to know how Hyper-V Replica regualrly replicates Hyper-V VM to a secondary datacenter for further data protection.

How to directly clone VM in Hyper-V with Windows Admin Center?

Windows Admin Center is a locally deployed, browser-based app for managing Windows servers. It supports direct VM clone but you need to download and install it on the server.

1. Under Tools, select Virtual machines > locate the Hyper-V VM > select Manage

2. Click Clone on the panel

3. Give it a name > select where to store it

4. Confirm the task

Windows Admin Center

How to make VM template and clone VM in Hyper-V Manager?

Hyper-V Manager is the GUI for Hyper VM Management. There ared no options for VM Clone but there is a workaround for that, exporting VM from one host and then importing VM to another.

When you import VM, there will be 3 import types, Register the virtual machine in-place (use the existing unique ID), Restore the virtual machine (use the existing unique ID), and Copy the virtual machine (create a new unique ID). If you import VM on the original host, you can only select Copy the virtual machine when the original VM is still on the host.

If a Windows VM needs to be frequently cloned, you can make a VM template out of it to let you have more choices when importing VM. This requires you to run Sysprep (a Windows built-in application) before exporting VM to removes specific information from the Windows image, including the VM's security identifier (SID).

Run Sysprep:

This application can be found in the directory, C:WindowsSystem32sysprep. You can also open the folder by running %WINDIR%system32sysprep.

In the folder, click sysprep.exe to open it. It is suggested to select Enter System Out-of-Box Experience (OOBE) in System Cleanup Action, check Generalize, and select Shutdown in Shutdown Options. For physical machine, this operation is often used to prepare the PC for delivery to a customer. For virtual machine, this operation will make the VM export easily cloned later.

Note: After the system information is removed by Sysprep, it will take a bit longer time to log into new machine for the first time and Welcome to Windows screen will appear.

After you run Sysprep on Windows VM, you can use Hyper-V Manager to make a VM template out of it.

Export VM from Hyper-V Manger:

Hyper-V Manager allows exporting running machine.

1. In Hyper-V Manager, right-click the virtual machine > select Export

2. Specify a directory to store the VM export > click Export

Export Hyper-V

Clone the VM with Hyper-V Manager:

1. Right-click a host > select Import Virtual Machine

2. The Import Virtual Machine Wizard will be open > click Next

3. Select the VM export > click Next

4. Select the VM to import > click Next

5. Select the Import Type > click Next

6. Select folders for configurations, checkpoints, etc. > click Next

7. Select the folder to store VHD > click Next

8. Review the summary > click Finish

Import Hyper-V

How to clone VM in Hyper-V with PowerShell?

Export and import procedures with Hyper-V Manager can be also completed using PowerShell.

To export Hyper-V VM, type the command below:

Export-VM -Name <vm name> -Path <path>

To import VM to Hyper-V host, select an import type and the type the corresponding command below:

Register in place:

Import-VM -Path 'C:<vm export path>2B91FEB3-F1E0-4FFF-B8BE-29CED892A95A.vmcx'

Restore:

Import-VM -Path 'C:<vm export path>2B91FEB3-F1E0-4FFF-B8BE-29CED892A95A.vmcx' -Copy -VhdDestinationPath 'D:Virtual MachinesWIN10DOC' -VirtualMachinePath 'D:Virtual MachinesWIN10DOC'

Import as a copy:

Import-VM -Path 'C:<vm export path>2B91FEB3-F1E0-4FFF-B8BE-29CED892A95A.vmcx' -Copy -GenerateNewId

How to backup and restore Hyper-V VM with Vinchin Backup & Recovery?

Vinchin Backup & Recovery is a professional and reliable backup and disaster recovery solution for Hyper-V and it can be also used to clone Hyper-V VM to another host. You can backup Hyper-V VM agentlessly and then use the VM backup to restore it to any Hyper-V server or even move Hyper-V VM to another virtualized host on a user-friendly web console.

For exmaple, if you would like to create a backup job for Hyper-V VM:

1. Select the Hyper-V VM

Select Hyper-V VM

2. Specify the backup destination

Specify Backup Destination

3. Select backup strategies

Select Backup Strategies

4. Submit the job

Submit the Job

Vinchin Backup & Recovery has been selected by thousands of companies and you can also start a 60-day full-featured free trial here. Also, contact us, leave your requirements, and then you will receive your tailored solution. We have established partnerships with reputable companies all over the world so if you would like to do a local business, you can select a local partner here.

Sum Up

Cloning applications might take a lot of time so you can clone the entire VM in Hyper-V environment to save time. If a VM needs to be frequently cloned, you can make a Hyper-V VM template out of it with Hyper-V Manager.

Vinchin Backup & Recovery will help not only clone Hyper-V VM but also provide comprehensive protection to virtual environment. Don't miss the free trial.

Share on:

Categories: VM Backup