-
Notifications
You must be signed in to change notification settings - Fork 162
petri: backend agnostic additional disk configuration #2551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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 makes the Petri VMM test framework backend-agnostic for additional storage configuration. It introduces generic interfaces for adding storage controllers and disks, with full implementation for Hyper-V and stubs for OpenVMM. The changes align storage management across both backends and move VTL2 settings handling into the runtime configuration.
Key changes:
- Introduces
PetriStorageController,PetriVmRuntimeConfig,StorageType, andVtltypes for generic storage management - Refactors
Vtl2StorageControllerBuilderAPI to require controller type at construction time - Renames
PetriDiskTypetoPetriDiskfor consistency - Updates OpenHCL configuration to support dynamic VTL2 settings modification via
ModifyFn
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
petri/src/vm/mod.rs |
Core API additions for storage controllers and disks; runtime configuration structure; refactored disk and VTL enums |
petri/src/vm/vtl2_settings.rs |
Simplified Vtl2StorageControllerBuilder API to take controller type at construction |
petri/src/vm/openvmm/mod.rs |
Stubbed out storage controller support; moved VTL2 settings to runtime config |
petri/src/vm/openvmm/start.rs |
Updated to return runtime config; apply VTL2 settings modifications |
petri/src/vm/openvmm/runtime.rs |
Added trait implementation for VTL2 settings and disk operations (stubbed) |
petri/src/vm/openvmm/modify.rs |
Updated VTL2 settings access patterns |
petri/src/vm/openvmm/construct.rs |
Validation for unsupported additional storage controllers |
petri/src/vm/hyperv/mod.rs |
Full implementation of storage controller and disk addition; VTL2 settings in runtime config |
petri/src/vm/hyperv/powershell.rs |
Added conversion from StorageType to PowerShell ControllerType |
vmm_tests/vmm_tests/tests/tests/x86_64/storage.rs |
Updated tests to use new API for storage controllers and VTL2 settings |
vmm_tests/vmm_tests/tests/tests/x86_64/openhcl_linux_direct.rs |
Updated builder API calls |
vmm_tests/vmm_tests/tests/tests/multiarch/openhcl_servicing.rs |
Updated builder API calls |
652a6e6 to
d0232fd
Compare
aeb8a3a to
4337b75
Compare
4337b75 to
e712409
Compare
4337b75 to
17c0a58
Compare
Makes the generic Petri configuration aware of additional disks and provides generic interfaces for adding controllers and disks. All Petri disks are now managed generically so that each backend just needs to know how to attach a generalized disk.