From 3901a1dd7d23deddf2d90c3d893e0b975bbeb6e0 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 17 Jan 2020 17:22:09 +0000 Subject: [PATCH] vmm: Log an error if VM resize fails As well as returing an error to the API caller. Signed-off-by: Rob Bradford --- vmm/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vmm/src/lib.rs b/vmm/src/lib.rs index 783ff175b..46c115b38 100644 --- a/vmm/src/lib.rs +++ b/vmm/src/lib.rs @@ -337,7 +337,12 @@ impl Vmm { desired_ram: Option, ) -> result::Result<(), VmError> { if let Some(ref mut vm) = self.vm { - vm.resize(desired_vcpus, desired_ram) + if let Err(e) = vm.resize(desired_vcpus, desired_ram) { + error!("Error when resizing VM: {:?}", e); + Err(e) + } else { + Ok(()) + } } else { Err(VmError::VmNotRunning) }