Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lisa/sut_orchestrator/azure/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,13 @@ class VhdSchema(AzureImageSchema):
data_vhd_paths: Optional[List[DataVhdPath]] = None

def load_from_platform(self, platform: "AzurePlatform") -> None:
# VHD images are user-provided custom images. Azure does not expose
# architecture metadata for them, and uploaded VHDs in this codepath
# are x64. Restrict candidate VM sizes to x64 to avoid selecting
# ARM64 SKUs that would fail to boot the VHD.
Comment on lines +566 to +569
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: "uploaded VHDs in this codepath are x64", is not universally true — users could upload an ARM64 VHD.
A more accurate phrasing would be:
"Azure does not expose architecture metadata for VHDs, so default to x64 when the user has not explicitly specified an architecture. Users deploying ARM64 VHDs should set architecture: Arm64 in the runbook"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

arm64 sizes dont support vhd. They need sig images in case of custom images.

if self.architecture is None:
Comment on lines 565 to +570
self.architecture = schema.ArchitectureType.x64
Comment on lines +567 to +571

Comment on lines 565 to +572
# There are no platform tags to parse, but we can assume the
# security profile based on the presence of a VMGS path.
if self.cvm_gueststate_path:
Expand Down
Loading