From 9abb12fd71af4f75b5520361b9a1287fbbd430ab Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 25 Sep 2023 16:30:30 -0700 Subject: [PATCH] vmm: Return the right error from Vcpu::snapshot() Signed-off-by: Bo Chen --- vmm/src/cpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index 28825dd3e..9e3039f83 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -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());