From d76f90ca9e10cd7cec4c6e72cd7cf30206726cdd Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Thu, 24 Jul 2025 13:12:51 -0700 Subject: [PATCH 1/9] move update_current_secure_channel_state before reportting attest the key. --- proxy_agent/src/key_keeper.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/proxy_agent/src/key_keeper.rs b/proxy_agent/src/key_keeper.rs index 67e35af5..19170e15 100644 --- a/proxy_agent/src/key_keeper.rs +++ b/proxy_agent/src/key_keeper.rs @@ -397,6 +397,11 @@ impl KeyKeeper { } let state = status.get_secure_channel_state(); + let secure_channel_state_updated = self + .key_keeper_shared_state + .update_current_secure_channel_state(state.to_string()) + .await; + // check if need fetch the key if state != DISABLE_STATE && (status.keyGuid.is_none() // key has not latched yet @@ -523,12 +528,8 @@ impl KeyKeeper { } } - // update the current secure channel state if different - match self - .key_keeper_shared_state - .update_current_secure_channel_state(state.to_string()) - .await - { + // update redirect policy if current secure channel state updated + match secure_channel_state_updated { Ok(updated) => { if updated { // update the redirector policy map From 7bf20a98603cfcb5f8de8b99a632f2792143a02d Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Thu, 24 Jul 2025 13:43:48 -0700 Subject: [PATCH 2/9] Add tag { "EnforceArchitectureTypeForExtensions": "true" } for Arm64 VMs --- .../Models/TestScenarioStatusDetails.cs | 2 +- .../Settings/TestScenarioSetting.cs | 10 ++++++++++ e2etest/GuestProxyAgentTest/Utilities/Constants.cs | 1 + e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs | 7 ++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/e2etest/GuestProxyAgentTest/Models/TestScenarioStatusDetails.cs b/e2etest/GuestProxyAgentTest/Models/TestScenarioStatusDetails.cs index b19a1f23..84824594 100644 --- a/e2etest/GuestProxyAgentTest/Models/TestScenarioStatusDetails.cs +++ b/e2etest/GuestProxyAgentTest/Models/TestScenarioStatusDetails.cs @@ -37,7 +37,7 @@ public string TestCasesErrorMessage { get { - return FailedCases.Count() == 0? "": $"Test Scenario:{ScenarioName} failed by test cases: {string.Join(',', FailedCases)}, Check the test case log for error details."; + return FailedCases.Count() == 0 ? "" : $"Test Scenario:{ScenarioName} failed by test cases: {string.Join(',', FailedCases)}, Check the test case log for error details."; } } } diff --git a/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs b/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs index 80ab01e3..8528fee9 100644 --- a/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs +++ b/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs @@ -54,5 +54,15 @@ public class VMImageDetails public string Offer { get; set; } = null!; public string Sku { get; set; } = null!; public string Version { get; set; } = null!; + + public bool IsArm64 + { + get + { + return Offer == null ? false : Offer.Contains("arm64", StringComparison.OrdinalIgnoreCase) || + Sku == null ? false : Sku.Contains("arm64", StringComparison.OrdinalIgnoreCase); + } + } + } } diff --git a/e2etest/GuestProxyAgentTest/Utilities/Constants.cs b/e2etest/GuestProxyAgentTest/Utilities/Constants.cs index 18679fbc..2fe03549 100644 --- a/e2etest/GuestProxyAgentTest/Utilities/Constants.cs +++ b/e2etest/GuestProxyAgentTest/Utilities/Constants.cs @@ -23,6 +23,7 @@ public static class Constants public static readonly string RUNCOMMAND_ERROR_OUTPUT_FILE_NAME = "runCommandErr.txt"; public static readonly string RUNCOMMAND_CUSTOM_OUTPUT_SAS_PARAMETER_NAME = "customOutputJsonSAS"; public static readonly string COULD_CLEANUP_TAG_NAME = "CouldCleanup"; + public static readonly string ENFORCE_ARCHITECTURE_TYPE_FOR_EXTENSIONS = "EnforceArchitectureTypeForExtensions"; public const string INSTALL_LINUX_GUEST_PROXY_AGENT_PACKAGE_SCRIPT_NAME = "InstallGuestProxyAgentPackage.sh"; public static readonly string GUEST_PROXY_AGENT_E2E_ACCESS_TOKEN_ENV = "GuestProxyAgentE2EAccessToken"; public static readonly string GUEST_PROXY_AGENT_E2E_ACCESS_TOKEN_STORAGE_ACCOUNT_ENV = "GuestProxyAgentE2EAccessTokenForStorageAccount"; diff --git a/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs b/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs index 727c5d85..055e42c0 100644 --- a/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs +++ b/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs @@ -172,7 +172,12 @@ private async Task DoCreateVMData(ResourceGroupResource rgr, Product = this.testScenarioSetting.VMImageDetails.Offer, }; } - + + if (this.testScenarioSetting.VMImageDetails.IsArm64) + { + vmData.Tags.Add(Constants.ENFORCE_ARCHITECTURE_TYPE_FOR_EXTENSIONS, "true"); + } + return vmData; } From 7828aee2da0773add988d50a89255fe18846baca Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Fri, 25 Jul 2025 10:29:41 -0700 Subject: [PATCH 3/9] enable arm64 extension tests --- .../GuestProxyAgentTest/TestCases/AddLinuxVMExtensionCase.cs | 2 +- .../TestMap/AzureLinux3-Arm64-TestGroup.yml | 2 ++ .../GuestProxyAgentTest/TestMap/Ubuntu24-Arm64-TestGroup.yml | 4 +++- .../TestMap/WinClient11-Arm64-TestGroup.yml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/e2etest/GuestProxyAgentTest/TestCases/AddLinuxVMExtensionCase.cs b/e2etest/GuestProxyAgentTest/TestCases/AddLinuxVMExtensionCase.cs index bfd53f28..6fb80a58 100644 --- a/e2etest/GuestProxyAgentTest/TestCases/AddLinuxVMExtensionCase.cs +++ b/e2etest/GuestProxyAgentTest/TestCases/AddLinuxVMExtensionCase.cs @@ -24,7 +24,7 @@ public override async Task StartAsync(TestCaseExecutionContext context) { Location = GuestProxyAgentTest.Settings.TestSetting.Instance.location, Publisher = "Microsoft.CPlat.ProxyAgent", - ExtensionType = "ProxyAgentLinuxTest", + ExtensionType = context.ScenarioSetting.VMImageDetails.IsArm64 ? "ProxyAgentLinuxARM64Test" : "ProxyAgentLinuxTest", TypeHandlerVersion = "1.0", AutoUpgradeMinorVersion = false, EnableAutomaticUpgrade = false, diff --git a/e2etest/GuestProxyAgentTest/TestMap/AzureLinux3-Arm64-TestGroup.yml b/e2etest/GuestProxyAgentTest/TestMap/AzureLinux3-Arm64-TestGroup.yml index 623567bb..d5dfdccb 100644 --- a/e2etest/GuestProxyAgentTest/TestMap/AzureLinux3-Arm64-TestGroup.yml +++ b/e2etest/GuestProxyAgentTest/TestMap/AzureLinux3-Arm64-TestGroup.yml @@ -8,3 +8,5 @@ scenarios: name: BVTScenario - name: LinuxPackageScenario className: GuestProxyAgentTest.TestScenarios.LinuxPackageScenario + - name: ProxyAgentExtension + className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension \ No newline at end of file diff --git a/e2etest/GuestProxyAgentTest/TestMap/Ubuntu24-Arm64-TestGroup.yml b/e2etest/GuestProxyAgentTest/TestMap/Ubuntu24-Arm64-TestGroup.yml index 5e5f64b1..e10e26b1 100644 --- a/e2etest/GuestProxyAgentTest/TestMap/Ubuntu24-Arm64-TestGroup.yml +++ b/e2etest/GuestProxyAgentTest/TestMap/Ubuntu24-Arm64-TestGroup.yml @@ -7,4 +7,6 @@ scenarios: - className: GuestProxyAgentTest.TestScenarios.BVTScenario name: BVTScenario - name: LinuxPackageScenario - className: GuestProxyAgentTest.TestScenarios.LinuxPackageScenario \ No newline at end of file + className: GuestProxyAgentTest.TestScenarios.LinuxPackageScenario + - name: ProxyAgentExtension + className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension \ No newline at end of file diff --git a/e2etest/GuestProxyAgentTest/TestMap/WinClient11-Arm64-TestGroup.yml b/e2etest/GuestProxyAgentTest/TestMap/WinClient11-Arm64-TestGroup.yml index 6a38d313..de35ae28 100644 --- a/e2etest/GuestProxyAgentTest/TestMap/WinClient11-Arm64-TestGroup.yml +++ b/e2etest/GuestProxyAgentTest/TestMap/WinClient11-Arm64-TestGroup.yml @@ -8,4 +8,6 @@ scenarios: className: GuestProxyAgentTest.TestScenarios.BVTScenario - name: BugFixesScenario className: GuestProxyAgentTest.TestScenarios.BugFixesScenario + - name: ProxyAgentExtension + className: GuestProxyAgentTest.TestScenarios.ProxyAgentExtension From 8bd3ff6b2b7ac7128d9039a4401939d19d570ac6 Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Mon, 28 Jul 2025 12:14:44 -0700 Subject: [PATCH 4/9] E2E tests program accepts proxyAgentVersion parameter. --- e2etest/GuestProxyAgentTest/Program.cs | 6 ++-- .../Settings/TestSetting.cs | 4 ++- .../TestScenarios/ProxyAgentExtension.cs | 36 ++++--------------- .../Utilities/Constants.cs | 7 ---- .../Utilities/TestCommonUtilities.cs | 4 +-- 5 files changed, 15 insertions(+), 42 deletions(-) diff --git a/e2etest/GuestProxyAgentTest/Program.cs b/e2etest/GuestProxyAgentTest/Program.cs index b47c3814..330f6e23 100644 --- a/e2etest/GuestProxyAgentTest/Program.cs +++ b/e2etest/GuestProxyAgentTest/Program.cs @@ -23,13 +23,15 @@ static async Task Main(string[] args) var testConfigFilePath = args[0]; var testResultFolder = args[1]; var guestProxyAgentZipFilePath = args[2]; + var proxyAgentVersion = args[3]; var test_arm64 = false; - if (args.Length > 3 && args[3].Equals("arm64", StringComparison.InvariantCultureIgnoreCase)) + if (args.Length > 4 && args[4].Equals("arm64", StringComparison.InvariantCultureIgnoreCase)) { test_arm64 = true; } + - TestCommonUtilities.TestSetup(guestProxyAgentZipFilePath, testConfigFilePath, testResultFolder); + TestCommonUtilities.TestSetup(guestProxyAgentZipFilePath, testConfigFilePath, testResultFolder, proxyAgentVersion); VMHelper.Instance.CleanupOldTestResourcesAndForget(); diff --git a/e2etest/GuestProxyAgentTest/Settings/TestSetting.cs b/e2etest/GuestProxyAgentTest/Settings/TestSetting.cs index bb085093..19e2e066 100644 --- a/e2etest/GuestProxyAgentTest/Settings/TestSetting.cs +++ b/e2etest/GuestProxyAgentTest/Settings/TestSetting.cs @@ -35,6 +35,7 @@ public static TestSetting Instance internal string zipFilePath = null!; internal string sharedStorageAccountUrl = null!; internal string testResultFolder = null!; + internal string proxyAgentVersion = null!; internal int testMapTimeoutMilliseconds = 1000 * 60 * 180; internal string windowsInVmWireServerAccessControlProfileReferenceId = null!; internal string windowsInVmIMDSAccessControlProfileReferenceId = null!; @@ -53,7 +54,7 @@ internal string InVmIMDSAccessControlProfileReferenceId private TestSetting() { } - public static void Init(TestConfig testConfig, string zipFilePath, string testResultFolder) + public static void Init(TestConfig testConfig, string zipFilePath, string testResultFolder, string proxyAgentVersion) { var scriptsFolder = Constants.IS_WINDOWS() ? "Scripts" : "LinuxScripts"; @@ -78,6 +79,7 @@ public static void Init(TestConfig testConfig, string zipFilePath, string testRe linuxInVmIMDSAccessControlProfileReferenceId = testConfig.LinuxInVmIMDSAccessControlProfileReferenceId, zipFilePath = zipFilePath, testResultFolder = testResultFolder, + proxyAgentVersion = proxyAgentVersion, }; } } diff --git a/e2etest/GuestProxyAgentTest/TestScenarios/ProxyAgentExtension.cs b/e2etest/GuestProxyAgentTest/TestScenarios/ProxyAgentExtension.cs index 02f6befc..5be330e7 100644 --- a/e2etest/GuestProxyAgentTest/TestScenarios/ProxyAgentExtension.cs +++ b/e2etest/GuestProxyAgentTest/TestScenarios/ProxyAgentExtension.cs @@ -14,47 +14,23 @@ public override void TestScenarioSetup() string zipFile = Settings.TestSetting.Instance.zipFilePath; string withoutExt = Path.GetFileNameWithoutExtension(zipFile); string extractPath = Path.Combine(Path.GetDirectoryName(zipFile), withoutExt); - string proxyAgentVersion = ""; - string exePath = ""; - try - { - ZipFile.ExtractToDirectory(zipFile, extractPath); - Console.WriteLine("Extraction successful!"); - } - catch (Exception ex) - { - Console.WriteLine($"An error occurred: {ex.Message}"); - } + // Passing in 0 version number for the first validation case + string proxyAgentVersionBeforeUpdate = "0"; + string proxyAgentVersion = Settings.TestSetting.Instance.proxyAgentVersion; + ConsoleLog(string.Format("Received ProxyAgent Version:{0}", proxyAgentVersion)); + if (!Constants.IS_WINDOWS()) { AddTestCase(new SetupCGroup2TestCase("SetupCGroup2")); AddTestCase(new RebootVMCase("RebootVMCaseAfterSetupCGroup2")); AddTestCase(new AddLinuxVMExtensionCase("AddLinuxVMExtensionCase")); AddTestCase(new EnableProxyAgentCase()); - exePath = extractPath + "/ProxyAgent/ProxyAgent/azure-proxy-agent"; } else { EnableProxyAgentForNewVM = true; - exePath = extractPath + "\\ProxyAgent\\ProxyAgent\\GuestProxyAgent.exe"; } - var process = new Process() - { - StartInfo = new ProcessStartInfo - { - FileName = exePath, - Arguments = "--version", - RedirectStandardOutput = true, - RedirectStandardError = true, - UseShellExecute = false, - CreateNoWindow = true, - } - }; - process.Start(); - proxyAgentVersion = process.StandardOutput.ReadToEnd(); - process.WaitForExit(); - // Passing in 0 version number for the first validation case - string proxyAgentVersionBeforeUpdate = "0"; + AddTestCase(new GuestProxyAgentExtensionValidationCase("GuestProxyAgentExtensionValidationCaseBeforeUpdate", proxyAgentVersionBeforeUpdate)); AddTestCase(new InstallOrUpdateGuestProxyAgentExtensionCase()); AddTestCase(new GuestProxyAgentExtensionValidationCase("GuestProxyAgentExtensionValidationCaseAfterUpdate", proxyAgentVersion)); diff --git a/e2etest/GuestProxyAgentTest/Utilities/Constants.cs b/e2etest/GuestProxyAgentTest/Utilities/Constants.cs index 2fe03549..3b477984 100644 --- a/e2etest/GuestProxyAgentTest/Utilities/Constants.cs +++ b/e2etest/GuestProxyAgentTest/Utilities/Constants.cs @@ -1,13 +1,6 @@ // Copyright (c) Microsoft Corporation // SPDX-License-Identifier: MIT -using Azure.Core; -using Azure.ResourceManager.Network.Models; -using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; namespace GuestProxyAgentTest.Utilities { diff --git a/e2etest/GuestProxyAgentTest/Utilities/TestCommonUtilities.cs b/e2etest/GuestProxyAgentTest/Utilities/TestCommonUtilities.cs index d71cf554..a9a0a8a4 100644 --- a/e2etest/GuestProxyAgentTest/Utilities/TestCommonUtilities.cs +++ b/e2etest/GuestProxyAgentTest/Utilities/TestCommonUtilities.cs @@ -16,9 +16,9 @@ public static class TestCommonUtilities /// /// /// - public static void TestSetup(string guestProxyAgentZipFilePath, string testConfigFilePath, string testResultFolder) + public static void TestSetup(string guestProxyAgentZipFilePath, string testConfigFilePath, string testResultFolder, string proxyAgentVersion) { - TestSetting.Init(YamlUtils.DeserializeYaml(testConfigFilePath), guestProxyAgentZipFilePath, testResultFolder); + TestSetting.Init(YamlUtils.DeserializeYaml(testConfigFilePath), guestProxyAgentZipFilePath, testResultFolder, proxyAgentVersion); StorageHelper.Init(TestSetting.Instance.tenantId, TestSetting.Instance.appClientId); VMHelper.Init(TestSetting.Instance.tenantId, TestSetting.Instance.appClientId, TestSetting.Instance.subscriptionId); From b890b350d594485784f9dbf8ddf4b730ccc96186 Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Mon, 28 Jul 2025 14:15:29 -0700 Subject: [PATCH 5/9] fix --- .../GuestProxyAgentTest/GuestProxyAgentScenarioTests.cs | 9 ++++++--- .../TestScenarios/TestScenarioBase.cs | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2etest/GuestProxyAgentTest/GuestProxyAgentScenarioTests.cs b/e2etest/GuestProxyAgentTest/GuestProxyAgentScenarioTests.cs index 501645b7..90df2803 100644 --- a/e2etest/GuestProxyAgentTest/GuestProxyAgentScenarioTests.cs +++ b/e2etest/GuestProxyAgentTest/GuestProxyAgentScenarioTests.cs @@ -21,7 +21,7 @@ public class GuestProxyAgentScenarioTests public async Task StartAsync(List testScenarioList) { var groupTestResultBuilderMap = new Dictionary(); - foreach(var testGroupName in testScenarioList.Select(x => x.testGroupName).ToHashSet()) + foreach (var testGroupName in testScenarioList.Select(x => x.testGroupName).ToHashSet()) { groupTestResultBuilderMap[testGroupName] = new JunitTestResultBuilder(TestSetting.Instance.testResultFolder, testGroupName); } @@ -57,7 +57,6 @@ public async Task StartAsync(List testScenarioList) testScenarioStatusDetails.Status = ScenarioTestStatus.Completed; testScenarioStatusDetails.ErrorMessage = "Failed to create the scenario class instance: " + testScenario.testScenarioClassName; } - } catch (Exception ex) { @@ -72,6 +71,10 @@ public async Task StartAsync(List testScenarioList) { taskList.Add(testScenarioTask); } + var message = string.Format("Test Group: {0}, Test Scenario: {1}: {2} ({3})" + , testScenario.testGroupName, testScenario.testScenarioName + , testScenarioStatusDetails.Result, testScenarioStatusDetails.ErrorMessage); + Console.WriteLine(message); } } var stopMonitor = new ManualResetEvent(false); @@ -91,7 +94,7 @@ public async Task StartAsync(List testScenarioList) { Console.WriteLine($"Test execution exception: {ex.Message}"); } - + stopMonitor.Set(); foreach (var groupName in groupTestResultBuilderMap.Keys) diff --git a/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs b/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs index 92863025..f40b7cb2 100644 --- a/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs +++ b/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs @@ -58,7 +58,8 @@ private string LogPrefix { get { - return "Test Group: " + _testScenarioSetting.testGroupName + ", Test Scenario: " + _testScenarioSetting.testScenarioName + ": "; + // _testScenarioSetting may still null in constructor functions + return "Test Group: " + _testScenarioSetting?.testGroupName + ", Test Scenario: " + _testScenarioSetting?.testScenarioName + ": "; } } From 7107888d3d6e2cf533c1d311f5f29e45510e766e Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Tue, 29 Jul 2025 11:54:52 -0700 Subject: [PATCH 6/9] add more test logging --- e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs b/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs index f40b7cb2..4381952c 100644 --- a/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs +++ b/e2etest/GuestProxyAgentTest/TestScenarios/TestScenarioBase.cs @@ -154,6 +154,7 @@ private async Task DoStartAsync(TestScenarioStatusDetails testScenarioStatusDeta var vmCreateTestName = "CreateVM"; try { + ConsoleLog(string.Format("Creating {0} VM...", _testScenarioSetting.VMImageDetails.IsArm64 ? "ARM64" : "AMD64")); vmr = await _vmBuilder.Build(this.EnableProxyAgentForNewVM, cancellationToken); ConsoleLog("VM Create succeed"); sw.Stop(); From 09a7706ee2a67d32e1823f2386e43ced130b343f Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Tue, 29 Jul 2025 12:56:21 -0700 Subject: [PATCH 7/9] Fix --- e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs b/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs index 8528fee9..9772c200 100644 --- a/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs +++ b/e2etest/GuestProxyAgentTest/Settings/TestScenarioSetting.cs @@ -59,10 +59,9 @@ public bool IsArm64 { get { - return Offer == null ? false : Offer.Contains("arm64", StringComparison.OrdinalIgnoreCase) || - Sku == null ? false : Sku.Contains("arm64", StringComparison.OrdinalIgnoreCase); + return (Offer == null ? false : Offer.Contains("arm64", StringComparison.OrdinalIgnoreCase)) || + (Sku == null ? false : Sku.Contains("arm64", StringComparison.OrdinalIgnoreCase)); } } - } } From e5565e7881ff3d79716f71fdae1a8f4266546501 Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Wed, 30 Jul 2025 13:18:07 -0700 Subject: [PATCH 8/9] workarounds to use ARM64 VM Extension --- e2etest/GuestProxyAgentTest/Utilities/Constants.cs | 5 +++-- e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/e2etest/GuestProxyAgentTest/Utilities/Constants.cs b/e2etest/GuestProxyAgentTest/Utilities/Constants.cs index 3b477984..bbfa7da1 100644 --- a/e2etest/GuestProxyAgentTest/Utilities/Constants.cs +++ b/e2etest/GuestProxyAgentTest/Utilities/Constants.cs @@ -16,7 +16,8 @@ public static class Constants public static readonly string RUNCOMMAND_ERROR_OUTPUT_FILE_NAME = "runCommandErr.txt"; public static readonly string RUNCOMMAND_CUSTOM_OUTPUT_SAS_PARAMETER_NAME = "customOutputJsonSAS"; public static readonly string COULD_CLEANUP_TAG_NAME = "CouldCleanup"; - public static readonly string ENFORCE_ARCHITECTURE_TYPE_FOR_EXTENSIONS = "EnforceArchitectureTypeForExtensions"; + public static readonly string TAGS_ENFORCE_ARCHITECTURE_TYPE_FOR_EXTENSIONS = "EnforceArchitectureTypeForExtensions"; + public static readonly string TAGS_MUST_NOT_REUSE_PREPROVISIONED_VM = "MustNotReusePreprovisionedVM"; public const string INSTALL_LINUX_GUEST_PROXY_AGENT_PACKAGE_SCRIPT_NAME = "InstallGuestProxyAgentPackage.sh"; public static readonly string GUEST_PROXY_AGENT_E2E_ACCESS_TOKEN_ENV = "GuestProxyAgentE2EAccessToken"; public static readonly string GUEST_PROXY_AGENT_E2E_ACCESS_TOKEN_STORAGE_ACCOUNT_ENV = "GuestProxyAgentE2EAccessTokenForStorageAccount"; @@ -53,7 +54,7 @@ static Constants() public static bool IS_WINDOWS() { - return RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + return RuntimeInformation.IsOSPlatform(OSPlatform.Windows); } } } diff --git a/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs b/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs index 055e42c0..7dc8b460 100644 --- a/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs +++ b/e2etest/GuestProxyAgentTest/Utilities/VMBuilder.cs @@ -175,7 +175,9 @@ private async Task DoCreateVMData(ResourceGroupResource rgr, if (this.testScenarioSetting.VMImageDetails.IsArm64) { - vmData.Tags.Add(Constants.ENFORCE_ARCHITECTURE_TYPE_FOR_EXTENSIONS, "true"); + // workarounds to use ARM64 VM Extension + vmData.Tags.Add(Constants.TAGS_ENFORCE_ARCHITECTURE_TYPE_FOR_EXTENSIONS, "true"); + vmData.Tags.Add(Constants.TAGS_MUST_NOT_REUSE_PREPROVISIONED_VM, "true"); } return vmData; From c5fced37f7a618474ef9a12fc3dafb2168e276f8 Mon Sep 17 00:00:00 2001 From: "Zhidong Peng (HE/HIM)" Date: Wed, 30 Jul 2025 13:26:58 -0700 Subject: [PATCH 9/9] fix spelling --- .github/actions/spelling/expect.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 6142f860..06de539d 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -210,6 +210,7 @@ pprev prandom predef prefmaxlen +preprovisioned printk PROCESSINFOCLASS proxyagent @@ -342,6 +343,7 @@ wireserver wireserverand wireserverandimds WMI +workarounds WORKDIR WScript wsf