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

chungus

New Member
Mar 23, 2026
3
0
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.