Proxmox Packer templates for Windows Server 2019/2022/2025 — cloudbase-init, Ansible, OpenSSH (repo + overview)

chungus

New Member
Mar 23, 2026
3
1
1
Windows templates on Proxmox took me longer to get right than either of my Linux builds, mostly because there's no native cloud-init and the docs on wiring up cloudbase-init to Proxmox specifically are thin. Sharing the whole setup here.

What it builds

VM templates for Windows Server 2019, 2022, and 2025 — Core and Desktop editions of each, six templates total.

How a build runs, end to end

  1. Unattended install via autounattend.xml, loading VirtIO drivers (disk, NIC, balloon) during setup so the installer can actually see the VirtIO hardware in the first place.
  2. OpenSSH, not WinRM, as the Packer communicator — installed and configured during Windows Setup itself (before Packer even connects), with PowerShell set as the default SSH shell. Made the rest of the build a lot simpler since Packer's shell provisioner and Ansible's ansible.windows modules both just work over plain SSH from there.
  3. Ansible provisioning, two roles in order: a generic hardening role shared with my Linux builds (TLS/SMB1 hardening, RDP, Explorer settings, Windows Update disabled, Vault-signed SSH cert trust), then a Windows/Proxmox-specific role that installs and configures cloudbase-init.
  4. cloudbase-init is what actually handles first-boot configuration on a cloned VM — hostname and network from Proxmox's cloud-init drive, running any user-data scripts (e.g. setting the local Administrator password), growing the C: partition to fill the disk, and standing up a WinRM listener for whatevermanages the VM afterward.

One gotcha worth flagging: Proxmox's native configdrive2 cloud-init format was the first thing I tried for feeding cloudbase-init its config, and it didn't reliably deliver custom network data to Windows guests. Switched to the NoCloud datasource instead, which has been solid — worth knowing before you spend time debugging what looks like a cloudbase-init problem but is actually a datasource-format problem.

Repo

Packer templates: https://github.com/pizzle85-maker/packer-proxmox-windows

Ansible roles:

Happy to compare notes if anyone else is doing Windows templates on Proxmox.
 
  • Like
Reactions: enderst
thanks for helping out the Proxmox community on this.
I'm just playing around with Packer targeting Proxmox - Specifically for Windows 2025 server using the latest 2025 evaluation media;
https://software-static.download.pr...ease_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso

Have you tested your server 2025 script against the latest version of Proxmox (v9.2.21) running the latest kernel?
I've tried a few of the different GitHub based solutions and they all seem to have issues which might perhaps be related to the newer versions of the packer plugin (github.com/hashicorp/proxmox) or recent versions of the virtio drivers?
Code:
root@proxmox:~# pveversion
pve-manager/9.2.21/4f6e0ac86f9e8c7f (running kernel: 7.0.14-24-pve)

I did naively hope that Packer was supposed to simplify things (it has for me in the Linux space), but in the case of Windows deployments to Proxmox it just doesn't seem to have the API consistency that I'd expect, and Windows server 2025 specifically seems to be full of quirks which make automation hard.

It would be awesome if you could run some sanity checks, as there does appear to be a pattern of complexity using;
- Proxmox 9.2 with v7 kernel
- Latest virtio CD
- autounattend file compatibility with latest evaluation media etc.
 
Last edited: