summaryrefslogtreecommitdiffstats
path: root/virt-what.in
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-01-20 15:38:30 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-01-20 15:39:46 +0000
commit55cf13ae4a00c30b55fe508f544406dce05bdb8d (patch)
tree504e7f1ce8187eb3570713097235a110c62d808d /virt-what.in
parent36529e78a60a1c4097e7fe8fa4f3971f8581d864 (diff)
downloadvirt-what-55cf13ae4a00c30b55fe508f544406dce05bdb8d.tar.gz
virt-what-55cf13ae4a00c30b55fe508f544406dce05bdb8d.tar.xz
virt-what-55cf13ae4a00c30b55fe508f544406dce05bdb8d.zip
Add support for Linux kernels with pv_ops running on Xen.
These would be found for example on Amazon EC2 or Citrix Xen. This also adds all the extra files found under /sys/hypervisor on this platform.
Diffstat (limited to 'virt-what.in')
-rw-r--r--virt-what.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/virt-what.in b/virt-what.in
index 9c2115a..627f961 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -171,11 +171,12 @@ elif [ -f $root/proc/xen/capabilities ]; then
echo xen-domU
fi
is_xen=1
-elif [ -d $root/proc/xen ]; then
- # This directory can be present when Xen paravirt drivers are
- # installed, even on baremetal. Don't confuse people by
- # printing anything.
- :
+elif [ -f $root/sys/hypervisor/type ] &&
+ grep -q "xen" $root/sys/hypervisor/type; then
+ # Ordinary kernel with pv_ops. There does not seem to be
+ # enough information at present to tell whether this is dom0
+ # or domU. XXX
+ echo xen
fi
# Check for QEMU/KVM.