VMStack makes Windows Server 2022 and 2025 servers from a template you build once: a sysprepped Windows disk with the VirtIO drivers, the QEMU guest agent and cloudbase-init. At each new server's first start, cloudbase-init reads a config drive the node gives the server: it sets the host name, grows the disk, and runs VMStack's script, which sets the Administrator password and the network. The panel can build the template for you, unattended, from Microsoft's ISO.
Licensing comes first#
VMStack sells, counts and reports no Windows licences. You bring them:
- SPLA (Microsoft's Services Provider License Agreement, directly or through an SPLA reseller): you report Windows Server per core each month and activate servers through your own KMS host, or with keys you are given. What you report is between you and Microsoft.
- Bring your own licence: the customer enters a key inside Windows. Say so in the image's licence note.
- Evaluation: Microsoft's 180-day evaluation ISOs are for testing. They cannot be activated with a retail or KMS key without converting the edition, and stop after 180 days. Do not sell servers made from them.
Every Windows image has a Licence note, shown to customers when they choose the image and on their server's page, for example "Windows Server licence included (2 cores)" or "Bring your own licence".
Before you start#
- A node whose agent makes Windows servers (agent 0.34.0 or later). A node without it is not offered for Windows images: "This node's agent does not support Windows servers yet; update the agent."
- For Windows Server 2025: a node with UEFI, Secure Boot and TPM 2.0 support (the node installer adds
ovmfandswtpm). Server 2022 also runs on BIOS. - The Windows Server ISO in the ISO library with OS type Windows (ISOs).
- The VirtIO drivers for Windows ISO (
virtio-win) enabled in the ISO library. - For the panel's build: nodes must be able to download from the panel's own address (the build's setup disc is served by the panel).
Build a template in the panel#
-
Go to Images and ISOs › Images, open the Windows templates tab and press Build a Windows template.
-
Windows: the ISO, the Windows version (Windows Server 2022 or 2025, preset from the ISO), the Edition, and the Firmware:
Edition Notes Standard (Server Core) No desktop Standard (Desktop Experience) The default Datacenter (Server Core) Datacenter (Desktop Experience) Firmware: BIOS, or UEFI with Secure Boot and TPM 2.0 (Server 2025 wants it). Servers made from the image start with it.
-
Where: the Node that builds it (only nodes whose agent makes Windows servers and template images are listed) and its Storage. Other nodes copy the finished image from it.
-
The image: its Name, Slug and Licence note.
-
Activation: how servers made from the image activate Windows at their first start (see Activation).
-
Press Build the template.
The panel writes a setup disc (the answer file, a build script, cloudbase-init and its configuration, and the VirtIO drivers read from the library's virtio-win ISO), creates a build server on the node (4 vCPUs, 4 GB, 30 GB, behind NAT where the node has NAT), installs Windows from the ISO with that disc, and follows the build on the server's serial port. It takes about 40 minutes to an hour. The build's page shows each step with its time:
| Step | What happens |
|---|---|
| Prepare the setup disc | The answer file, script, cloudbase-init and drivers |
| Create the build server | An ordinary server named wintpl-<build>-<attempt> |
| Start the Windows installer | For UEFI, the panel presses Enter at "Press any key to boot from CD or DVD" |
| Install Windows | Windows Setup, unattended |
| VirtIO drivers and guest agent | All VirtIO drivers and the QEMU guest agent with its VSS provider |
| Remote Desktop, ping and UTC | Remote Desktop with Network Level Authentication, ping answered, UTC |
| cloudbase-init | Installed and configured without its password plugins |
| Optimise | Power plan, no hibernation, component clean-up |
| Store apps that stop sysprep | Store packages installed for one user removed |
| Recovery partition after C: | Moved into C:, so C: can grow on larger disks |
| Hand cloudbase-init to the end of setup | SetSetupComplete.cmd, checked |
| Sysprep and shut down | Generalised; the server shuts itself down |
| Make the image | Copied as a prepared Windows template |
| Delete the build server | The build server and the setup disc are deleted |
While it builds, the page shows the build server's console link (Open the console) and its Administrator password. When it is ready, the image is in the library, enabled, with distribution Windows, Windows optimisations on, the build's firmware, a minimum disk of 30 GB and minimum memory of 2 GB.
A failed build names the step and the reason (the script's words, the node's, or "Nothing happened for N minutes"). Its build server is kept for its console until you press Try again (deletes the server and starts over, as a new attempt) or Delete build.
Activation#
| Choice | What servers do at their first start |
|---|---|
| None: evaluation, or the customer brings a licence | Nothing is activated. Right for evaluation ISOs and bring-your-own-licence images. |
| Your KMS host (SPLA) | cloudbase-init installs Microsoft's public KMS client key for the edition and activates against your KMS host (kms.example.net:1688). |
| A product key of yours | A first-boot script installs the Product key and activates it (optionally against a KMS host). The key is readable inside the servers. |
Build a template by hand#
The panel's build follows the steps below; do them yourself when you want to change the template.
-
A build server. Create a server from the Windows ISO: 2 vCPU, 4 GB, a 30 GB disk. The VirtIO drivers ISO goes into CD-ROM 2 by itself. For Server 2025, before the first start set Firmware to UEFI with Secure Boot and TPM 2.0 to On on the Settings tab, and Apply. Start it and open the Screen console.
-
Install Windows. At "Where do you want to install Windows?", Load driver from the drivers disc:
viostor\2k25\amd64(Server 2025) orviostor\2k22\amd64(Server 2022). After the first logon runvirtio-win-guest-tools.exefrom the drivers disc: every driver and the QEMU guest agent. -
Settings inside Windows. Remote Desktop with NLA and its firewall rule, ping, time zone UTC, the guest agent set to start automatically, Windows updates.
-
cloudbase-init. Install the stable x64 MSI from cloudbase.it with user name Administrator and Run Cloudbase-Init service as LocalSystem, and do not tick "Run Sysprep" at the end. Replace
C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init.confwith:[DEFAULT] username=Administrator groups=Administrators metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService plugins=cloudbaseinit.plugins.common.mtu.MTUPlugin, cloudbaseinit.plugins.windows.ntpclient.NTPClientPlugin, cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin, cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin, cloudbaseinit.plugins.windows.licensing.WindowsLicensingPlugin, cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin, cloudbaseinit.plugins.common.userdata.UserDataPlugin, cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin netbios_host_name_compatibility=true allow_reboot=true stop_service_on_exit=false check_latest_version=false verbose=true log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ log_file=cloudbase-init.log logging_serial_port_settings=COM1,115200,N,8 local_scripts_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\ bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\ activate_windows=false [config_drive] types=iso locations=cdromIn
cloudbase-init-unattend.confset the sameusername,metadata_servicesand[config_drive]lines, with only the MTU, SetHostName and ExtendVolumes plugins andallow_reboot=false. For a KMS host, setactivate_windows=true,set_kms_product_key=trueandkms_host=kms.example.net:1688.Warning: Leave
CreateUserPluginandSetUserPasswordPluginout ofplugins=. They run again whenever the server gets a new instance id (a network reconfiguration, a new address) and set a random password, locking the customer out. VMStack's own script sets the password, and only when the panel sets one. -
Before sysprep. Remove Store apps installed for one user (sysprep fails with
0x80073cf2otherwise;C:\Windows\System32\Sysprep\Panther\setupact.lognames the package). On Server 2025, move the recovery partition that sits after C: into C: (reagentc /disable, delete the partition, grow C:,reagentc /enable), or C: cannot grow on larger disks. -
Sysprep. In an elevated PowerShell, first hand cloudbase-init over to the end of setup, check it, then generalise:
& "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\SetSetupComplete.cmd" sc.exe qc cloudbase-init | Select-String START_TYPE & "$env:windir\System32\Sysprep\sysprep.exe" /generalize /oobe /shutdown /unattend:"C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\Unattend.xml"The second line must say
3 DEMAND_START. The server shuts down; do not start it again. -
Make the image. On the server's Manage tab, Make an image, and tick that the server is a prepared Windows template. The node copies the disk compressed, without cleaning it (sysprep generalised it).
-
In Images, edit the new image: distribution Windows (this turns Windows optimisations on), the firmware you built it with, minimum disk 30 GB and memory 2 GB, the licence note.
-
Delete the build server.
Warning: If cloudbase-init's service is left on Automatic when you sysprep, every server made from the image stops at "The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed." Run
SetSetupComplete.cmdbefore every sysprep.
To host the image yourself instead: qemu-img convert -c -O qcow2 the disk on the node, put the file on an HTTPS server and add it as an image with its sha256: checksum pasted (a checksum source cannot be the panel's own address). Nodes download it once; the limit is 64 GB.
Windows servers#
- Access. The server's page shows Remote Desktop: the address and port 3389, user
Administrator, and the password. Behind NAT, add a port forward to port 3389. Windows servers take no SSH keys and no SSH password login. - Passwords. A typed password must have three of: upper case, lower case, digits, symbols, and must not contain "administrator". A generated one always qualifies.
- Reset Administrator password (Settings tab, Recovery): with the QEMU guest agent running, the password changes at once without a restart; otherwise the server restarts and cloudbase-init sets it. Reconfigure network and new addresses leave the password as it is.
- Host names are cut to their first 15 characters inside Windows (its NetBIOS limit).
- Windows optimisations (Hyper-V enlightenments and a Windows clock) are on for servers from a Windows image; without them Windows idles at high CPU. Administrators can switch them per server on the Settings tab.
- Clock. Windows reads the hardware clock as local time and gets the node's local time, which is UTC on nodes VMStack installs. Customers set their time zone in Windows.
- Snapshots and backups freeze the disk through the guest agent's VSS provider.
- Not for Windows: one-click applications and recipes (they are Linux scripts).
Check one server#
After building a template, create a server from it and wait a few minutes after the panel says it is running (cloudbase-init restarts it once for the host name). Then check:
- the Screen console reaches the logon screen, never "Windows installation cannot proceed";
- Remote Desktop to the address on the server's page works as
Administratorwith the panel's password; ipconfig /allshows the panel's addresses, gateway and DNS, static;- C: fills the whole disk;
- after you change the password inside Windows and press Reconfigure network, your password still works.