pub struct VmConfig {Show 22 fields
pub memory_mib: u32,
pub distro: Option<String>,
pub distro_file: Option<PathBuf>,
pub bundle_file: Option<PathBuf>,
pub cache_dir: Option<PathBuf>,
pub unkernel_version: String,
pub offline: bool,
pub rebuild_cache: bool,
pub jit: bool,
pub mounts: Vec<MountSpec>,
pub data_disk: Option<PathBuf>,
pub data_disk_ro: bool,
pub data_disk_snapshot: bool,
pub data_disk_snapshot_state: Option<DiskSnapshot>,
pub workspace_snapshots: Vec<WorkspaceSnapshot>,
pub net: NetConfig,
pub switch: Option<SwitchAttachment>,
pub monitor: MonitorConfig,
pub vm_timeout: Option<Duration>,
pub sandbox: bool,
pub require_sandbox: bool,
pub forward_console: bool,
}Expand description
Configuration for booting a Linux VM inside wasmtime.
Fields§
§memory_mib: u32§distro: Option<String>§distro_file: Option<PathBuf>§bundle_file: Option<PathBuf>§cache_dir: Option<PathBuf>§unkernel_version: String§offline: bool§rebuild_cache: bool§jit: bool§mounts: Vec<MountSpec>§data_disk: Option<PathBuf>Optional persistent ext4 overlay disk path (/dev/wdb), auto-created (sparse 4 GiB) from
the bundled unkernel.datadisk template if it does not yet exist.
data_disk_ro: boolAttach data_disk read-only.
data_disk_snapshot: boolKeep writes to data_disk in an in-memory 4 KiB COW overlay (never mutates host file).
data_disk_snapshot_state: Option<DiskSnapshot>Optional pre-populated DiskSnapshot used to branch a VM from an existing ext4 COW state.
workspace_snapshots: Vec<WorkspaceSnapshot>Optional pre-populated WorkspaceSnapshot overlays seeded onto matching :cow mounts.
net: NetConfigOpt-in outbound user-space networking (air-gapped by default).
switch: Option<SwitchAttachment>Optional virtual Layer-2 switch port for multi-VM labs (enables guest eth0 even when
outbound NAT net.enabled is false).
monitor: MonitorConfigHost-side audit telemetry, interactive approval gates, and freeze-on-ask policy.
vm_timeout: Option<Duration>§sandbox: bool§require_sandbox: bool§forward_console: boolTrait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VmConfig
impl !UnwindSafe for VmConfig
impl Forget for VmConfig
impl Freeze for VmConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<MountSpec>: Freeze,
PhantomData<(u64, Box<[u8; 4096]>)>: Freeze,
PhantomData<WorkspaceSnapshot>: Freeze,
PhantomData<String>: Freeze,
PhantomData<PortForward>: Freeze,
*const ArcInner<Mutex<File>> is !null: Freeze,
PhantomData<ArcInner<Mutex<File>>>: Freeze,
*const ArcInner<VirtualSwitch> is !null: Freeze,
PhantomData<ArcInner<VirtualSwitch>>: Freeze,
*const ArcInner<dyn Fn(AuditEvent) + Send + Sync> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(AuditEvent) + Send + Sync>>: Freeze,
*const ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>>: Freeze,
impl Move for VmConfig
impl Send for VmConfigwhere
RawVecInner: Send,
RawTable<(u64, Box<[u8; 4096]>)>: Send,
NodeRef<Owned, String, CowEntry, LeafOrInternal>: Send,
BoxRaw<(String, CowEntry)>: Send,
RawTable<(String, ())>: Send,
Arc<Mutex<File>>: Send,
Arc<VirtualSwitch>: Send,
Arc<dyn Fn(AuditEvent) + Send + Sync>: Send,
Arc<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>: Send,
impl Sync for VmConfigwhere
RawVecInner: Sync,
RawTable<(u64, Box<[u8; 4096]>)>: Sync,
NodeRef<Owned, String, CowEntry, LeafOrInternal>: Sync,
BoxRaw<(String, CowEntry)>: Sync,
RawTable<(String, ())>: Sync,
Arc<Mutex<File>>: Sync,
Arc<VirtualSwitch>: Sync,
Arc<dyn Fn(AuditEvent) + Send + Sync>: Sync,
Arc<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>: Sync,
impl Unpin for VmConfigwhere
*const u8 is !null: Unpin,
Box<[u8; 4096]>: Unpin,
*const LeafNode<String, CowEntry> is !null: Unpin,
Box<(String, CowEntry)>: Unpin,
Arc<Mutex<File>>: Unpin,
Arc<VirtualSwitch>: Unpin,
Arc<dyn Fn(AuditEvent) + Send + Sync>: Unpin,
Arc<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>: Unpin,
impl UnsafeUnpin for VmConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<MountSpec>: UnsafeUnpin,
PhantomData<(u64, Box<[u8; 4096]>)>: UnsafeUnpin,
PhantomData<WorkspaceSnapshot>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<PortForward>: UnsafeUnpin,
*const ArcInner<Mutex<File>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<File>>>: UnsafeUnpin,
*const ArcInner<VirtualSwitch> is !null: UnsafeUnpin,
PhantomData<ArcInner<VirtualSwitch>>: UnsafeUnpin,
*const ArcInner<dyn Fn(AuditEvent) + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(AuditEvent) + Send + Sync>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more