Container: delete overlay tempdir upon cleanup

This commit is contained in:
Théophile Bastian 2020-03-19 23:31:09 +01:00
parent ceee1908a4
commit 4e39260232
1 changed files with 4 additions and 0 deletions

View File

@ -210,6 +210,10 @@ class Container(util.LibvirtObject):
raise exn
# Else, the machine was already stopped: everything is fine
self.lxc_container = None
if self.overlay_root:
self.overlay_root.cleanup_mount()
self.overlay_root.overlay_temp_dir.cleanup()
self.overlay_root = None
def __enter__(self):
self.create()