Cloning a server takes an exact copy of an existing machine. A cloned server is, for most purposes, an exact copy of the source. When a server is cloned, the SID is retained. Server cloning is a useful tool, if your need is to setup up a server similar to what you already have, and wish to skip the hassle of configuring a new server from scratch. Cloning requires that your server is shut down. I have already written an article on how to Sysprep a VM (Windows Server). Kindly follow the steps discussed in this guide: Sysprep (Generalize) a Windows installation: How to perform Sysprep in Windows, and how to clone a Windows Server running on VirtualBox.
Note: Before you can perform cloning, your VM MUST be switched (Turned) off. Therefore, after cloning, you will have to sysprep the server. Sysprep removes PC-specific information from a Windows installation, "generalizing" the installation so it can be installed on different PCs. Follow the steps to do theseclone your server. - Right-click on the VM and select Manage and then Clone as shown below.
On the Clone Virtual Machine wizard, click on Next to continue
On the Clone source window, select “The current state in the virtual machine” as shown below.
– Click on Next to continue.
On the Clone Type window, select the second option to create a full clone. Click on Next when you are done.
Enter the name of the HyperV and select a storage location for the VM files. You can leave it as default.
As you can see, the VM is being cloned. This will take a while to complete.
The VM cloning has completed as shown below. Click on close to finish this process.
Part B – Sysprep: After cloning a virtual machine in VMware/Proxmox/Hyper-V/VirtualBox, you may need to run the system prepare tool also referred to as Sysprep.exe in windows. In a domain-joined environment, Sysprep will strip off the unique security identifier (SID) and prevent two devices from having the same IP or name.
Sysprep prepares a Windows installation (Windows client and Windows Server) for imaging, allowing you to capture a customized installation. Sysprep removes device-specific information from a Windows installation, “generalizing” the installation so it can be reused on different devices. With Sysprep, you can configure the PC to boot to audit mode, where you can make additional changes or updates to your image. Or, you can configure Windows to boot to the Out-of-Box Experience (OOBE).
To Sysprep your VM, power on the VM as shown below. This method applies to the virtualization solution you are using.
Step 1: Navigate to C:\Windows\System32\Sysprep. Double-click on the Sysprep.exe file to run the entire Windows setup process.
If it fails, you may have to run Sysprep as an Administrator or check the log for specific errors and eliminate it. Please see this guide on “Sysprep cannot validate Windows installation“
Next, you are prompted to customize your Windows Server. Enter your home country/region, preferred app language, and keyboard layout. See how this is done in Windows Server 2016 and Windows Server 2019.
Enter your license key. If you do not have one at the moment, this can be done later. For this, click on “Do this later” as shown below. Kindly refer to some related guides: How to use Software Licensing Management Tool (slmgr) to install and uninstall Windows product key, how to find your Windows 10 Product key, and how to check Windows 10 activation status and change your product key
Accept the license term as shown below
Your Server will restart and be ready for use as shown below. Note: Before you will get to this window below, you will be required to log on.
I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.