MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / get_vm_snapshot

Function get_vm_snapshot

vmm/src/migration.rs:81–89  ·  view source on GitHub ↗
(snapshot: &Snapshot)

Source from the content-addressed store, hash-verified

79}
80
81pub fn get_vm_snapshot(snapshot: &Snapshot) -> std::result::Result<VmSnapshot, MigratableError> {
82 if let Some(snapshot_data) = snapshot.snapshot_data.as_ref() {
83 return snapshot_data.to_state();
84 }
85
86 Err(MigratableError::Restore(anyhow!(
87 "Could not find VM config snapshot section"
88 )))
89}

Callers 2

vm_restoreMethod · 0.85

Calls 1

to_stateMethod · 0.80

Tested by

no test coverage detected