vmm: Update the configuration to preserve hot-plug CPUs after reboot

Update the configuration after a resize to ensure that after a reboot
the added vCPUs are preserved.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2019-12-04 13:58:10 +00:00
parent 1722708612
commit f98b16f308

View File

@ -676,6 +676,7 @@ impl Vm {
self.devices
.notify_hotplug(HotPlugNotificationType::CPUDevicesChanged)
.map_err(Error::DeviceManager)?;
self.config.lock().unwrap().cpus.boot_vcpus = desired_vcpus;
Ok(())
}