Skip to content

Conversation

@mattkur
Copy link
Contributor

@mattkur mattkur commented Oct 14, 2025

In doing #2137, I realized that I had done almost all the work required to do scsi-to-scsi relay for the Hyper-V backend.

petri:

  • Add infra to set VTL2 settings for a Hyper-V test backend.
  • Return the SCSI controller VSID when one is added (required to reference that controller in VTL2 settings...).
  • Add a hyperv_test macro, so that the test can get access to the Hyper-V Petri backend (like openvmm_test).

vmm_tests:

  • Write a test that uses this infra.

@mattkur mattkur requested review from a team as code owners October 14, 2025 23:01
@mattkur mattkur requested review from a team and Copilot October 14, 2025 23:01
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

Adds infrastructure to configure and update VTL2 settings for Hyper-V VMs, enabling SCSI-to-SCSI relay and a corresponding integration test. Key changes introduce a new hyperv_test macro, extend the Hyper-V backend to set/query VTL2 settings, return VSID information when adding SCSI controllers, and add a test exercising vmbus relay with a VTL2-backed SCSI disk.

  • Add Hyper-V VTL2 settings plumbing (set/get, PowerShell support, runtime caching).
  • Extend add_scsi_controller to return (controller_number, VSID) and propagate through backend.
  • Introduce storvsp_hyperv test using new hyperv_test macro and VTL2 storage relay setup.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vmm_tests/tests/tests/x86_64/storage.rs Adds Hyper-V SCSI relay test and supporting imports.
vmm_tests/Cargo.toml Adds disk_vhd1 dependency for test VHD creation.
vmm_test_macros/src/lib.rs Introduces hyperv_test attribute macro.
petri/src/vm/hyperv/vm.rs Returns VSID from add_scsi_controller, adds setter for base VTL2 settings.
petri/src/vm/hyperv/powershell.rs Updates SCSI controller addition to return VSID; adds run_set_base_vtl2_settings.
petri/src/vm/hyperv/mod.rs Adds HyperVPetriConfig, VTL2 settings handling, public runtime APIs.
petri/src/vm/hyperv/hyperv.psm1 Adds PowerShell helpers for SCSI controller properties and setting VTL2 settings.

@github-actions
Copy link

@mattkur mattkur changed the title petri: add the support required to do Hyper-V + SCSI-to-SCSI relay. Add a test that uses this. petri: add support for Hyper-V + SCSI-to-SCSI relay, use it Oct 15, 2025
@mattkur mattkur requested a review from amy-microsoft October 15, 2025 12:46
@github-actions
Copy link

@chris-oo
Copy link
Member

seems like it doesn't work because it's trying to hot-add the controller?

@mattkur
Copy link
Contributor Author

mattkur commented Oct 15, 2025

seems like it doesn't work because it's trying to hot-add the controller?

Right. I admit I'm letting CI do my testing for me since I'm on a machine that is too small to do this efficiently; will clean this up locally.

@mattkur mattkur merged commit a508c30 into microsoft:main Oct 16, 2025
50 checks passed
@mattkur mattkur deleted the scsi-to-scsi-relay-test-hyperv branch October 16, 2025 11:29
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