pub struct VmConfig {Show 15 fields
pub schema_version: u32,
pub name: String,
pub generation_id: Option<Uuid>,
pub memory_mib: u64,
pub vcpus: u16,
pub acceleration: Acceleration,
pub firmware: Firmware,
pub software_tpm2: bool,
pub disk: DiskConfig,
pub install_media: Option<PathBuf>,
pub network: NetworkConfig,
pub audio: AudioMode,
pub pointer_device: PointerDevice,
pub usb_devices: Vec<UsbHostDevice>,
pub shares: Vec<DirectoryShare>,
}Expand description
A persistent virtual machine definition.
Fields§
§schema_version: u32Configuration schema version.
name: StringUser-visible and filesystem-safe VM name.
generation_id: Option<Uuid>Stable generation identifier exposed to the guest.
memory_mib: u64Guest RAM in mebibytes.
vcpus: u16Number of virtual CPUs.
acceleration: AccelerationPreferred accelerator.
firmware: FirmwareBoot firmware selection.
software_tpm2: boolAttach a per-VM software TPM 2.0 device.
disk: DiskConfigPrimary system disk.
install_media: Option<PathBuf>Optional read-only installation image.
network: NetworkConfigGuest network configuration.
audio: AudioModeGuest audio backend.
pointer_device: PointerDeviceQEMU USB pointer device; the tablet remains the compatibility default.
usb_devices: Vec<UsbHostDevice>Host USB devices cold-plugged into the guest.
Host directories exposed through virtio-9p.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VmConfig
impl<'de> Deserialize<'de> for VmConfig
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
impl Eq for VmConfig
impl StructuralPartialEq for VmConfig
Auto Trait Implementations§
impl Forget for VmConfig
impl Freeze for VmConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<PortForward>: Freeze,
PhantomData<UsbHostDevice>: Freeze,
PhantomData<DirectoryShare>: Freeze,
impl Move for VmConfig
impl RefUnwindSafe for VmConfig
impl Send for VmConfigwhere
RawVecInner: Send,
impl Sync for VmConfigwhere
RawVecInner: Sync,
impl Unpin for VmConfig
impl UnsafeUnpin for VmConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PortForward>: UnsafeUnpin,
PhantomData<UsbHostDevice>: UnsafeUnpin,
PhantomData<DirectoryShare>: UnsafeUnpin,
impl UnwindSafe for VmConfigwhere
RawVecInner: UnwindSafe,
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