vmm: Return the right error from Vcpu::snapshot()

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2023-09-25 16:30:30 -07:00 committed by Rob Bradford
parent db785e6969
commit 9abb12fd71

View File

@ -427,7 +427,7 @@ impl Snapshottable for Vcpu {
let saved_state = self
.vcpu
.state()
.map_err(|e| MigratableError::Pause(anyhow!("Could not get vCPU state {:?}", e)))?;
.map_err(|e| MigratableError::Snapshot(anyhow!("Could not get vCPU state {:?}", e)))?;
self.saved_state = Some(saved_state.clone());