diff --git a/lib/hypervisor/hv_chroot.py b/lib/hypervisor/hv_chroot.py index 36b37a8eb1261f9e13c2133dc653d147cad7f7f4..c495c9e4dbb30dacd181b9ad7832338cadaf461b 100644 --- a/lib/hypervisor/hv_chroot.py +++ b/lib/hypervisor/hv_chroot.py @@ -212,6 +212,13 @@ class ChrootManager(hv_base.BaseHypervisor): raise HypervisorError("Can't stop the processes using the chroot") return + def CleanupInstance(self, instance_name): + """Cleanup after a stopped instance + + """ + if self._IsDirLive(root_dir): + raise HypervisorError("Processes are still using the chroot") + for mpath in self._GetMountSubdirs(root_dir): utils.RunCmd(["umount", mpath])