vmm: add events for VM reboot

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Wei Liu 2024-03-06 01:38:29 +00:00 committed by Bo Chen
parent b15e5923ab
commit 55678b23ba

View File

@ -1384,6 +1384,8 @@ impl RequestHandler for Vmm {
}
fn vm_reboot(&mut self) -> result::Result<(), VmError> {
event!("vm", "rebooting");
// First we stop the current VM
let (config, serial_pty, console_pty, debug_console_pty, console_resize_pipe) =
if let Some(mut vm) = self.vm.take() {
@ -1451,6 +1453,8 @@ impl RequestHandler for Vmm {
self.vm = Some(vm);
event!("vm", "rebooted");
Ok(())
}