Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.



share|improve this question
Post the output of $ uname -a. – EEAA Dec 31 '10 at 18:35
Linux 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 '11 at 7:10
up vote 5 down vote accepted

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.

share|improve this answer
If he's got a VPS through a host, I'd certainly hope it wasn't a dom0. :) – jgoldschrafe Dec 31 '10 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 '11 at 7:13
dom0 is the privileged instance... basically the host machine... domU is the unprivileged virtual machine. – Jeremy Bouse Jan 1 '11 at 8:00
How about checking vmware and others? – Rafael Oct 4 '12 at 21:55
@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. – Jeremy Bouse Oct 5 '12 at 2:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.