Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I'm working with a Xen host which is installed XenServer from Citrix by someone. He already installed a lot of CentOS 5.2 guests on the host. I wonder how to check those guests to know they are PV types or HVM types?

share|improve this question
up vote 6 down vote accepted

A quick note, there are actually 3 modes, not two when it comes to the drivers in use:

  • HVM: unmodified kernel and drivers using software emulated devices
  • PV-HVM: unmodified kernel with paravirtualized (Xen specific) disk and network drivers
  • PV: modified kernel and drivers

For a Xen guest/DomU you can do a very basic uname and lsmod with a grep to list the modules in use:

uname -a
lsmod | grep xen

If uname -a lists a kernel with the string "xen" in it, then you have a modified kernel and it's likely a PV guest, and you will see output from the lsmod command to confirm it. If you have output from the grep on lsmod but no sign of a modified kernel then you are PV-HVM. Without any sign of either, it's a straight HVM.

Note: Generally you can do more with VMs that have the PV tools installed, so that can be quite an obvious pointer, however you can fake the presence of the PV tools to allow suspend/resume etc. so you cannot rely on that in general.

share|improve this answer
Thanks @Adam. It's the clearest answer that I have found so far. – Ha Son Hai May 30 '13 at 15:29

There is a better alternative to analyzing uname -a output from inside the guest domain. You should rather check the VM profile in the hypervisor itself.

With an older standalone Xen installation, this could be achieved with xm list -l command:

# xm list
Name                 ID   Mem VCPUs    State   Time(s)
My-Virtual-Machine   13   259     1   -b----       8.0

# xm list --long My-Virtual-Machine
    (domid 13)
    (name My-Virtual-Machine)
            (kernel ...)

Note the (linux) item in the (image) section — it corresponds to the builder configuration directive, where "linux" means "paravirtual" (rather than the actual system family), while "hvm" stands for "full virtualization".

With the new XenLight toolstack (xl list -l), things are similar:


Note the type item in the c_info section — if it equals"pv", this means paravirtual.

With XenServer or XCP, you could use xe vm-list params=all command or something alike.

As for the virtualization modes, there is even more to come: Xen 4.3 introduced the new hybrid mode called PVH, which runs a fully PV system inside an HVM container without any hardware emulation. It's a special mode for 64-bit guests, the reason for this is that AMD64 architecture lacks some management features of i386 that Xen uses, which results in performance loss. It's not clear how PHV domains will be configured and how they will look in configuration dumps; my guess is that they may appear either as plain HVM domains (just like classic PV-on-HVM guests) or as a mixture HVM domain with some PV-specific directives.

share|improve this answer
This does not works on 4.4.1 because there is no xm command but xl which has different output. Any idea how to get the info on 4.4.1 XEN. Thanks. – Wakan Tanka Apr 23 '15 at 18:53
@WakanTanka I don't currently have access to a working Xen server, but according to the sample output found online the approach is basically the same. See the updated answer. – Anton Samsonov Apr 24 '15 at 16:51
This is a far better approach then @AdamC's answer, because I have several PV ubuntu guests that are definitely PV according to xl, and yet have no mention of xen in the kernel name or kernel modules. – Fake Name Mar 28 at 4:09

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.