petri: physical nvme test plumbing#3504
Open
babayet2 wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Petri plumbing for Hyper-V-backed closed-source testing with physical NVMe devices.
Changes:
- Adds
PhysicalNvmeDeviceconfiguration and builder support in Petri. - Threads physical NVMe devices through Hyper-V VM creation PowerShell plumbing.
- Refactors shared Hyper-V CIM helpers into a separate PowerShell module.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
vmm_tests/vmm_tests/tests/tests/x86_64/storage.rs |
Formatting-only blank line change. |
petri/src/vm/openvmm/construct.rs |
Rejects physical NVMe devices for the OpenVMM backend. |
petri/src/vm/mod.rs |
Adds physical NVMe device config and builder API. |
petri/src/vm/hyperv/Utilities.psm1 |
Adds shared CIM/VMMS PowerShell helpers split out from hyperv.psm1. |
petri/src/vm/hyperv/powershell.rs |
Serializes physical NVMe settings and adds a request helper. |
petri/src/vm/hyperv/mod.rs |
Formatting-only whitespace change. |
petri/src/vm/hyperv/hyperv.psm1 |
Imports utility helpers and invokes physical NVMe assignment during VM creation. |
Comment on lines
+392
to
+399
| # Assign physical NVMe devices via PhysicalNvme module | ||
| if ($PhysicalNvmeControllers) { | ||
| Import-Module PhysicalNvme | ||
| foreach ($entry in $PhysicalNvmeControllers.GetEnumerator()) { | ||
| $vsid = $entry.Name | ||
| $targetVtl = $entry.Value["Vtl"] | ||
| $nsid = $entry.Value["Nsid"] | ||
| Add-PhysicalNvmeDeviceToVm -VmName $VMName -Vsid $vsid -Nsid $nsid -TargetVtl $targetVtl | Out-Null |
Contributor
There was a problem hiding this comment.
We could probably address this with some sort of try catch, but that can be best addressed in a separate PR.
Member
|
Is this just the first set of changes to add some plumbing, to be used later? |
Collaborator
Author
@chris-oo yep yep. the usage of this plumbing will be out-of-repo, there will not be follow-on changes in openvmm |
tjones60
reviewed
May 19, 2026
tjones60
reviewed
May 19, 2026
tjones60
reviewed
May 19, 2026
tjones60
reviewed
May 19, 2026
tjones60
reviewed
May 20, 2026
Comment on lines
+839
to
+840
| let nsid: u32 = | ||
| serde_json::from_str(&output).context("failed to parse PhysicalNvme discovery output")?; |
|
|
||
| if ($shouldProcess) { | ||
| $caption = if ($job.Caption) { $job.Caption } else { "Job in progress (no caption available)" } | ||
| $jobStatus = if ($job.JobStatus) { $job.JobState } else { "No job status available" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds petri plumbing to support closed source testing of physical nvme devices