From 8308e1bf25c505640c2b1c914deec06e83636cbb Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 30 Aug 2019 18:33:36 +0100 Subject: [PATCH] vmm, tests: Disable reboot support Being able to reboot requires us to identify all the resources we are leaking and cleaning those up before we can enable reboot. For now if the user requests a reboot then shutdown instead. Signed-off-by: Rob Bradford --- src/main.rs | 2 ++ vmm/src/lib.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 58200bc60..0a25d2374 100755 --- a/src/main.rs +++ b/src/main.rs @@ -2017,6 +2017,7 @@ mod tests { } #[test] + #[ignore] fn test_reboot() { test_block!(tb, "", { let mut clear = ClearDiskConfig::new(); @@ -2085,6 +2086,7 @@ mod tests { } #[test] + #[ignore] fn test_bzimage_reboot() { test_block!(tb, "", { let mut clear = ClearDiskConfig::new(); diff --git a/vmm/src/lib.rs b/vmm/src/lib.rs index a2706ad68..78077e30a 100644 --- a/vmm/src/lib.rs +++ b/vmm/src/lib.rs @@ -55,6 +55,7 @@ impl Vmm { } pub fn boot_kernel(config: VmConfig) -> Result<()> { + #[allow(clippy::never_loop)] loop { let vmm = Vmm::new()?; let mut vm = Vm::new(&vmm.kvm, &config).map_err(Error::VmNew)?; @@ -63,6 +64,8 @@ pub fn boot_kernel(config: VmConfig) -> Result<()> { if vm.start(entry).map_err(Error::VmStart)? == ExitBehaviour::Shutdown { break; } + error!("Shutting down rather than rebooting due to known resource leaks: https://github.com/intel/cloud-hypervisor/issues/223"); + break; } Ok(())