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 <yaoyinnan@foxmail.com>
This commit is contained in:
yaoyinnan 2023-01-04 22:36:39 +08:00
parent 38a6bc570d
commit e256903af2

View File

@ -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;