The information on this page refers to LM-X v5.3.3 or newer, which introduced the LMX_GetHostType API function. |
The LMX_GetHostType function lets you check 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
Remarks
Virtualization detection is officially supported for VMware, Microsoft Hyper-V, VirtualBox, KVM and QEMU. 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); }