From e256903af25f2383f2b7fb2db21744d4f7ffcbdb Mon Sep 17 00:00:00 2001 From: yaoyinnan Date: Wed, 4 Jan 2023 22:36:39 +0800 Subject: [PATCH] runtime-rs: cleanup the run dir of hypervisor when shut down Cleanup the run dir of hypervisor when shut down. Fixes: #5825 Signed-off-by: yaoyinnan --- .../crates/runtimes/virt_container/src/sandbox.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs index 478bf391cf..469d5ea425 100644 --- a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs +++ b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs @@ -248,6 +248,12 @@ impl Sandbox for VirtSandbox { .await .context("delete cgroups")?; + info!(sl!(), "delete hypervisor"); + self.hypervisor + .cleanup() + .await + .context("delete hypervisor")?; + info!(sl!(), "stop monitor"); self.monitor.stop().await;