Skip to content

feat(vm_extensions): add boot validation tests for Azure Security Linux Agent and Azure Monitor Linux Agent - #4675

Merged
Jayprakash gupta (Jaype-e) merged 2 commits into
microsoft:mainfrom
Jaype-e:jaype-e/BVtestformany
Aug 17, 2026
Merged

feat(vm_extensions): add boot validation tests for Azure Security Linux Agent and Azure Monitor Linux Agent#4675
Jayprakash gupta (Jaype-e) merged 2 commits into
microsoft:mainfrom
Jaype-e:jaype-e/BVtestformany

Conversation

@Jaype-e

Copy link
Copy Markdown
Member

Summary

Adds dedicated boot-validation test suites for two VM extensions, following the existing VmExtensionTestBase onboarding pattern (same as CustomScript / AKS Linux Billing):

  • Azure Security Linux AgentMicrosoft.Azure.Security.Monitoring.AzureSecurityLinuxAgent
  • Azure Monitor Linux AgentMicrosoft.Azure.Monitor.AzureMonitorLinuxAgent

Each suite installs the extension with empty settings, asserts provisioning succeeds, verifies the installed version (when a full Major.Minor.Patch is requested), confirms the VM stays reachable over SSH, then removes the extension. All logic is delegated to the shared _boot_validation helper — no duplicated flow.

No boot-validation coverage existed for either extension. The existing AzureMonitorAgentLinux suite only provides a separate functional verify_azuremonitoragent_linux test and is left untouched.

Validation

Both files pass: py_compile, flake8, isort, black, and strict mypy, and register correctly with the LISA test selector (area=vm_extension, category=functional, priority=5, maturity=preview).

Version is read from the extension_version (or the per-suite {key}_version) runbook variable; it is required (no default fallback), matching the boot-validation contract.

Test guidance

Key Test Cases:
microsoft_azure_security_monitoring_azuresecuritylinuxagent_boot_validation_test|microsoft_azure_monitor_azuremonitorlinuxagent_boot_validation_test

Impacted LISA Features:
AzureExtension

Tested Azure Marketplace Images:

  • canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Adds a dedicated boot-validation suite for the Azure Security Linux Agent
VM extension (Microsoft.Azure.Security.Monitoring.AzureSecurityLinuxAgent),
following the VmExtensionTestBase onboarding pattern.

No boot-validation coverage existed for this extension; azsecpack.py uses
it only as part of the AzSecPack AutoConfig scenario.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc8510fd-f72a-4f2b-be02-a3a73a022d93
Adds a dedicated boot-validation suite for the Azure Monitor Agent Linux VM extension (Microsoft.Azure.Monitor.AzureMonitorLinuxAgent), following the VmExtensionTestBase onboarding pattern.

No boot-validation coverage existed for this extension; the existing AzureMonitorAgentLinux suite only provides a functional verify test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c0407c01-415f-4630-ad1f-d8db31824fa9

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

Adds two new VM extension boot-validation test suites under runtime_extensions/, following the existing VmExtensionTestBase pattern, to cover basic install/provision/version/SSH-reachability/uninstall validation for Azure Security Linux Agent and Azure Monitor Linux Agent.

Changes:

  • Introduces AzureSecurityLinuxAgentTests boot-validation suite for Microsoft.Azure.Security.Monitoring.AzureSecurityLinuxAgent.
  • Introduces AzureMonitorLinuxAgentTests boot-validation suite for Microsoft.Azure.Monitor.AzureMonitorLinuxAgent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lisa/microsoft/testsuites/vm_extensions/runtime_extensions/azure_security_linux_agent.py New boot-validation suite for Azure Security Linux Agent using shared _boot_validation flow.
lisa/microsoft/testsuites/vm_extensions/runtime_extensions/azure_monitor_linux_agent.py New boot-validation suite for Azure Monitor Linux Agent using shared _boot_validation flow.
Suppressed comments (2)

lisa/microsoft/testsuites/vm_extensions/runtime_extensions/azure_security_linux_agent.py:31

  • simple_requirement() excludes Windows by default only when neither supported_os nor unsupported_os is provided (see lisa/testsuite.py:446-449). By setting unsupported_os=[BSD] here, Windows becomes eligible for this suite, but this extension is Linux-only and will likely fail when scheduled on Windows images. Exclude Windows explicitly (or set supported_os=[Linux]).
    requirement=simple_requirement(
        supported_features=[AzureExtension],
        supported_platform_type=[AZURE],
        unsupported_os=[BSD],
    ),

lisa/microsoft/testsuites/vm_extensions/runtime_extensions/azure_monitor_linux_agent.py:31

  • simple_requirement() excludes Windows by default only when neither supported_os nor unsupported_os is provided (see lisa/testsuite.py:446-449). By setting unsupported_os=[BSD] here, Windows becomes eligible for this suite, but this extension is Linux-only and will likely fail when scheduled on Windows images. Exclude Windows explicitly (or set supported_os=[Linux]).
    requirement=simple_requirement(
        supported_features=[AzureExtension],
        supported_platform_type=[AZURE],
        unsupported_os=[BSD],
    ),

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Jaype-e
Jayprakash gupta (Jaype-e) merged commit 5c66c3f into microsoft:main Aug 17, 2026
27 checks passed
mcgov (mcgov) pushed a commit that referenced this pull request Aug 17, 2026
…ux Agent and Azure Monitor Linux Agent (#4675)

* feat(vm_extensions): add Azure Security Linux Agent boot validation test

Adds a dedicated boot-validation suite for the Azure Security Linux Agent
VM extension (Microsoft.Azure.Security.Monitoring.AzureSecurityLinuxAgent),
following the VmExtensionTestBase onboarding pattern.

No boot-validation coverage existed for this extension; azsecpack.py uses
it only as part of the AzSecPack AutoConfig scenario.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc8510fd-f72a-4f2b-be02-a3a73a022d93

* feat(vm_extensions): add Azure Monitor Linux Agent boot validation test

Adds a dedicated boot-validation suite for the Azure Monitor Agent Linux VM extension (Microsoft.Azure.Monitor.AzureMonitorLinuxAgent), following the VmExtensionTestBase onboarding pattern.

No boot-validation coverage existed for this extension; the existing AzureMonitorAgentLinux suite only provides a functional verify test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c0407c01-415f-4630-ad1f-d8db31824fa9

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dc8510fd-f72a-4f2b-be02-a3a73a022d93
Copilot-Session: c0407c01-415f-4630-ad1f-d8db31824fa9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants