pub struct VmSnapshot {
pub disk: Option<DiskSnapshot>,
pub workspaces: Vec<WorkspaceSnapshot>,
/* private fields */
}Expand description
Forkable Tier-A snapshot of a VM’s persistent ext4 disk overlay and all :cow 9P workspaces.
Cloning a VmSnapshot is an in-memory copy of dirty 4 KiB disk blocks and staged workspace
entries. Calling VmSnapshot::boot_branch (or Vm::branch_from_snapshot) launches an
independent Linux VM from that exact filesystem state without mutating the parent VM, the host
disk image, or any host workspace directory.
Fields§
§disk: Option<DiskSnapshot>§workspaces: Vec<WorkspaceSnapshot>Implementations§
Source§impl VmSnapshot
impl VmSnapshot
Sourcepub fn boot_branch(
&self,
net: Option<NetConfig>,
monitor: Option<MonitorConfig>,
) -> Result<Vm>
pub fn boot_branch( &self, net: Option<NetConfig>, monitor: Option<MonitorConfig>, ) -> Result<Vm>
Boot an independent branch VM from this snapshot, optionally overriding network or host monitoring/approval policies (e.g., to compare agent behavior when a sensitive read or outbound domain is allowed vs. blocked).
Sourcepub fn with_time_warp(&self, enabled: bool) -> Self
pub fn with_time_warp(&self, enabled: bool) -> Self
Return a cloned snapshot with time_warp overridden for subsequent boot_branch() calls.
Trait Implementations§
Source§impl Clone for VmSnapshot
impl Clone for VmSnapshot
Auto Trait Implementations§
impl !RefUnwindSafe for VmSnapshot
impl !UnwindSafe for VmSnapshot
impl Forget for VmSnapshot
impl Freeze for VmSnapshotwhere
*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) + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(AuditEvent) + Sync + Send>>: Freeze,
*const ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send>>: Freeze,
impl Move for VmSnapshot
impl Send for VmSnapshotwhere
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) + Sync + Send>: Send,
Arc<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send>: Send,
impl Sync for VmSnapshotwhere
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) + Sync + Send>: Sync,
Arc<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send>: Sync,
impl Unpin for VmSnapshotwhere
*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) + Sync + Send>: Unpin,
Arc<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send>: Unpin,
impl UnsafeUnpin for VmSnapshotwhere
*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) + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(AuditEvent) + Sync + Send>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Sync + Send>>: 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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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