Determine which guest is running on XEN: HVM or PV guest

来源:互联网 发布:testlink java api 编辑:程序博客网 时间:2024/06/05 23:00

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.

0 0