Programmatically determine if VT-x or AMD-v is enabled on Windows

On OSX or Linux, it’s pretty trivial to look at the CPU capabilities in the terminal. Is there a way to access information about the processor, in particular, the capabilities of hardware support for virtualization, in Windows?

I found the Microsoft tool: http://www.microsoft.com/en-us/download/details.aspx?id=592

but would like something that does not require additional binaries.

+4
source share
1 answer

I find it best to check if virtualization is allowed using WMI and checking the Win32_Processor class. The value of the "VirtualizationFirmwareEnabled" field should provide you, if enabled.

, BIOS, .

Win32_Processor: http://msdn.microsoft.com/en-us/library/aa394373%28v=vs.85%29.aspx

, , , __cpuid() 0x1 0x80000001 . .

CPUID Wiki: http://en.wikipedia.org/wiki/CPUID

__ cpuid : msdn.microsoft.com/en-us/library/hskdteyh (VS.80).aspx

+2

Source: https://habr.com/ru/post/1525114/


All Articles