pub struct PetriVmConfigOpenVmm { /* private fields */ }Expand description
Configuration state for a test VM.
Implementations§
Source§impl PetriVmConfigOpenVmm
impl PetriVmConfigOpenVmm
Sourcepub fn new(
openvmm_path: &ResolvedArtifact,
petri_vm_config: PetriVmConfig,
resources: &PetriVmResources,
) -> Result<Self>
pub fn new( openvmm_path: &ResolvedArtifact, petri_vm_config: PetriVmConfig, resources: &PetriVmResources, ) -> Result<Self>
Create a new VM configuration.
Source§impl PetriVmConfigOpenVmm
impl PetriVmConfigOpenVmm
Sourcepub fn with_vtl0_alias_map(self) -> Self
pub fn with_vtl0_alias_map(self) -> Self
Enable the VTL0 alias map.
Sourcepub fn with_battery(self) -> Self
pub fn with_battery(self) -> Self
Enable the battery for the VM.
Sourcepub fn with_igvm_attest_test_config(self, config: IgvmAttestTestConfig) -> Self
pub fn with_igvm_attest_test_config(self, config: IgvmAttestTestConfig) -> Self
Set test config for the GED’s IGVM attest request handler
Sourcepub fn with_nic(self) -> Self
pub fn with_nic(self) -> Self
Enable a synthnic for the VM.
Uses a mana emulator and the paravisor if a paravisor is present.
Sourcepub fn with_custom_vtl2_settings(
self,
f: impl FnOnce(&mut Vtl2Settings),
) -> Self
pub fn with_custom_vtl2_settings( self, f: impl FnOnce(&mut Vtl2Settings), ) -> Self
Add custom VTL 2 settings.
Sourcepub fn with_vtl2_relocation_mode(self, mode: Vtl2BaseAddressType) -> Self
pub fn with_vtl2_relocation_mode(self, mode: Vtl2BaseAddressType) -> Self
Load with the specified VTL2 relocation mode.
Sourcepub fn with_custom_config(self, f: impl FnOnce(&mut Config)) -> Self
pub fn with_custom_config(self, f: impl FnOnce(&mut Config)) -> Self
This is intended for special one-off use cases. As soon as something is needed in multiple tests we should consider making it a supported pattern.
Sourcepub fn with_allow_early_vtl0_access(self, allow: bool) -> Self
pub fn with_allow_early_vtl0_access(self, allow: bool) -> Self
Specifies whether VTL2 should be allowed to access VTL0 memory before it sets any VTL protections.
This is needed just for the TMK VMM, and only until it gains support for setting VTL protections.
Source§impl PetriVmConfigOpenVmm
impl PetriVmConfigOpenVmm
Sourcepub async fn run(self) -> Result<PetriVmOpenVmm>
pub async fn run(self) -> Result<PetriVmOpenVmm>
Run the VM, configuring pipette to automatically start if it is included in the config