diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-01-20 14:42:19 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-01-20 14:58:14 +0000 |
commit | 36529e78a60a1c4097e7fe8fa4f3971f8581d864 (patch) | |
tree | 0b35a97cf736e5fc8e0343ac454ef4a61063a9d4 /virt-what.in | |
parent | 37f7b6e5f79d61ec4f8967f3de2ec63420aec894 (diff) | |
download | virt-what-36529e78a60a1c4097e7fe8fa4f3971f8581d864.tar.gz virt-what-36529e78a60a1c4097e7fe8fa4f3971f8581d864.tar.xz virt-what-36529e78a60a1c4097e7fe8fa4f3971f8581d864.zip |
Add additional facts about IBM SystemZ mainframes (thanks Dan HorĂ¡k).
Add /proc/sysinfo from a real z/VM guest.
This file can in theory be used to detect the following three
arrangements:
(1) Linux running in z/VM on an LPAR.
(2) Linux running directly on an LPAR.
(3) Linux running directly on baremetal (very unlikely!)
Only arrangement (1) has been tested.
Diffstat (limited to 'virt-what.in')
-rw-r--r-- | virt-what.in | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/virt-what.in b/virt-what.in index 0979c50..9c2115a 100644 --- a/virt-what.in +++ b/virt-what.in @@ -143,10 +143,19 @@ if echo "$dmi" | grep -q 'Manufacturer.*HITACHI' && echo virtage fi -# Check for IBM SystemZ (z/VM, not tested whether this applies to Linux -# installed directly into an LPAR, we may need a separate test). +# Check for IBM SystemZ. if grep -q '^vendor_id.*IBM/S390' $root/proc/cpuinfo; then - echo zvm + echo ibm_systemz + if [ -f $root/proc/sysinfo ]; then + if grep -q 'VM.*Control Program.*z/VM' $root/proc/sysinfo; then + echo ibm_systemz-zvm + elif grep -q '^LPAR' $root/proc/sysinfo; then + echo ibm_systemz-lpar + else + # This is unlikely to be correct. + echo ibm_systemz-direct + fi + fi fi # Check for Xen. |