Symptoms
A new VM cannot be created from a Windows template due to SID doesn't change.
When you try to create a new VM based on a windows template by using --changesid option you may notice this output because sid is not changed and this avoids the proper creation.
[root@pcscm020 ~]# prlctl create newVM -t win2016-std-en --vmtype vm --changesid
WARNING: You are using a deprecated CLI component that won't be installed by default in the next major release. Please use virsh instead
Creating the VM on the basis of the win2016-std-en template...
Clone the win2016-std-en VM to VM newVM...
Copying hard disk 0 100%
Copying hard disk 0 100%
Failed to clone the VM: Unable to change the Windows security identifier. The Windows security identifier could not be changed.
Cause
From the latest Windows versions, the option --changesid of prlctl tool doesn't work because Microsoft has changed its way to manage SID settings and now it should be through using of sysprep.
Reference:
Resolution
Procedure
- Inside Windows VM used to create the new template:
Via UI:
a. Open file explorer and enter:%systemroot%\System32\Sysprep
b. Open sysprep.exe tool
c. Click Generalize, click Shutdown, and then click OK to generalize the image and shut down the VM.
or
Via Command:
a. Run Sysprep from Command Prompt:%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobeb) Shutdown the VM
Reference:
https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation?view=windows-11 - Create a new Windows template based on the recent VM modification.
Reference:
https://docs.virtuozzo.com/virtuozzo_hybrid_server_7_command_line_reference/managing-virtual-machines/prlctlvm.html?#prlctl-clone - Test creating a new VM by using new template generated.
# prlctl create VMname -t win2016-std-en --vmtype vm
* -t option: to specify the template used
Related Tickets
#398202