2

How do I check whether my VPS is OpenVZ or XEN? (I ordered a while back and don't remember exactly which plan I ordered!).

OS: Linux running ubuntu.

thanks

JP

2
  • 2
    Post the output of $ uname -a.
    – EEAA
    Dec 31, 2010 at 18:35
  • Linux ......com 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 13:35:30 EST 2010 x86_64 GNU/Linux. So looks like it is xen.
    – JP19
    Jan 1, 2011 at 7:10

1 Answer 1

6

If you follow the examples of detection used by Puppet and Facter you can check the /proc filesystem for hints.

The existence of /proc/vz/veinfo would indicate you're running OpenVZ but the existence of /proc/vz/version will tell you whether it's openvzhn or openvzve.

Next you can look for either /proc/sys/xen, /sys/bus/xen or /proc/xen to see if you're running Xen but look for /proc/xen/capabilities to tell if it's a dom0 or domU.

6
  • If he's got a VPS through a host, I'd certainly hope it wasn't a dom0. :) Dec 31, 2010 at 22:30
  • /proc/sys/xen is present, but /proc/vz/veinfo is not, so its Xen. /proc/xen/capabilities is empty. Could you please tell what is dom0/domU and why is dom0 not good? :)
    – JP19
    Jan 1, 2011 at 7:13
  • dom0 is the privileged instance... basically the host machine... domU is the unprivileged virtual machine. Jan 1, 2011 at 8:00
  • How about checking vmware and others?
    – Rafael
    Oct 4, 2012 at 21:55
  • 1
    @Rafael Check into the logic of the Facter virtual fact as it is able to determine the differences. I have an ESXi server and the VMs running Puppet are able to determine that they are vmware based. Oct 5, 2012 at 2:24

You must log in to answer this question.