Build Windows CI Image automated, painless, and reproducible.
wim\install.wim
from windows server 2022 iso X:\Sources\install.wimCustomResources\SxS\Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~.cab
from windows server 2022 iso X:\Sources\SxSCustomResources\OpenSSH-Win64-v9.2.2.0.msi
from github3rdparty\CloudbaseInitSetup_x64.msi
from cloudbase3rdparty\packer.exe
from hashicorp3rdparty\virtio-win-0.1.229.iso
from fedora3rdparty\zapfree.exe
from github
You have to run these scripts on a Windows machine which has Hyper-V enabled. Nested Virtualization is OK.
For the very first time before you can use packer:
.\3rdparty\packer.exe init .\config.pkr.hcl
For the every time when you have changed your wim:
.\build-gold-image.bat
For the every time when you have changed custom resources:
.\build-online-image.bat
.\covert-to-packer-base-vhdx.bat
And then for the every time when you have changed pakcer scripts:
.\build-packer.bat
The built image will be located at output-vm\Virtual Hard Disks\packer-vm.vhdx
.