This is information on how to properly clone a pre-made virtual machine. This VM must be removed fully patched, removed from the domain, have no atached devices (CD images, USB drives, etc), and be SysPrepped.
This involves a few steps:
- Creating the initial machine
- Create new VM
- Revert back to pre-sysprep snapshot
- 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
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
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.
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.
- How to Clone VM (Virtual Machine) in Hyper-V
- How To Sysprep