This article provides information about preparation of sealed images for Windows Virtual Machines with MS SQL Server 2022.
Applies to MachPanel v8 and onward.
Procedure for creating Windows VM Sealed Images with MS SQL Server 2022
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.
Required Partition Settings:
Proper disk partitioning is critical for successful deployment. The recommended partition order is:
- EFI System Partition (ESP) - SYSTEM
- Recovery Partition (WinRE) - MSR (Reserved)
- Windows (C:) - Primary
Hint : Create the Windows (C:) partition first (by selecting "New" in the Windows Setup dialog), Windows Setup automatically creates the required UEFI/GPT partitions in the correct order behind the scenes.

STEP-2 SCHEDULED TASK
In order to set Machine Name, Password and IP Address of VM, a
"Scheduled Task" in sealed image must be created. 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: Creating Scheduled Task
Note: There is a difference between creation of scheduled task for Gen1 and Gen2 type virtual Machines. Please check details in above KB and create task accordingly.
STEP-3 Installing Microsoft SQL Server 2022 as Built-in part of Windows Sealed Image
Perform these steps on your reference Windows Server 2022 machine before running Windows SysPrep
- Mount or attach the SQL Server 2022 Standard installation media to VM.
- Launch
setup.exe to open the SQL Server Installation Center
- In the left navigation menu, click Advanced
- Select Image preparation of a standalone instance of SQL Server
- Accept License terms
- Select the desired Features
- Give Instance ID , (e.g. MSSQLSERVER, SQL2022STD)
- Complete rest of steps, click prepare

STEP-4: SEAL THE IMAGES / PREPARE WINDOWS VM SEALED IMAGES
- Download the sample / generic sysprep.xml file provided in download section in this article (adjust it if required per your requirements).
- Copy sysprep.xml to C:\Windows\System32\sysprep inside the VM that needs to become your sealed image / OS template.
- Open Command Prompt as Administrator
- Navigate to SysPrep Directory: CD C:\Windows\System32\sysprep>
- Run command: sysprep.exe /generalize /oobe /shutdown /unattend:sysprep.xml
- On completion, you will find the VM in shutdown state.
- Your sealed image is ready. You can copy this
<name>.VHD / <name>.VHDX file to MachPanel's Sealed Image
repository directory and specify the path to the prepared file in
MachPanel configuration.
STEP-5: After VM Provisioned
On Each VM deployment
- Use the “Image completion of a prepared stand-alone instance” from start menu
- During SQL Complete Image, provide:
- Product key (for Standard edition)
- Instance name (can differ from Instance ID)
- Service accounts (e.g., NT Service\MSSQLSERVER or domain accounts)
- SQL Server administrators (Add current user)