Pass custom workload paths to Cloud Hypervisor - #4691
Pass custom workload paths to Cloud Hypervisor#4691Vivek Yadav (vyadavmsft) wants to merge 3 commits into
Conversation
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.
There was a problem hiding this comment.
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, choosingImagefor ARM64 andvmlinux.binfor other architectures. - Map Microsoft Cloud Hypervisor firmware assets to
CH_CUSTOM_FIRMWARE,CH_CUSTOM_OVMF, andCH_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.
AI Test Case SelectionSelected 1 test case(s): smoke_test Marketplace image: Result: Succeeded |
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.
2c16d7e to
ec1a9b8
Compare
AI Test Case SelectionSelected 1 test case(s): smoke_test Marketplace image: Result: Succeeded |
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.
| 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" |
AI Test Case SelectionSelected 1 test case(s): smoke_test Marketplace image: Result: Succeeded |
Description
Pass the Microsoft Cloud Hypervisor workload paths through the
CH_CUSTOM_*environment variables consumed by current Microsoft Cloud Hypervisor branches while retaining the legacyUSE_MS_*selectors for older branches./usr/share/cloud-hypervisor/Imagefor ARM64 guests and/usr/share/cloud-hypervisor/vmlinux.binfor other architectures.CH_CUSTOM_*variables.Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
verify_cloud_hypervisor_integration_tests
Impacted LISA Features:
None (CloudHypervisorTests tool setup only)
Tested Azure Marketplace Images:
Test Results
Full-file Pylint reports two pre-existing
implicit-str-concatfindings outside this branch's changed lines; targeted Pylint passes with that baseline rule disabled.