Merge pull request #5976 from yaoyinnan/5825/fix/cleanup-hypervisor

runtime-rs: cleanup the run dir of hypervisor when shut down
This commit is contained in:
Bin Liu 2023-01-05 15:14:21 +08:00 committed by GitHub
commit a40fca1f57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;