HyperV Cloning

From Help
Jump to: navigation, search

Format: Brief Scope

Return to Main Page

Outline

This involves a few steps:

  • Creating the initial machine
  • Sysprep
  • Copy
  • Create new VM
  • Revert back to pre-sysprep snapshot

Return to Top

Initial Machine

  • First, make sure all the updates are installed
  • Do not join to any domain yet
  • Disconnect any CDRom images
  • Install and update any "base" apps
  • Shut down the machine and make a snapshot in Hyper-V Manager

Return to Top

SysPrep

SysPrep is a built-in application that returns a machine to a "base" state. It resets the SID, PC name, etc but retains any installed apps, updates, and other user data. It is usually located in %SystemRoot%\System32\Sysprep folder (usually c:\windows\system32\sysprep).

  • Run the Sysprep.exe, make sure you checkbox "Generalize"
  • Choose "Shutdown"
  • Let it run and shut down

Return to Top

Copy

Copying the virtual disk it the quickest, although you can also "Export" the machine.

  • Browse to the location the Hard Disk Image file (usually .vhdx) is located
  • Copy this to your storage location
  • Copy this to your new Hyper-V location, renaming if needed.

Return to Top

Create new VM

  • In Hyper-V Manager, select New -> Virtual Machine in the Actions pane.
  • Follow the New Virtual Machine Wizard instruction by entering the required values and then click on Next button.
  • On the “Connect Virtual Hard Disk” screen, select the radio button of Use an existing virtual hard disk, then specify the location of the virtual hard disk in the Location box. You can click on Browse button to select the VHD or VHDX directly.
  • Complete the “New Virtual Machine Wizard”, and the clone virtual machine that is identical with origin virtual machine is created and listed in Hyper-V Manager.

Return to Top

References

  • How To Sysprep

https://blogs.technet.microsoft.com/danstolts/2014/05/how-to-sysprep-sysprep-is-a-great-and-powerful-tool-and-easy-too-if-you-know-how-step-by-step/

Return to Top