Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Detect if your container is running under a hypervisor
C Makefile
Branch: master

Merge pull request #12 from awilfox/master

Make VMware detection inline-asm portable
latest commit e98601e9ba
@kaniini authored
Failed to load latest commit information.
.gitignore
LICENSE
Makefile Use cc instead of gcc for compiling.
README.md
cpuid-detect.c vmware-detect: new module which begins knocking on vmware's i/o ports…
openvz-detect.c
slabbed-or-not.c vmware-detect: new module which begins knocking on vmware's i/o ports…
vmware-detect.c
xen-detect.c xen-detect: reset xen_pv_context to 0 after a SIGILL is caught

README.md

slabbed-or-not

Detect if your container/VPS is running under a specific hypervisor.

Why would you want this?

Some hosting providers run their container hosting services (OpenVZ, LXC VPS, Docker-as-a-Service, etc) under a parent hypervisor, without disclosing that practice. Worse yet, a few providers have been caught doing this while explicitly claiming not to.

There are also of course, providers which do rightfully disclose their usage of a parent hypervisor for their services, usually as part of a high availability scheme.

In essence, the point of this tool is simply to disclose whether or not your container is running under a hypervisor, and what information can be collected about the hypervisor from inside the container.

It also detects common container types (i.e. OpenVZ), to clarify to the user whether or not their VPS environment is inside a container, whether it's in a hypervisor, or whether both aspects apply (container inside hypervisor).

usage

Just download the source and go, basically. You'll need a compiler installed, of course.

kaniini@localhost ~/slabbed-or-not> make
cc -o slabbed-or-not slabbed-or-not.c
kaniini@localhost ~/slabbed-or-not> ./slabbed-or-not
Container: OpenVZ
Hypervisor: Xen PV
Version: 4.3

what it can detect

  • Xen
    • PV or HVM mode
    • Hypervisor version
  • VMware
    • Hypervisor type (Workstation, GSX/ESX)
    • Enumeratable virtual devices
    • VMware Tools backdoor protocol version (usually 6)
    • Virtualized hardware model version
  • Hyper-V
  • KVM
  • bhyve
Something went wrong with that request. Please try again.