The Packer templates in this directory creates Windows Server images for use with MAAS.
- A machine running Ubuntu 18.04 with the ability to run KVM virtual machines.
- qemu-utils, libnbd-bin, nbdkit and fuse2fs
- qemu-system
- ovmf
- cloud-image-utils
- Packer, v1.7.0 or newer
- Ubuntu 22.04 is required to build Windows 11 images (swtpm package)
This process has been build and deployment tested with the following versions of Microsoft Windows:
- Windows Server 2025
- Windows Server 2022
- Windows Server 2019
- Windows Server 2016
- Windows 10 PRO
- Windows 11 PRO
- The current process builds UEFI compatible images only.
This template builds a dd.tgz MAAS image from an official Microsoft Windows ISO/VHDX. This process also installs the latest VirtIO drivers as well as Cloudbase-init.
You can obtains Microsoft Windows Evaluation ISO/VHDX images from the following links:
- Windows Server 2025
- Windows Server 2022
- Windows Server 2019
- Windows Server 2016
- Windows 10 Enterprise
- Windows 11 Enterprise
The build the image you give the template a script which has all the customization:
sudo make windows ISO=<path-to-iso> VERSION=<windows-version>
Example:
sudo make ISO=/mnt/iso/Windows_Server_2025_SERVER_EVAL_x64FRE_en-us.iso VERSION=2025
Currently uefi is the only supported value.
The edition of a targeted ISO image. It defaults to PRO for Microsoft Windows 10/11 and SERVERSTANDARD for Microsoft Windows Servers. Many Microsoft Windows Server ISO images do contain multiple editions and this prarameter is useful to build a particular edition such as Standard or Datacenter etc.
Whether VNC viewer should not be launched. Default is set to false.
Path to Microsoft Windows ISO image used to build the image.
Enable (1) or Disable (0) verbose packer logs. The default value is set to 0.
User supplied Microsoft Windows Product Key. When usimg KMS, you can obtain the activation keys from the link below:
Please note that PKEY is an optional parameter but it might be required during the build time depending on the type of ISO being used. Evaluation series ISO images usually do not require a product key to proceed, however this is not true with Enterprise and Retail ISO images.
Defaults to 1h. Supports variables in h (hour) and m (Minutes).
Path to Microsoft Windows VHDX image used to build the image.
Specify the Microsoft Windows Version. Example inputs include: 2025, 2022, 2019, 2016, 10 and 11.
Use MAAS CLI to upload the image:
maas admin boot-resources create \
name='windows/windows-server' \
title='Windows Server' \
architecture='amd64/generic' \
filetype='ddtgz' \
content@=windows-server-amd64-root-dd.gz