From b5b97f7b053c838e3963cd981d46f48d3cbff847 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 24 Nov 2020 17:26:02 +0000 Subject: [PATCH] vmm: When receiving a migration store the config The configuration is stored separately to the Vm in the VMM. The failure to store the config was preventing the VM from shutting down correctly as Vmm::vm_delete() checks for the presence of the config. Signed-off-by: Rob Bradford --- vmm/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vmm/src/lib.rs b/vmm/src/lib.rs index 7bf5aa0b4..7f3396828 100644 --- a/vmm/src/lib.rs +++ b/vmm/src/lib.rs @@ -673,8 +673,9 @@ impl Vmm { let reset_evt = self.reset_evt.try_clone().map_err(|e| { MigratableError::MigrateReceive(anyhow!("Error cloning reset EventFd: {}", e)) })?; + self.vm_config = Some(Arc::new(Mutex::new(config))); let vm = Vm::new_from_migration( - Arc::new(Mutex::new(config)), + self.vm_config.clone().unwrap(), exit_evt, reset_evt, &self.seccomp_action, @@ -848,6 +849,7 @@ impl Vmm { Command::Abandon => { info!("Abandon Command Received"); self.vm = None; + self.vm_config = None; Response::ok().write_to(&mut socket).ok(); break; }