diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-04-23 17:47:00 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-04-23 17:47:07 +0200 |
commit | 77e4dab8f06cfed775c73624a33f91b34f8595d6 (patch) | |
tree | f94976fe9d44720e025fc774e0df4f444541767e /iutil.py | |
parent | 8b01b7eef835e629f449a443ef50baf9044519ac (diff) | |
download | anaconda-77e4dab8f06cfed775c73624a33f91b34f8595d6.tar.gz anaconda-77e4dab8f06cfed775c73624a33f91b34f8595d6.tar.xz anaconda-77e4dab8f06cfed775c73624a33f91b34f8595d6.zip |
Avoid putting virtualization option when in Xen or VMware. (#443373)
Diffstat (limited to 'iutil.py')
-rw-r--r-- | iutil.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -527,3 +527,20 @@ def writeRpmPlatform(root="/"): f.write("%_prefer_color 1\n") f.close() + +## Check to see if we are in a xen environment. +# +def inXen(): + if os.path.exists("/proc/xen"): + return True + return False + +## Check to see if we are in a vmware environment. +# +def inVmware(): + lspci = ["/usr/sbin/lspci", "-vvv"] # only the very verbose show the VMware stuff :) + proc = subprocess.Popen(lspci, stdout = subprocess.PIPE) + (out, err) = proc.communicate() + if "VMware" in out: + return True + return False |