Our earlier Windows Server 2022 template recipe for Proxmox VE broke in three places when we ran it again from scratch. Sysprep rejected the answer file path, then refused to generalize because of a per-user Edge package. Worse, every clone booted with a random WIN- hostname and a DHCP address, because Cloudbase-Init was looking for the wrong config drive. After the fixes, clones came up as win2022-dc01 on a static IP with the password we set in Proxmox, about 163 seconds after qm start (rebuilt November 2026 on Proxmox VE 9.3).
This page keeps only what differs on Server 2022: the ISO, the VirtIO folders, the answer file, Cloudbase-Init, Sysprep and the errors each one throws. The shared parts (VM hardware flags, guest tools, template conversion) live in our Windows Server 2025 template guide, and each step below says where to pick it up.
What We Tested and What Changed
We built the template on a fresh Proxmox node with local-lvm thin storage and a NAT bridge, then cloned it and checked every value Cloudbase-Init is supposed to apply. The table records the versions in the lab and how each step behaved.
| Component | Tested version | Result |
|---|---|---|
| Proxmox VE | 9.3.1 (QEMU 11.1.3, kernel 7.0.14-31-pve) | VM pinned to pc-q35-11.1 automatically |
| Windows Server 2022 eval ISO | Build 20348, 5,044,094,976 bytes | Unattended install in about 7 minutes |
| virtio-win ISO | 0.1.302 (drivers 100.103.104.30200) | 2k22 folders present except qxldod |
| QEMU guest agent | 110.2.3 | Agent answered after one reboot |
| Cloudbase-Init | 1.1.9 | Works only with ConfigDriveService |
| Sysprep | Windows Server 2022 built in | Needed two fixes, then 70 seconds |
| Clone first boot | Full clone, 64 GB disk | Hostname, IP, password and disk applied in 163 s |
Everything from the original build still worked except three settings, and none of them fails loudly, so each one is worth knowing before you start:
- Sysprep command: run it from the Cloudbase-Init
conffolder with a bare file name, because the quoted full path is rejected. - Edge package: remove the per-user
Microsoft.MicrosoftEdge.Stablepackage first, or generalize stops with0x80073cf2. - Cloudbase-Init metadata: use
ConfigDriveServiceand spell the pluginUserDataPlugin, otherwise clones ignore every Cloud-Init value you set.
The last one is the expensive mistake, because a template with the wrong metadata service still clones and boots, and by the time a clone shows a random WIN- name the image has to be rebuilt. Node access, storage and the 4 vCPU, 8 GB, 64 GB build VM are the same as in the 2025 guide; the template used about 13 GB on thin storage, and the build VM needs internet for Cloudbase-Init.
Step 1: Download the Server 2022 ISO and Check the VirtIO Folders
Microsoft’s evaluation center now leads with Server 2025, so the Server 2022 ISO has to come from its own forward link. Link ID 2195280 still redirects to SERVER_EVAL_x64FRE_en-us.iso, the March 2022 build, and the download took us a little over five minutes. Run both downloads in the Proxmox ISO directory.
cd /var/lib/vz/template/iso/
wget -O windows-server-2022-eval.iso 'https://go.microsoft.com/fwlink/p/?LinkID=2195280&clcid=0x409&culture=en-us&country=us'
wget -O virtio-win.iso 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso'
Check the result with file before going further. Our Server 2022 ISO was 4.7 GB with the volume label SSS_X64FREE_EN-US_DV9, and anything near 7.6 GB is the Server 2025 image. The VirtIO ISO reported virtio-win-0.1.302, the driver release you are about to bake into the template. Next, confirm the index order on your copy, since the answer file selects the edition by index. Install wimtools and genisoimage (you need the second one in Step 2), mount the ISO and list the images.
apt install -y wimtools genisoimage
mkdir -p /mnt/win
mount -o loop,ro /var/lib/vz/template/iso/windows-server-2022-eval.iso /mnt/win
wiminfo /mnt/win/sources/install.wim | grep -E '^(Index|Display Name|Build):'
All four images report build 20348, which is how you know the link did not hand you Server 2025. Index 2 is Standard with Desktop Experience, the one the answer file installs:

Unmount it with umount /mnt/win once you have the index. Index numbers differ between ISO builds and languages, so checking costs a minute while guessing wrong costs a seven minute install of Server Core. The stable VirtIO ISO also decides which driver paths the answer file can use, and our copy had these for Server 2022:
- Present as
2k22:vioscsi,NetKVM,viostor,Balloonandvioserial, which covers the disk, network, memory balloon and the agent channel. - Missing:
qxldod, the QXL display driver, which stops at2k19andw10.
Because there is no Server 2022 build of qxldod, the guest runs on the Microsoft Basic Display Adapter. That is fine for a server you reach over RDP, so we did not chase it. Our walkthrough on installing VirtIO drivers on Windows explains what each driver does, although here the answer file loads them during Setup. If you want a proper console driver anyway, the ISO does ship viogpudo for Server 2022, which pairs with --vga virtio instead of QXL.
Step 2: Change the Answer File for Server 2022
Start from the full autounattend.xml in the 2025 guide’s answer file step; partitioning, locale, OOBE, RDP and autologon are identical. Server 2022 differs in three places, plus an optional rename of ComputerName (ours was WIN2022-TPL, which Sysprep replaces anyway):
- Driver paths: change all six
<Path>entries from2k25to2k22, for exampleE:\vioscsi\2k22\amd64. Our file keptE:\qxldod\2k22\amd64even though that folder does not exist, and Setup skipped it without complaint. - Product key: delete the
ProductKeyblock, because the evaluation media carries its own key. - Image selection: pick the edition by index instead of
/IMAGE/NAME, using theInstallFromblock below.
This is the InstallFrom block from the file our build ran, with index 2 from the wiminfo check in Step 1:
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/INDEX</Key>
<Value>2</Value>
</MetaData>
</InstallFrom>
Every driver path hard-codes E:, so the drive order on the VM matters. With the Windows ISO on ide0, the answer file on ide1 and the VirtIO ISO on ide2, WinPE mounts VirtIO as E:. Attach them in another order and Setup cannot find vioscsi, then stops at an empty disk list. Package the file as a small ISO next to the others:
genisoimage -o /var/lib/vz/template/iso/autounattend.iso -J -r /tmp/winunattend/
Expect an ISO of a few hundred kilobytes, and Proxmox listed ours as 370K once attached.
Step 3: Create the VM and Get Past the CD Prompt
Use the qm create command from the 2025 guide’s VM step unchanged except for two values: --name win2022-template and --ide0 local:iso/windows-server-2022-eval.iso,media=cdrom. Keep --ostype win11, because Proxmox has no separate Server 2022 type. On Proxmox VE 9.3 the output also reported ms-cert=2023k on the EFI disk and pinning machine type to 'pc-q35-11.1' for Windows guest OS, so a later QEMU upgrade does not change the hardware Windows sees.
The boot is where the old recipe failed silently. It sent Enter at the “Press any key to boot from CD or DVD” prompt through pvesh create .../monitor with errors hidden. On our fresh node that call failed with “Host key verification failed.” and sent nothing, so the VM fell through to the firmware menu while the loop looked successful. qm sendkey talks to the local QEMU monitor directly and worked every time:
qm start 900
for i in $(seq 1 10); do qm sendkey 900 ret; sleep 1; done
About a minute in, a screendump through qm monitor 900 showed Setup copying files with no prompts on screen, which confirms the answer file and the 2k22 vioscsi driver were both picked up:

If the keypresses miss the prompt, the VM lands in the OVMF boot manager instead. Pick the first DVD-ROM entry (QM00001), press Enter and send the key loop again. Around seven minutes after qm start, the VM auto-logged on as Administrator and Server Manager opened:

Close the Windows Admin Center pop-up, since nothing in the template needs it.
Step 4: Guest Tools, Agent and Cloudbase-Init 1.1.9
Install virtio-win-gt-x64.msi and the guest agent MSI from the VirtIO ISO exactly as the 2025 guide’s guest tools step shows, then reboot. The 2022 difference shows up when you query the agent from the host with qm agent 900 get-osinfo, which is the quickest proof that index 2 installed what you expected:
{
"id" : "mswindows",
"kernel-release" : "20348",
"kernel-version" : "10.0",
"machine" : "x86_64",
"name" : "Microsoft Windows",
"pretty-name" : "Windows Server 2022 Standard Evaluation",
"variant" : "server",
"variant-id" : "server",
"version" : "Microsoft Windows Server 2022",
"version-id" : "2022"
}
The display adapter still reports “Microsoft Basic Display Adapter” after the guest tools install, for the qxldod reason from Step 1, and that is expected. For Cloudbase-Init we used release 1.1.9, not the older 1.1.6 the 2025 guide installs, from its GitHub releases page. Download and install it from an elevated PowerShell session:
Invoke-WebRequest -Uri "https://github.com/cloudbase/cloudbase-init/releases/download/1.1.9/CloudbaseInitSetup_1_1_9_x64.msi" -OutFile "C:\Users\Administrator\Downloads\CloudbaseInit.msi" -UseBasicParsing # pin: release tested for this template #https://github.com/cloudbase/cloudbase-init/releases
Start-Process msiexec.exe -ArgumentList '/i','C:\Users\Administrator\Downloads\CloudbaseInit.msi','/quiet','/norestart' -Wait
The cloudbase-init service should exist, set to Automatic, and stay Stopped until the first boot of a clone. Do not tick “run Sysprep” in any GUI installer, because the configuration has to change first.
Step 5: Point Cloudbase-Init at the Proxmox Config Drive
Here is where the old recipe went wrong. It set NoCloudConfigDriveService, but Proxmox builds a configdrive2 drive for any Windows OS type, labelled config-2, as the Proxmox Cloud-Init wiki explains. NoCloud only accepts a drive labelled cidata, so it found nothing, and a misspelled UserdataPlugin crashed the plugin loader on top of that. We booted the generalized VM with that configuration and a Cloud-Init drive attached to capture what it does:

The VM came up as the random WIN-EV6LVDKB57M, took a DHCP lease instead of its static address, and rejected both the Proxmox and the template password, locking us out of the console too. Cloudbase-Init logs the failure and exits quietly, so if a clone ignores its Cloud-Init tab, read cloudbase-init.log under the log folder before changing anything in Proxmox. Open the main configuration file in Notepad:
notepad 'C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init.conf'
Replace the contents with the configuration our working template used. The two lines that matter are metadata_services, which names only ConfigDriveService, and the plugin list, which spells UserDataPlugin with a capital D:
[DEFAULT]
username=Administrator
groups=Administrators
inject_user_password=true
first_logon_behaviour=no
config_drive_raw_hhd=true
config_drive_cdrom=true
config_drive_vfat=true
bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\
verbose=true
debug=true
log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\
log_file=cloudbase-init.log
default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
logging_serial_port_settings=
mtu_use_dhcp_config=true
ntp_use_dhcp_config=true
local_scripts_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\
check_latest_version=false
metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService
plugins=cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin
Setting username=Administrator together with inject_user_password=true makes the Proxmox cipassword land on the built-in Administrator account instead of a new user, so the login you type in Proxmox is the login that works. The first_logon_behaviour=no line matters too. Without it, Windows forces a password change at the first RDP login, which defeats the point of setting the password from Proxmox and breaks any automation that logs in right after the clone boots.
The specialize pass file, cloudbase-init-unattend.conf in the same folder, already lists ConfigDriveService first among four services. We trimmed its metadata_services line to the same single value and left the rest of the default file (including username=Admin and allow_reboot=false) as installed:
metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService
Save both files. Resist the urge to restart the service to test the change here, since a run on the template would apply settings to the template itself.
Step 6: Sysprep Server 2022 Without the Two Errors
Take a snapshot first with qm snapshot 900 pre-sysprep on the host if you want a way back to the pre-Sysprep state, and Step 7 shows the one catch that adds. Server 2022 then threw two Sysprep errors in a row. Both leave the VM running with nothing on screen except a closed window, so a Sysprep that returns without shutting the VM down has failed even though no dialog said so. The log that explains it is C:\Windows\System32\Sysprep\Panther\setuperr.log:

Here is what each one means and what fixed it:
- “Unable to parse command-line arguments to sysprep”: the quoted full path in
/unattend:"C:\Program Files\...\Unattend.xml"was rejected from both PowerShell and cmd.exe. Running Sysprep from theconffolder with a bare/unattend:Unattend.xml, the form the Proxmox wiki uses, parsed cleanly. - “Package Microsoft.MicrosoftEdge.Stable_… was installed for a user, but not provisioned for all users”: Edge updated itself while the VM was online and registered the new package for Administrator only. Sysprep stops with
0x80073cf2until that package is removed for all users.
Run the cleanup and Sysprep together in one elevated PowerShell session, so Edge has no window to update itself and register a fresh per-user package in between.
Get-AppxPackage -AllUsers Microsoft.MicrosoftEdge.Stable | Remove-AppxPackage -AllUsers
cd 'C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf'
C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:Unattend.xml
With both fixes in place, Sysprep generalized and powered the VM off in about 70 seconds, and qm status 900 read status: stopped. Do not start the VM again after this point, because a boot runs the specialize pass and uses up the generalized image. If you start it by accident, roll back to the snapshot or run Sysprep again before converting.
Step 7: Convert, Clone and Verify the Clone
Detach the three installer ISOs, add a local-lvm:cloudinit drive on ide2, set the boot order to scsi0 and run qm template 900, as in the 2025 guide’s conversion step. The one 2022 build snag was our own snapshot from Step 6: qm template refuses a VM that has one, with exit code 255. Remove it with qm delsnapshot 900 pre-sysprep and convert again:

The result is a Windows Server 2022 template Proxmox can clone as often as you like. Clone it and give the clone the values Cloudbase-Init should apply, replacing NEW_PASSWORD with the password the clone should end up with:
qm clone 900 115 --name win2022-dc01 --full true --storage local-lvm
qm set 115 --ciuser Administrator --cipassword 'NEW_PASSWORD'
qm set 115 --ipconfig0 'ip=10.10.10.150/24,gw=10.10.10.1' --nameserver 8.8.8.8
qm start 115
The full clone of the 64 GB disk took 612 seconds on our thin pool. For a linked clone drop both --full true and --storage local-lvm, because qm clone refuses a target storage for linked clones. The first boot reboots once to apply the hostname, and the Cloudbase-Init log on the clone shows each value landing:

Notice which plugin set the hostname: UserDataPlugin, reading the cloud-config Proxmox writes, not SetHostNamePlugin, which logs “Hostname not found in metadata”. So the misspelled plugin name in the old configuration cost us the hostname as well as everything listed after it. After the reboot, hostname, Get-NetIPConfiguration and Get-Volume on the clone confirmed the result:
win2022-dc01
InterfaceAlias : Ethernet
InterfaceIndex : 4
InterfaceDescription : Red Hat VirtIO Ethernet Adapter
NetProfile.Name : Network
IPv4Address : 10.10.10.150
IPv6DefaultGateway :
IPv4DefaultGateway : 10.10.10.1
DNSServer : 8.8.8.8
DriveLetter FileSystemLabel DriveType Size SizeRemaining
----------- --------------- --------- ---- -------------
D config-2 CD-ROM 389120 0
EFI Fixed 100663296 70524928
C Windows Fixed 68595740672 55975661568
The config drive mounted as D: with the config-2 label that NoCloud could not see. We also checked the password with PrincipalContext.ValidateCredentials: the Proxmox password returned True and the template password False. The whole first boot took about 163 seconds, and the clone then sat at a normal lock screen:

One licensing detail is specific to the 2022 evaluation media. slmgr /dli on the clone reports “Initial grace period” with 10 days left, while slmgr /xpr still shows a 180 day evaluation expiry. Run slmgr /ato on each clone before that window runs out. A licensed edition needs DISM /online /Set-Edition:<edition> /ProductKey:<key> /AcceptEula (list targets with /Get-TargetEditions), and Microsoft does not support converting an evaluation domain controller, so convert before you promote one. For remote management after that, PowerShell remoting over SSH works from Linux admin hosts without opening WinRM.
Troubleshooting Server 2022 Template Errors
These are the messages we saw during the rebuild. Most never reach the console, so search the Cloudbase-Init or Sysprep log for the exact string.
“Found mismatching label ‘config-2′” and “No metadata service found”
Cloudbase-Init is looking for a NoCloud cidata volume while Proxmox gives Windows a config-2 drive. Set ConfigDriveService in both files (Step 5) and rebuild the template, because a booted clone is past the generalize step.
“module ‘cloudbaseinit.plugins.common.userdata’ has no attribute ‘UserdataPlugin'”
The class is UserDataPlugin, and the traceback even asks “Did you mean: ‘UserDataPlugin’?”. Every plugin listed after the typo is skipped, network configuration included, so fix the spelling in cloudbase-init.conf.
“SYSPRP WinMain: Unable to parse command-line arguments to sysprep; GLE = 0x0”
Sysprep rejected the quoted path with spaces. Change to C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf and pass /unattend:Unattend.xml as shown in Step 6.
“Failed to remove apps for the current user: 0x80073cf2”
A per-user Appx package blocks generalize, and on our Server 2022 build it was Microsoft.MicrosoftEdge.Stable. Remove it for all users and run Sysprep in the same session, as in Step 6, before Edge can update itself back.
“unable to create template, because VM contains snapshots”
Proxmox cannot turn a VM with snapshots into a template. List them with qm listsnapshot 900, remove each with qm delsnapshot 900 <name>, then run qm template 900 again.
“proxy handler failed: Host key verification failed.”
This came from pvesh create /nodes/<node>/qemu/900/monitor on a fresh node, hidden by 2>/dev/null in the old key loop, so the VM never booted from the DVD. Use qm sendkey 900 ret on the node that runs the VM instead.
Server 2022 vs Server 2025 Template Settings
Most of the build is shared, so the differences fit in one table. The Server 2022 column is from this rebuild, and the Server 2025 ISO, driver and edition rows come from our Server 2025 template walkthrough and the same VirtIO ISO.
| Setting | Server 2022 | Server 2025 |
|---|---|---|
| Eval ISO download | fwlink 2195280, 4.7 GB, build 20348 | fwlink 2345730, about 7.6 GB |
| VirtIO driver folder | 2k22 | 2k25 |
| QXL display driver | No 2k22 folder, Basic Display Adapter | No 2k25 folder either |
| Edition selection | /IMAGE/INDEX = 2, no product key | /IMAGE/NAME plus the eval product key |
| Proxmox OS type | win11 | win11 |
| Cloudbase-Init metadata service | ConfigDriveService (tested) | Proxmox also writes a config-2 drive for win11, so the same setting applies |
| Sysprep command | Run from the conf folder, Edge package removed first | Same Sysprep tool and Cloudbase-Init Unattend.xml |
If you are deciding which version to template, Server 2022 is the safer choice for software that has not certified 2025 yet, and our notes on upgrading Windows Server to 2025 cover moving those clones later. Templates built this way also make good nodes for a Windows Server failover cluster lab, since each clone gets a unique name and SID from Sysprep.