Commit Graph

9 Commits

Author SHA1 Message Date
Dylan Conway
1c2ecc63e9 Use D4 VMs (4 vCPU) for all Windows CI
D16 (16 cores) only allows 6 VMs per 100-core quota, not enough
for builds + 4 test shards. D4 (4 cores) allows 25 VMs.

[build images]
2026-02-13 11:02:36 -08:00
Dylan Conway
08b348935d Fix image naming: publish-image must match ci.mjs getImageName()
[publish images] and normal CI expect 'windows-x64-2019-v13' but
machine.mjs was publishing as 'windows-x64-2019-build-v13'.

Now image_name is passed directly to Packer, matching ci.mjs:
  - publish-image: windows-x64-2019-v13
  - create-image:  windows-x64-2019-build-37194

[build images]
2026-02-13 10:59:50 -08:00
Dylan Conway
e739d3e0ac Add windows-restart provisioner before Sysprep
Registry key clearing alone doesn't satisfy spopk.dll's reboot
check. A real reboot between VS install and Sysprep clears the
Component Based Servicing pending state.

[build images]
2026-02-13 02:58:15 -08:00
Dylan Conway
f6f75ce393 Clear pending reboot flags before Sysprep
VS Build Tools installer and Windows Updates leave RebootPending
and PendingFileRenameOperations flags that cause Sysprep validation
to fail with 'one or more Windows updates that require a reboot'.

[build images]
2026-02-13 02:16:18 -08:00
Dylan Conway
f00eed8c6d Fix sysprep: reset LASTEXITCODE before running (stale from cygwin)
$LASTEXITCODE was polluted by cygwin setup failure. Clear it before
sysprep to prevent false positive exit code check. The timeout-based
polling loop catches real sysprep failures.

[build images]
2026-02-13 01:40:12 -08:00
Dylan Conway
e10529e4ae Escape PowerShell variables in HCL: $${var} not ${var}
[build images]
2026-02-13 00:44:06 -08:00
Dylan Conway
f4e9cdef6f Fix sysprep hang: exit code check, timeout, Panther cleanup, pin plugin 2.5.0
- Check sysprep exit code and dump Panther logs on failure
- Add 5-minute timeout to IMAGE_STATE polling loop
- Clean stale Panther directory before sysprep
- Pin azure plugin to 2.5.0 (2.5.1 has WinRM regression #568)

[build images]
2026-02-13 00:41:42 -08:00
Dylan Conway
e477c3a33b Fix Packer templates from local testing
- Remove managed_image (incompatible with TrustedLaunch)
- Use build_resource_group_name for eastus2
- Remove VNet config (WinRM needs public IP)
- Add gallery_resource_group variable (gallery in BUN-CI, build in BUN-CI-EASTUS2)

[build images]
2026-02-12 21:44:06 -08:00
Dylan Conway
8d34a9303c Add Packer-based Windows image building
Replaces Azure Run Command approach with Packer for Windows CI images.
Packer connects via WinRM (native, no x64 emulation on ARM64),
handles sysprep automatically, and provides full output logging.

- scripts/packer/windows-x64.pkr.hcl: Windows Server 2019 x64
- scripts/packer/windows-arm64.pkr.hcl: Windows 11 ARM64 (direct to gallery)
- scripts/packer/variables.pkr.hcl: shared variables
- machine.mjs: routes Azure Windows builds through Packer

[build images]
2026-02-12 21:12:00 -08:00