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

Method restore

vmm/src/vm.rs:2990–3009  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

2988 }
2989
2990 pub fn restore(&mut self) -> Result<()> {
2991 event!("vm", "restoring");
2992
2993 // We acquire all advisory disk image locks again.
2994 self.device_manager
2995 .lock()
2996 .unwrap()
2997 .try_lock_disks()
2998 .map_err(Error::LockingError)?;
2999
3000 // Now we can start all vCPUs from here.
3001 self.cpu_manager
3002 .lock()
3003 .unwrap()
3004 .start_restored_vcpus()
3005 .map_err(Error::CpuManager)?;
3006
3007 event!("vm", "restored");
3008 Ok(())
3009 }
3010
3011 /// Gets a thread-safe reference counted pointer to the VM configuration.
3012 pub fn get_config(&self) -> Arc<Mutex<VmConfig>> {

Callers 2

vm_receive_stateMethod · 0.80
vm_restoreMethod · 0.80

Calls 2

try_lock_disksMethod · 0.80
start_restored_vcpusMethod · 0.80

Tested by

no test coverage detected