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: 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.

    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.
    5. Fresh Sealed Image
      During OS installation, at the partition creation stage, ensure the following partition order:
      EFI System Partition → Recovery Partition → Windows (C:)

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

      Existing Sealed Image or VM
      For an already prepared Sealed Image or for a VM already deployed requiring Disk Expand, apply the steps highlighted in image below INSIDE THE VM to correct the partition layout, and then re-sysprep the image before using it for future deployments.

     

    Text Format (Commands in BOLD):

    PS C:\Users\Administrator> reagentc /disable
    REAGENTC.EXE: Operation Successful.

    PS C:\Users\Administrator> diskpart

    Microsoft DiskPart version 10.0.26100.1150
    Copyright (C) Microsoft Corporation.
    On computer: 3-INSTALLERTEST

    DISKPART> list disk

      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          100 GB    70 GB        *

    DISKPART> select disk 0
    Disk 0 is now the selected disk.

    DISKPART> list partition

      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    System             100 MB  1024 KB
      Partition 2    Reserved            16 MB   101 MB
      Partition 3    Primary             29 GB   117 MB
      Partition 4    Recovery           674 MB    29 GB

    DISKPART> select partition 4
    Partition 4 is now the selected partition.

    DISKPART> delete partition override
    DiskPart successfully deleted the selected partition.

    DISKPART> select partition 3
    Partition 3 is now the selected partition.

    DISKPART> extend
    DiskPart successfully extended the volume.
    DISKPART> 

     

    STEP-2: SEALED IMAGE FILE NAME for GEN1 & GEN2:

    Sealed Image File Name for Gen1 & Gen2: MachPanel creates and identifies Gen1 and Gen2 type Virtual Machines based on sealed image file name. Make sure the .vhdx file name contains R2 like "SealedImageName-R2.vhdx” to create Gen2 VM during provisioning (Example: WindowsServer2022-R2.vhdx). For a sealed image that needs to be used for Gen1, simply exclude "R2" from file name (Example: WindowsServer2019.vhdx).

    STEP-3 SCHEDULED TASK

    In order to set Machine Name, Password and IP Address 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

    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-4: SEAL THE IMAGES / PREPARE WINDOWS VM SEALED IMAGES

    To SYSPREP the windows installation do the following:

    1. Sample / Generic sysprep.xml file is provided. You can adjust it as 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. In Command Prompt type: C:\windows\system32\sysprep>sysprep /generalize /oobe /shutdown /unattend:sysprep.xml
    4. On completion, you will find the OS in shutdown state.
    5. ​Your sealed image is ready. Copy the VHD/VHDX file of this VM to some other safe place.
    6. You will need to specify the path to the folder that contains your prepared VHDs in MachPanel configuration.

    Note: Please download sysprep.zip file from the DOWNLOAD File section. This zip file contains sysprep.xml.

    Ready to use windows sealed images:

    You may download pre-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
      • 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: 8 hours ago
    Last Modified By: zohaib.shaikh
    Rated 2 stars based on 33 votes.
    Article has been viewed 37K times.
    Options
    Also In This Category
    Tags