-
Notifications
You must be signed in to change notification settings - Fork 156
vmgs: reprovision marker and guest state command line #2126
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
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 adds command line parameters to control guest state behaviors in OpenHCL environments, enabling configuration of boot policies, guest state lifetime, and encryption settings on hosts without WMI properties. It also refactors the existing UEFI frontpage disable functionality to use the same pattern.
Key changes:
- Adds new command line options:
HCL_DEFAULT_BOOT_ALWAYS_ATTEMPT
,HCL_GUEST_STATE_LIFETIME
, andHCL_STRICT_ENCRYPTION_POLICY
- Refactors
OPENHCL_DISABLE_UEFI_FRONTPAGE
to use optional boolean pattern - Extends VMM tests to include Hyper-V test cases for default boot and reprovision scenarios
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
vmm_tests/vmm_tests/tests/tests/multiarch/vmgs.rs | Updates test configuration to support generic backends and adds Hyper-V test cases |
petri/src/vm/openvmm/modify.rs | Removes OpenVMM-specific default boot configuration method |
petri/src/vm/openvmm/construct.rs | Updates OpenVMM backend to use shared default boot configuration |
petri/src/vm/mod.rs | Adds shared default boot configuration method and UefiConfig field |
petri/src/vm/hyperv/mod.rs | Implements command line parameter passing for Hyper-V OpenHCL configurations |
petri/src/vm/hyperv/hyperv.psm1 | Adds error handling for VM system settings modification |
openhcl/underhill_core/src/worker.rs | Updates worker configuration to handle new optional parameters and DPS overrides |
openhcl/underhill_core/src/options.rs | Adds new command line option definitions and parsing logic |
openhcl/underhill_core/src/loader/mod.rs | Removes disable_uefi_frontpage parameter from loader configuration |
openhcl/underhill_core/src/lib.rs | Updates worker launch configuration with new parameters |
e3ab6e5
to
854bcce
Compare
impl FromStr for GuestStateLifetimeCli { | ||
type Err = anyhow::Error; | ||
|
||
fn from_str(s: &str) -> Result<GuestStateLifetimeCli, anyhow::Error> { |
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.
Do we need numeric options?
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.
That is a good question, probably not, unless there is some maximum length of the command line we might bump up against. Here, I was just following the pattern of the other enum.
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.
Probably fine as is then, at some point we should consider rewriting our underhill options parsers with some crate that keeps the binary size small (which is why this is currently hand-written and not using clap).
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.
Ok, also the other reason was to provide consistency with the WMI properties which have fixed enum values. I realized the TestScenarioConfig doesn't have numeric options, it's just the two I added.
Adds a reprovisioned marker to the VMGS header to prevent the VMGS from repeatedly being reset when GuestStateLifetime is set to Reprovision. Adds HCL_DEFAULT_BOOT_ALWAYS_ATTEMPT, HCL_GUEST_STATE_LIFETIME, and HCL_STRICT_ENCRYPTION_POLICY so that these behaviors can be controlled on hosts without the required WMI properties. Refactors OPENHCL_DISABLE_UEFI_FRONTPAGE to be treated similarly. Adds Hyper-V tests for default boot and reprovision that are now possible with these changes.