Skip to content

feat(windows): add WS2025 Gen2 Trusted Launch VHD build#8768

Merged
sinmentis merged 7 commits into
mainfrom
shunlyu/windows-2025-gen2-tl-vhd
Jun 25, 2026
Merged

feat(windows): add WS2025 Gen2 Trusted Launch VHD build#8768
sinmentis merged 7 commits into
mainfrom
shunlyu/windows-2025-gen2-tl-vhd

Conversation

@sinmentis

Copy link
Copy Markdown
Contributor

Add a new 2025-gen2-tl Windows SKU that builds a WS2025 Gen2 VHD whose SIG image definition is stamped with SecurityType=TrustedLaunch, so AKS Windows node pools can run on a Trusted Launch image.

The VHD content is identical to 2025-gen2 (same base image, components, CSE). The only difference is the image definition carries the TrustedLaunch feature, driven by ENABLE_TRUSTED_LAUNCH=True threaded through the Windows template chain into produce-packer-settings (which is already OS-agnostic).

  • windows_settings.json / windows_settings.cue: new 2025-gen2-tl entry, reusing the existing TL-capable base SKU 2025-datacenter-core-smalldisk-g2
  • windows VHD templates: new build2025gen2tl stage + enableTrustedLaunch param threaded to ENABLE_TRUSTED_LAUNCH in the buildVhd / run-test / convert-sig env blocks
  • run-test.sh / convert-sig-to-classic-storage-account-blob.sh: extend the Trusted Launch guard to Windows so the cache-test VM boots with --security-type TrustedLaunch (this also makes it the Secure Boot ground-truth check) and the production disk is created with the TrustedLaunch security profile

PR build defaults off; release build defaults on.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Windows VHD build SKU (2025-gen2-tl) to produce a WS2025 Gen2 image whose SIG image definition is stamped as Trusted Launch, and extends the existing Trusted Launch handling to Windows for test VM creation and SIG→disk conversion.

Changes:

  • Add 2025-gen2-tl to Windows settings (JSON + CUE schema).
  • Introduce a new Windows VHD pipeline stage for WS2025 Gen2 Trusted Launch and thread ENABLE_TRUSTED_LAUNCH through the Windows template chain.
  • Extend Trusted Launch guards to Windows in run-test.sh and convert-sig-to-classic-storage-account-blob.sh.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vhdbuilder/packer/windows/windows_settings.json Adds 2025-gen2-tl SKU definition mirroring 2025-gen2.
schemas/windows_settings.cue Allows 2025-gen2-tl as a valid Windows base version key.
.pipelines/templates/.build-and-test-windows-vhds-template.yaml Adds build stage wiring for the new 2025-gen2-tl SKU.
.pipelines/templates/.build-and-test-windows-vhd-template.yaml Threads enableTrustedLaunch into the Windows builder template.
.pipelines/templates/.builder-release-template-windows.yaml Adds enableTrustedLaunch parameter and exports ENABLE_TRUSTED_LAUNCH to build/test/convert steps.
.pipelines/.vsts-vhd-builder-release-windows.yaml Enables the new Trusted Launch stage in release builds by default.
.pipelines/.vsts-vhd-builder-pr-windows.yaml Keeps the new Trusted Launch stage disabled for PR builds by default.
vhdbuilder/packer/test/run-test.sh Extends Trusted Launch VM-create flags to Windows test VMs.
vhdbuilder/packer/convert-sig-to-classic-storage-account-blob.sh Extends Trusted Launch securityProfile disk creation to Windows.

Comment thread .pipelines/templates/.build-and-test-windows-vhd-template.yaml
Comment thread .pipelines/templates/.build-and-test-windows-vhds-template.yaml
Copilot AI review requested due to automatic review settings June 24, 2026 03:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .pipelines/.vsts-vhd-builder-pr-windows.yaml
Comment thread .pipelines/templates/.builder-release-template-windows.yaml Outdated
Comment thread vhdbuilder/packer/convert-sig-to-classic-storage-account-blob.sh Outdated
Comment thread .pipelines/templates/.build-and-test-windows-vhds-template.yaml
Comment thread vhdbuilder/packer/test/run-test.sh Outdated

@timmy-wright timmy-wright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core of changes looks good - I wrote some nitpicky comments. It'll need an e2e test. Base that on the ws2025-gen2 e2e test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread vhdbuilder/packer/convert-sig-to-classic-storage-account-blob.sh Outdated
Comment thread pkg/agent/datamodel/sig_config_test.go
Comment thread e2e/scenario_win_test.go
sinmentis and others added 7 commits June 25, 2026 03:28
Add a new `2025-gen2-tl` Windows SKU that builds a WS2025 Gen2 VHD whose
SIG image definition is stamped with SecurityType=TrustedLaunch, so AKS
Windows node pools can run on a Trusted Launch image.

The VHD content is identical to `2025-gen2` (same base image, components,
CSE). The only difference is the image definition carries the TrustedLaunch
feature, driven by ENABLE_TRUSTED_LAUNCH=True threaded through the Windows
template chain into produce-packer-settings (which is already OS-agnostic).

- windows_settings.json / windows_settings.cue: new `2025-gen2-tl` entry,
  reusing the existing TL-capable base SKU 2025-datacenter-core-smalldisk-g2
- windows VHD templates: new build2025gen2tl stage + enableTrustedLaunch
  param threaded to ENABLE_TRUSTED_LAUNCH in the buildVhd / run-test /
  convert-sig env blocks
- run-test.sh / convert-sig-to-classic-storage-account-blob.sh: extend the
  Trusted Launch guard to Windows so the cache-test VM boots with
  --security-type TrustedLaunch (this also makes it the Secure Boot
  ground-truth check) and the production disk is created with the
  TrustedLaunch security profile

PR build defaults off; release build defaults on.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…unch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match the repo convention (same as dryrun): declare enableTrustedLaunch
as a boolean in every Windows template. ADO stringifies it to True/False
for the ENABLE_TRUSTED_LAUNCH env var, which the shell scripts compare
against "True" exactly like they already do for DRY_RUN. Removes the
boolean/string declaration mismatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add VHDWindows2025Gen2TL and Test_Windows2025Gen2TrustedLaunch, mirroring
Test_Windows2025Gen2 plus addTrustedLaunchToVMSS (Secure Boot + vTPM), so
the AgentBaker e2e runs against the freshly built Trusted Launch VHD.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Drop the OS_TYPE check in the run-test / convert-sig guards; gating on
  ENABLE_TRUSTED_LAUNCH alone is sufficient (per review).
- Remove the default from the release template enableTrustedLaunch param;
  the caller always sets it explicitly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Windows 2025 Gen2 Trusted Launch e2e VHD reused the non-TL distro
AKSWindows2025Gen2, so it resolved the non-TL image definition instead of
the Trusted Launch one. Add a dedicated AKSWindows2025Gen2TL distro
(image definition windows-2025-gen2-tl), mirroring the Linux TL pattern
(AKSACLGen2FIPSTL), and point VHDWindows2025Gen2TL at it so the e2e tests
the actual Trusted Launch image.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…uard

- sig_config_test: assert ResourceGroup/Gallery/Definition/Version for the
  new AKSWindows2025Gen2TL entry, not just the map length, to catch
  miswiring of the image definition.
- convert-sig: gate on ENABLE_TRUSTED_LAUNCH case-insensitively to match
  run-test.sh and avoid value-shape issues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sinmentis sinmentis force-pushed the shunlyu/windows-2025-gen2-tl-vhd branch from 827f4a4 to e6adb5c Compare June 25, 2026 03:33
@sinmentis sinmentis merged commit 2bc9768 into main Jun 25, 2026
43 of 46 checks passed
@sinmentis sinmentis deleted the shunlyu/windows-2025-gen2-tl-vhd branch June 25, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants