Skip to content

Conversation

@tjones60
Copy link
Contributor

@tjones60 tjones60 commented Dec 10, 2025

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.

Copilot AI review requested due to automatic review settings December 10, 2025 08:53
@tjones60 tjones60 requested a review from a team as a code owner December 10, 2025 08:53
Copy link
Contributor

Copilot AI left a 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, and Vtl types for generic storage management
  • Refactors Vtl2StorageControllerBuilder API to require controller type at construction time
  • Renames PetriDiskType to PetriDisk for 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

@github-actions
Copy link

@tjones60 tjones60 force-pushed the petri_additional_disks branch from aeb8a3a to 4337b75 Compare December 17, 2025 21:35
@github-actions
Copy link

@tjones60 tjones60 force-pushed the petri_additional_disks branch from 4337b75 to e712409 Compare December 19, 2025 20:40
@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

@tjones60 tjones60 force-pushed the petri_additional_disks branch 2 times, most recently from 4337b75 to 17c0a58 Compare December 20, 2025 03:40
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.

2 participants