vmm, vm-virtio: Restore DeviceManager's devices in a paused state

The same way the VM and the vCPUs are restored in a paused state, all
devices associated with the device manager must be restored in the same
paused state.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-06-22 16:00:02 +02:00
committed by Samuel Ortiz
parent 8a165b5314
commit e382dc6657
11 changed files with 82 additions and 0 deletions
+1
View File
@@ -3477,6 +3477,7 @@ impl Snapshottable for DeviceManager {
if let Some(migratable) = &node.migratable {
debug!("Restoring {} from DeviceManager", node.id);
if let Some(snapshot) = snapshot.snapshots.get(&node.id) {
migratable.lock().unwrap().pause()?;
migratable.lock().unwrap().restore(*snapshot.clone())?;
} else {
return Err(MigratableError::Restore(anyhow!(