pub struct VmImpl {
pub os: String,
pub provision: Vec<String>,
pub image: Option<VmImage>,
pub tpm: Option<bool>,
pub boot: Option<Boot>,
pub setup: Vec<String>,
}Expand description
How a VM produces a machine: its OS, and the steps that set it up.
Fields§
§os: StringThe OS, as <family>@<version> (debian@12) or a family alone for its pinned default;
each target maps it to an image. Once parsed, it holds the image table’s name for the OS
(KNOWN_OS, see crate::os::Os::name), as lowering writes it. Defaults to the machine’s
os, which it must agree with when both are set. May come from common: or a group
(vm: {} in the machine).
provision: Vec<String>Steps run inside the VM, in order: .sh on Linux (and Ansible playbooks, .yml),
.ps1 on Windows. On Linux, the step reboot restarts the machine and goes on with the
next step once it is back (a new kernel, a changed boot configuration).
image: Option<VmImage>The image to use instead of the built-in one for os, per target.
tpm: Option<bool>A virtual TPM 2.0 (BitLocker, Windows Hello, measured boot). Unset, a Windows 11 machine
gets one wherever the target can give one, and runs without where it can’t (its
built-in images install without one). true requires one: a target that gives none
refuses the environment. false gives none.
boot: Option<Boot>How it boots, when not the way its image does: its own kernel, firmware, boot order or network boot.
setup: Vec<String>Project scripts run once the machine is up, after its command started (setup:). Set by
lowering, never written in a spec.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VmImpl
impl<'de> Deserialize<'de> for VmImpl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for VmImpl
impl JsonSchema for VmImpl
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more