Check /proc/vz/veinfo presence to distinguish between a real openvz virtual environment and a cloudlinux kernel

This commit is contained in:
Massimiliano Torromeo 2014-03-13 11:37:51 +01:00
parent 7b0338279b
commit 9b9144d966

View File

@ -517,7 +517,7 @@ def _virtual(osdata):
if isdir('/proc/vz'):
if os.path.isfile('/proc/vz/version'):
grains['virtual'] = 'openvzhn'
else:
elif os.path.isfile('/proc/vz/veinfo'):
grains['virtual'] = 'openvzve'
elif isdir('/proc/sys/xen') or isdir('/sys/bus/xen') or isdir('/proc/xen'):
if os.path.isfile('/proc/xen/xsd_kva'):