mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
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 <robert.bradford@intel.com>
This commit is contained in:
parent
9fc2613b41
commit
b5b97f7b05
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user