Add test for z/VM on IBM SystemZ mainframes (thanks Dan Horák).
[virt-what.git] / virt-what.in
index e311067..0979c50 100644 (file)
@@ -121,6 +121,11 @@ if [ -d $root/proc/vz -a ! -d $root/proc/bc ]; then
     echo openvz
 fi
 
+# Check for Linux-VServer
+if cat $root/proc/self/status | grep -q "VxID: [0-9]*"; then
+    echo linux_vserver
+fi
+
 # Check for UML.
 # Added by Laurent Léonard.
 if grep -q 'UML' $root/proc/cpuinfo; then
@@ -138,6 +143,12 @@ 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).
+if grep -q '^vendor_id.*IBM/S390' $root/proc/cpuinfo; then
+    echo zvm
+fi
+
 # Check for Xen.
 
 if [ "$cpuid" = "XenVMMXenVMM" ]; then