mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
vmm: Always re-generate the 'console_info' with VM restore
With VM restore, the VMM is always re-creating a VM based on the restored `VmConfig`. We should always re-generate the 'console_info' from the `Vmm` struct to stay consistent with the new VM being created. Signed-off-by: Bo Chen <bo.arvin.chen@gmail.com>
This commit is contained in:
parent
0cb2c86ff4
commit
07821c08c0
@ -1558,11 +1558,9 @@ impl RequestHandler for Vmm {
|
||||
|
||||
self.vm_config = Some(Arc::clone(&vm_config));
|
||||
|
||||
// console_info is set to None in vm_snapshot. re-populate here if empty
|
||||
if self.console_info.is_none() {
|
||||
self.console_info =
|
||||
Some(pre_create_console_devices(self).map_err(VmError::CreateConsoleDevices)?);
|
||||
}
|
||||
// Always re-populate the 'console_info' based on the new 'vm_config'
|
||||
self.console_info =
|
||||
Some(pre_create_console_devices(self).map_err(VmError::CreateConsoleDevices)?);
|
||||
|
||||
let exit_evt = self.exit_evt.try_clone().map_err(VmError::EventFdClone)?;
|
||||
let reset_evt = self.reset_evt.try_clone().map_err(VmError::EventFdClone)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user