diff --git a/lib/hypervisor/hv_lxc.py b/lib/hypervisor/hv_lxc.py index f080640cc7b369a5685c4643500c97f2eccb0c94..b7054f555bc04d14ec7ce928053dfb2305de9037 100644 --- a/lib/hypervisor/hv_lxc.py +++ b/lib/hypervisor/hv_lxc.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2010 Google Inc. +# Copyright (C) 2010, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -425,10 +425,18 @@ class LXCHypervisor(hv_base.BaseHypervisor): @return: Problem description if something is wrong, C{None} otherwise """ - if os.path.exists(self._ROOT_DIR): - return None - else: - return "The required directory '%s' does not exist" % self._ROOT_DIR + msgs = [] + + if not os.path.exists(self._ROOT_DIR): + msgs.append("The required directory '%s' does not exist" % + self._ROOT_DIR) + + try: + self._GetCgroupMountPoint() + except errors.HypervisorError, err: + msgs.append(str(err)) + + return self._FormatVerifyResults(msgs) @classmethod def PowercycleNode(cls):