The information on this page refers to LM-X 5.4 or newer, which introduced support for Xen and support for a CLOUD host type.  If you are running a previous version of License Statistics, please see documentation for previous versions.

The LMX_GetHostType function lets you check the type of the host machine.

Prototype

LMX_HOST_TYPE LMX_GetHostType(void);

Return values

This function returns one of the following types:

LMX_UNKNOWN_TYPE
LMX_HOST_PHYSICAL
LMX_HOST_VIRTUAL
LMX_HOST_CLOUD


Remarks

Virtualization detection is officially supported for VMware, Microsoft Hyper-V, VirtualBox, KVM, QEMU, and Xen. See Licensing for virtual machines and cloud computing for more information.


Example

if (LMX_GetHostType() == LMX_HOST_VIRTUAL)
{
  printf("This software is not allowed to run in virtual environment!\n");
  exit(1);
}