pub struct WarmPoolHandle {
pub source_vm_id: String,
pub stack: StackKey,
pub source_snapshot: SnapshotRef,
}Expand description
A pre-restored VM checked out of the pool, ready for the caller to bring up under a new tenant identity.
The caller takes the SnapshotRef out of the handle, attaches their
per-tenant network_overrides, and feeds it to
provider.create_vm_with_spec(new_vm_id, &VmSpec { restore_from: Some(...), ..VmSpec::default() }).
Firecracker 1.10+ honors the override on restore — the heavy kernel/init
path is already done, so the new tenant only pays the restore cost.
source_vm_id is informational: it identifies the pool entry that was
drained for this acquire. The pool has already removed it from its tracking
map by the time the handle is returned, so the caller doesn’t have to
worry about double-handoff.
Fields§
§source_vm_id: StringVM ID the pool was tracking before this acquire. Pool no longer holds any reference to it; the caller owns it.
stack: StackKeyBucket key this entry was drained from.
source_snapshot: SnapshotRefSnapshot that was registered for this bucket. Pass to
VmProvider::create_vm_with_spec after setting
SnapshotRef::network_overrides for the new tenant.
Trait Implementations§
Source§impl Clone for WarmPoolHandle
impl Clone for WarmPoolHandle
Source§fn clone(&self) -> WarmPoolHandle
fn clone(&self) -> WarmPoolHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more