Skip to content

Pass custom workload paths to Cloud Hypervisor - #4691

Open
Vivek Yadav (vyadavmsft) wants to merge 3 commits into
mainfrom
bugfix/ch-custom-workload-paths_240826_142428
Open

Pass custom workload paths to Cloud Hypervisor#4691
Vivek Yadav (vyadavmsft) wants to merge 3 commits into
mainfrom
bugfix/ch-custom-workload-paths_240826_142428

Conversation

@vyadavmsft

Copy link
Copy Markdown
Collaborator

Description

Pass the Microsoft Cloud Hypervisor workload paths through the CH_CUSTOM_* environment variables consumed by current Microsoft Cloud Hypervisor branches while retaining the legacy USE_MS_* selectors for older branches.

  • Select /usr/share/cloud-hypervisor/Image for ARM64 guests and /usr/share/cloud-hypervisor/vmlinux.bin for other architectures.
  • Map the hypervisor firmware, OVMF, and bzImage assets to their corresponding CH_CUSTOM_* variables.
  • Log the selected UVM kernel's embedded build string, SHA-256, file type, and owning package when available to make workload-selection failures diagnosable.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:
verify_cloud_hypervisor_integration_tests

Impacted LISA Features:
None (CloudHypervisorTests tool setup only)

Tested Azure Marketplace Images:

  • Not run; requires Microsoft Cloud Hypervisor artifacts and a virtualization-capable host

Test Results

Image VM Size Result
Local static validation N/A PASSED: Black, Flake8, targeted Pylint, py_compile, and git diff --check

Full-file Pylint reports two pre-existing implicit-str-concat findings outside this branch's changed lines; targeted Pylint passes with that baseline rule disabled.

Current Microsoft Cloud Hypervisor branches consume CH_CUSTOM_* paths instead of the legacy USE_MS_* selectors. Map enabled Microsoft kernel and firmware options to the Dom0-provided assets, including the architecture-specific guest kernel, while retaining legacy flags for older branches.

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

This PR updates the Cloud Hypervisor test tool setup to support newer Microsoft Cloud Hypervisor branches by exporting workload asset paths via CH_CUSTOM_* environment variables, while keeping the legacy USE_MS_* selectors for compatibility with older branches. It also adds logging to make kernel/workload selection failures easier to diagnose.

Changes:

  • Pass selected guest kernel path via CH_CUSTOM_KERNEL, choosing Image for ARM64 and vmlinux.bin for other architectures.
  • Map Microsoft Cloud Hypervisor firmware assets to CH_CUSTOM_FIRMWARE, CH_CUSTOM_OVMF, and CH_CUSTOM_BZIMAGE.
  • Add a helper to log selected kernel metadata (embedded build string, sha256, file type, owning package) when available.

Note: The PR is marked as a bug fix but has no linked issue; consider linking the related issue for traceability.


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

@LiliDeng

Copy link
Copy Markdown
Collaborator

AI Test Case Selection

Selected 1 test case(s): smoke_test

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3-arm64 latest

Result: Succeeded

View full logs in Azure DevOps

Comment thread lisa/microsoft/testsuites/cloud_hypervisor/ch_tests_tool.py Outdated
Inspect CH_CUSTOM_KERNEL when the Microsoft guest kernel is selected and report its embedded Linux build string, SHA-256, file type, and owning package. Keep optional metadata probes best-effort so minimal hosts still run Cloud Hypervisor tests.
Copilot AI review requested due to automatic review settings August 26, 2026 20:27
@vyadavmsft
Vivek Yadav (vyadavmsft) force-pushed the bugfix/ch-custom-workload-paths_240826_142428 branch from 2c16d7e to ec1a9b8 Compare August 26, 2026 20:27

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@LiliDeng

Copy link
Copy Markdown
Collaborator

AI Test Case Selection

Selected 1 test case(s): smoke_test

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3-arm64 latest

Result: Succeeded

View full logs in Azure DevOps

Set both CH_CUSTOM_KERNEL and CH_CUSTOM_BZIMAGE when either Microsoft kernel selector is enabled on x86_64.

Current Cloud Hypervisor validates these paths as a pair, and bzImage-only pipeline configurations otherwise fail before integration tests start. Preserve the existing independent ARM64 behavior.
LiliDeng
LiliDeng previously approved these changes Aug 27, 2026

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +1528 to +1531
else:
kernel_path = "/usr/share/cloud-hypervisor/vmlinux.bin"
self.env_vars["CH_CUSTOM_KERNEL"] = kernel_path
self.env_vars["CH_CUSTOM_BZIMAGE"] = "/usr/share/cloud-hypervisor/bzImage"
@LiliDeng

Copy link
Copy Markdown
Collaborator

AI Test Case Selection

Selected 1 test case(s): smoke_test

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3-arm64 latest

Result: Succeeded

View full logs in Azure DevOps

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