Skip to content

[AI Generated] BugFix: default raw VHD image source to x64 architecture#4559

Closed
rabdulfaizy wants to merge 1 commit into
mainfrom
bugfix/vhd-default-x64-architecture_240626_221344
Closed

[AI Generated] BugFix: default raw VHD image source to x64 architecture#4559
rabdulfaizy wants to merge 1 commit into
mainfrom
bugfix/vhd-default-x64-architecture_240626_221344

Conversation

@rabdulfaizy

Copy link
Copy Markdown
Member

Summary

Default VhdSchema.architecture to x64 when not explicitly set, so LISA's Architecture feature produces an x64-only requirement for raw VHD image sources. Without this default, Architecture.create_image_requirement() returns None for VHDs, allowing ARM64 SKUs (e.g. Standard_D2pds_v6) to be picked for x64-only VHD blobs and causing deployment failures such as:

Cannot create a VM of size 'Standard_D2pds_v6' ... only supports a CPU Architecture of 'Arm64'

Azure does not deploy raw VHD blobs to ARM64 VMs, so x64 is the safe and correct default. Users with ARM64 VHDs can still override via vhd.architecture: Arm64 in their runbook.

Change

3 lines added to VhdSchema.load_from_platform() in lisa/sut_orchestrator/azure/common.py:

# Azure does not deploy raw VHD blobs to ARM64 VMs; default to x64.
if self.architecture is None:
    self.architecture = schema.ArchitectureType.x64

Validation

  • Offline unit checks (3/3 pass): default → x64; explicit Arm64 preserved; CVM path also defaults to x64.
  • Live LISA smoke test on a real Ubuntu Noble x64 raw VHD in westus2, hyperv_generation=2:
    • Pre-fix behavior: LISA selected Standard_D2pds_v6 (Arm64) → deployment fails with architecture mismatch.
    • Post-fix behavior: LISA selected Standard_D2ads_v5 (x64) → deployed in 94s, smoke_test PASSED in 86s.
  • pylint: 10/10 on changed lines.

Closes-ADO-Bug: 62695399

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

This PR fixes Azure raw VHD deployments selecting ARM64-only SKUs by defaulting VhdSchema.architecture to x64 when it’s not explicitly set, ensuring the Azure Architecture feature generates an x64-only requirement for VHD image sources.

Changes:

  • Default VhdSchema.architecture to schema.ArchitectureType.x64 when unset in load_from_platform().
  • Preserve user override behavior when architecture is explicitly provided in the runbook.

@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 32.745

@rabdulfaizy

Copy link
Copy Markdown
Member Author

Closing as duplicate - the bug was independently fixed by another contributor. No change needed here.

@rabdulfaizy rabdulfaizy deleted the bugfix/vhd-default-x64-architecture_240626_221344 branch June 26, 2026 00:01
@rabdulfaizy rabdulfaizy restored the bugfix/vhd-default-x64-architecture_240626_221344 branch June 26, 2026 00:02
@rabdulfaizy rabdulfaizy deleted the bugfix/vhd-default-x64-architecture_240626_221344 branch June 26, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants