diff --git a/lxc_net/container.py b/lxc_net/container.py index f08a586..12a9aa2 100644 --- a/lxc_net/container.py +++ b/lxc_net/container.py @@ -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()