pub struct Hardware {
pub arch: Arch,
pub tpm: Tpm,
pub gpus: Option<Gpus>,
pub devices: Vec<Device>,
pub nested_virtualization: bool,
pub boot: Option<Boot>,
}Expand description
The hardware a machine asks for.
Fields§
§arch: ArchThe CPU architecture: amd64 (the default) or arm64.
tpm: TpmA virtual TPM 2.0: auto (the default: Windows 11 gets one where the target can),
required (a VM only) or none.
gpus: Option<Gpus>GPUs: a count (1), all, or { count, ids, driver, capabilities, options }. A container
gets the host’s; a VM gets them passed through or sized with them.
devices: Vec<Device>The host’s devices (/dev/fuse, host:guest[:permissions], or { host, guest, permissions }). A container only.
nested_virtualization: boolThe machine runs VMs of its own: its VM gets the CPU’s virtualization extensions. A VM only.
boot: Option<Boot>How it boots, when not the way its image does: its own kernel, firmware, boot order or network boot. A VM only.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hardware
impl<'de> Deserialize<'de> for Hardware
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Hardware
impl JsonSchema for Hardware
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Hardware
Auto Trait Implementations§
impl Freeze for Hardware
impl RefUnwindSafe for Hardware
impl Send for Hardware
impl Sync for Hardware
impl Unpin for Hardware
impl UnsafeUnpin for Hardware
impl UnwindSafe for Hardware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more