Search

MachPanel Knowledgebase

GUIDE:SOP for preparation of Windows Sealed Images for Hyper-V (Hosted VPS)

Mudesira Munir
Configuration

Summary

This article provides information about preparation of sealed images for Windows Virtual Machines.

Applies To
Applies to MachPanel v6.5.25 and onward.
    Procedure for creating Windows VM Sealed Images

    STEP-1: Crate 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:

    1. EFI System Partition (ESP) - SYSTEM
    2. Recovery Partition (WinRE) - MSR (Reserved)
    3. 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.

    This ensures that C: remains the last partition, allowing it to be extended via MachPanel automatically later when additional disk space is allocated.

    For an existing VM with different disk partitioning order:
    For an already prepared Sealed Image or VM, apply the steps highlighted in image below INSIDE THE VM to correct the partition layout. (If this needs to be used as sealed image for future deployments, sysprep the image again before using it for future deployments.

    Commands for reference:

    PS C:\Users\Administrator> reagentc /disable
    PS C:\Users\Administrator> diskpart
         DISKPART> list disk
         DISKPART> select disk 0
         DISKPART> list partition
         DISKPART> select partition 4
         DISKPART> delete partition override
         DISKPART> select partition 3
         DISKPART> extend

    Other Settings:

    1. Adjust the Windows Firewall as per your requirements.
    2. Install antivirus & monitoring tools, if any.
    3. Allow Remote Desktop Connection.
    4. Set local Administrator Password to Never Expire.

    STEP-2 Create 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: http://kb.machsol.com/Knowledgebase/Article/53471

    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: Seal The Images / Prepare Windows VM Sealed Images

    1. Download the sample / generic sysprep.xml file provided in download section in this article (adjust it if required per your requirements).
    2. Copy sysprep.xml to C:\Windows\System32\sysprep inside the VM that needs to become your sealed image / OS template.
    3. Open Command Prompt as Administrator
    4. Navigate to SysPrep Directory: CD C:\Windows\System32\sysprep>
    5. Run command:  sysprep.exe /generalize /oobe /shutdown /unattend:sysprep.xml
    6. On completion, you will find the VM in shutdown state.
    7. ​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.

     

    Download Ready to use Windows Sealed Images:

    You may download per-configured Gen1 and Gen2 Windows sealed images from the links below. These images are provided solely for your convenience and may be used at your own discretion and responsibility. MachSol does not warrant or assume any liability for their usage in your environment.

    • Windows Server 2019
      • https://www.machsol.com/Updates/SealedImages/WindowsServer2019Gen1SealedImage.zip
      • https://www.machsol.com/Updates/SealedImages/WindowsServer2019Gen2SealedImage-R2.zip
    • Windows Server 2022
      • https://www.machsol.com/Updates/SealedImages/WindowsServer2022Gen1SealedImage.zip
      • https://www.machsol.com/Updates/SealedImages/WindowsServer2022Gen2SealedImage-R2.zip
    • Windows Server 2022 with SQL Server:
      • https://www.machsol.com/Updates/SealedImages/WinServer2022WithSQL2019.zip
    • Windows Server 2025
      • https://www.machsol.com/Updates/SealedImages/WindowsServer2025Gen1SealedImage.zip
      • https://www.machsol.com/Updates/SealedImages/WindowsServer2025Gen2SealedImage-R2.zip
    • Windows 11 Pro
      • ​​https://www.machsol.com/Updates/SealedImages/Windows11Pro.zip
    • Windows 11
      • https://www.machsol.com/Updates/SealedImages/Win11-SealedImage.zip

      ​

    Download
    Sysprep.zip
    1.00 KB, 1.9K views
    Details
    Type: GUIDE
    Access Type: Public
    Last Modified: Yesterday @ 12:04 PM
    Last Modified By: zohaib.shaikh
    Rated 2 stars based on 33 votes.
    Article has been viewed 38K times.
    Options
    Also In This Category
    Tags