Click or drag to resize
VirtualMachineValidationValidate Method
Determines if the system is running on a virtual machine.

Namespace: com.softwarekey.Client.Licensing
Assembly: PLUSManaged (in PLUSManaged.dll) Version:
public override bool Validate()

Return Value

Type: Boolean
Returns true if the application is not running in a virtual machine guest environment. If a virtual machine guest environment was detected (or false is returned), check the Type property to find which hypervisor was detected.
Caution note Caution

This method runs WMI queries on Windows guests, which can take a while to run on some computers. If you run this (Validate) method once, and retain the reference to the VirtualMachineValidation object, you may then use the IsVirtual and Type properties as needed to avoid making further, unnecessary WMI queries.

Failure to detect a virtual machine guest environment does not guarantee that the application is not running in one. This function simply makes an effort to detect the most common hypervisors while avoiding the possibility of running into false-positives. The guest environments this can detect include:

  • Linux guests: HyperV, Parallels, VirtualBox, VMware, XenServer, KVM.
  • macOS guests: VirtualBox, VMware.
  • Windows guests: HyperV, Parallels, VirtualBox, VirtualPC, VMware, XenServer, KVM.
See Also