Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to tell if I am on a XEN or KVM linux server? Reason I asked is nothing is on top yet I am seeing load averages high well after I do tasks and I am getting hangs/spikes when I do simple tasks

share|improve this question

3 Answers 3

up vote 0 down vote accepted

If you have sudo privileges you can run the following command to get information about the "hardware" that CentOS is running on:

sudo lshw

For example, the first few lines of output on one of my computers is:

description: Desktop Computer
product: Virtual Machine
vendor: Microsoft Corporation

A virtual machine from Microsoft? I'm running on Hyper-V.

share|improve this answer
I don't have anything like that so this looks like a dedicated server. – Rachel Nark May 18 '12 at 14:42
I don't know what kind of output one would get with KVM or XEN. There is always the possibility that they spoof actual hardware. Other than asking the system administrator, there may not be a way to definitively determine whether it is a virtual machine. – William Jackson May 18 '12 at 16:28

lshw is not always available on *nix servers. Yes you can install it, however I like to opt for stuff that I get for free on the box. I found that for the most part dmidecode is usually available. Use this instead:

Fun fact, lshw gets some info from DMI table entries and other sources for the info it provides. But for this purpose, just using dmidecode is sufficient.

dmidecode -t system|grep 'Manufacturer\|Product'

Output on Dell server:

Manufacturer: Dell Inc.
Product Name: PowerEdge C5220

Output on Virtualbox VM:

Manufacturer: innotek GmbH
Product Name: VirtualBox

Output on KVM/QEMU:

Manufacturer: QEMU
Product Name: Standard PC (i440FX + PIIX, 1996)

This is great for scripts that can parse these out for better identification of servers... but if you use Chef in your infrastructure, you can check the node attribute Virtualization -> system in the chef server .

share|improve this answer

There is code that can detect this:

You can also check dmesg and lspci.

Xen PV guest or Xen guests with PV drivers will have something xen-related in dmesg

dmesg | egrep -i 'xen|front

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.