Skip to content

Commit 4f08da7

Browse files
committed
use x64 as default arch for .vhd images
1 parent 96869b7 commit 4f08da7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lisa/sut_orchestrator/azure/common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,13 @@ class VhdSchema(AzureImageSchema):
563563
data_vhd_paths: Optional[List[DataVhdPath]] = None
564564

565565
def load_from_platform(self, platform: "AzurePlatform") -> None:
566+
# VHD images are user-provided custom images. Azure does not expose
567+
# architecture metadata for them, and uploaded VHDs in this codepath
568+
# are x64. Restrict candidate VM sizes to x64 to avoid selecting
569+
# ARM64 SKUs that would fail to boot the VHD.
570+
if self.architecture is None:
571+
self.architecture = schema.ArchitectureType.x64
572+
566573
# There are no platform tags to parse, but we can assume the
567574
# security profile based on the presence of a VMGS path.
568575
if self.cvm_gueststate_path:

0 commit comments

Comments
 (0)