From 78c44e7754e9c836b715d49037ea6b8f287168a2 Mon Sep 17 00:00:00 2001 From: Andy Zhu Date: Tue, 12 Dec 2023 14:10:53 -0800 Subject: [PATCH] Disable TrustedLaunch on RockyLinux Azure VM's. PiperOrigin-RevId: 590331560 --- .../providers/azure/azure_virtual_machine.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/perfkitbenchmarker/providers/azure/azure_virtual_machine.py b/perfkitbenchmarker/providers/azure/azure_virtual_machine.py index db899d9a65..da57a9c151 100644 --- a/perfkitbenchmarker/providers/azure/azure_virtual_machine.py +++ b/perfkitbenchmarker/providers/azure/azure_virtual_machine.py @@ -42,6 +42,7 @@ from perfkitbenchmarker import disk_strategies from perfkitbenchmarker import errors from perfkitbenchmarker import linux_virtual_machine +from perfkitbenchmarker import os_types from perfkitbenchmarker import placement_group from perfkitbenchmarker import provider_info from perfkitbenchmarker import resource @@ -130,6 +131,13 @@ r'(Standard_ND[0-9]+a.*)', ] +TRUSTED_LAUNCH_UNSUPPORTED_OS_TYPES = [ + os_types.ROCKY_LINUX8, + os_types.ROCKY_LINUX8_OPTIMIZED, + os_types.ROCKY_LINUX9, + os_types.ROCKY_LINUX9_OPTIMIZED +] + class AzureVmSpec(virtual_machine.BaseVmSpec): """Object containing the information needed to create a AzureVirtualMachine. @@ -596,7 +604,7 @@ def __init__(self, vm_spec): self.trusted_launch_unsupported_type = any( re.search(machine_series, self.machine_type) for machine_series in TRUSTED_LAUNCH_UNSUPPORTED_TYPES - ) + ) or self.OS_TYPE in TRUSTED_LAUNCH_UNSUPPORTED_OS_TYPES arm_arch = 'neoverse-n1' if _MachineTypeIsArm(self.machine_type) else None if arm_arch: self.host_arch = arm_arch