This article provides information about preparation of sealed images for Windows Virtual Machines.
Applies to MachPanel v5.3.10 and onward.
Procedure for creating Windows VM Sealed Images
STEP-1: CREATE VM
Minimum Disk Space 10-12 GB: Create a VM to host the operating system of your choice with minimal disk space i.e. from 10 to 12 GB, as the purchased storage will then be added to respective VM later based on Service Plans.
- Adjust the Windows Firewall as per your requirements.
- Install antivirus & monitoring tools, if any.
- Allow Remote Desktop Connection.
- Set local Administrator Password to Never Expire.
STEP-2: SEALED IMAGE NAME for GEN1 & GEN2:
Sealed Image Name for Gen1 & Gen2:
MachPanel creates and identifies Gen1
type Virtual Machines based on sealed image file name. Make sure the .vhdx
file name contains R2
” to create Gen2
VM during provisioning.
STEP-3 SCHEDULED TASK
In order to set passwords of VM, we need to create a "Scheduled Task" in sealed image. Please review details below to create a scheduled task to allow
MachPanel to "Set Password" and process other OS initialization steps in Gen1 &
Gen2 VM: http://kb.machsol.com/Knowledgebase/Article/53471
There is a difference between creation of scheduled task for Gen1 and Gen2 type virtual Machines as explained below:
- Scheduled Task for Gen1: For Gen1, you must add a "Floppy Disk" with VM of sealed image and Set Action to run “A:\Config.bat”.
- Scheduled Task for Gen2: For Gen2, you must add a "Scheduled Task" where Set Action to run “C:\Config.bat” because you can't create floppy for Gen2.
STEP-4: PREPARE WINDOWS VM SEALED IMAGES
Important: In windows startup, create a .bat file named as startup.bat and add A:\Config.bat as text in startup.bat file. (You can download the startup.bat directly from DOWNLOAD file section below found inside sysprep.zip file)
Install the desired operating system in VHD created in STEP-1. To sysprep the above windows installation do the following:
- Sample / Generic sysprep.xml file is provided. You can adjust it as per your requirements.
- Copy sysprep.xml to C:\Windows\System32\sysprep
- In Command Prompt type: C:\windows\system32\sysprep>sysprep /generalize /oobe /shutdown /unattend:sysprep.xml
- On completion, you will find the OS in shutdown state.
- Your sealed image is ready. Copy this VHD to some other safe place.
- You will need to specify the path to the folder that contains these VHDs in MachPanel configuration.
Note: Please download sysprep.zip file from the DOWNLOAD File section. This zip file contains both startup.bat and sysprep.xml.