diff --git a/system/setup b/system/setup index 13c1bd8ea42..5a9d5310327 100755 --- a/system/setup +++ b/system/setup @@ -1904,6 +1904,13 @@ class LinuxVirtual(Virtual): self.facts['virtualization_role'] = 'guest' return + if os.path.exists('/proc/1/cgroup'): + for line in open('/proc/1/cgroup').readlines(): + if re.search('/lxc/', line): + self.facts['virtualization_type'] = 'lxc' + self.facts['virtualization_role'] = 'guest' + return + product_name = get_file_content('/sys/devices/virtual/dmi/id/product_name') if product_name in ['KVM', 'Bochs']: