vmm: Fix console dev handling in live migration

Console devices are created after vm_config is received and the created
devices are passed Vm during vm_receive_state.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
Praveen K Paladugu 2024-05-28 13:55:42 -05:00 committed by Rob Bradford
parent 11d98fccac
commit c3fcddf830

View File

@ -720,6 +720,9 @@ impl Vmm {
let config = vm_migration_config.vm_config.clone();
self.vm_config = Some(vm_migration_config.vm_config);
self.console_info = Some(pre_create_console_devices(self).map_err(|e| {
MigratableError::MigrateReceive(anyhow!("Error creating console devices: {:?}", e))
})?);
let vm = Vm::create_hypervisor_vm(
&self.hypervisor,
@ -809,7 +812,7 @@ impl Vmm {
self.hypervisor.clone(),
activate_evt,
timestamp,
None,
self.console_info.clone(),
None,
Arc::clone(&self.original_termios_opt),
Some(snapshot),