Detect Xen / ESX

Hi,

When I boot FreeBSD I can read somewhere right in the beginning something about XENHVM. Now for some scripts I should need to know whether the FreeBSD is running on virtual or physical HW hardware. As well as it would be neat to know on what virtual platform it's running - e.g. Xen or ESX etc.

Thanks.
 
I think this is a better way to extract the same information:

sysctl -n kern.vm_guest
Code:
# sysctl -d kern.vm_guest 
kern.vm_guest: Virtual machine guest detected? (none|generic|xen)
#

This is on FreeBSD 10, I'm not sure if the same sysctl(8) is available on FreeBSD 9.
 
Back
Top