Open dogi opened 8 years ago
Since having Intel VT and AMD-V enabled we should maybe write testing scripts for each OS:
... not only add it to the README.md
Links for checking whether hardware support virtualization: For Linux: https://help.ubuntu.com/community/KVM/Installation For Mac: docker/toolbox#166 http://kb.parallels.com/en/5653 For Windows: https://technet.microsoft.com/en-us/sysinternals/cc835722.aspx
Also for Windows (Does not work for Windows 10): https://www.microsoft.com/en-us/download/details.aspx?id=592
As for Windows 8-8.1-10, you can check from task manager.
This link shows how you can detect if VM is enabled http://stackoverflow.com/questions/21537769/programatically-detect-if-vt-x-or-amd-v-is-enabled-on-windows
Coreinfo only shows whether the processor supports virtualization, and it does not show if virtualization is enabled or not.
I cannot find a way to check if vt-x is on/off in mac. It seems that vt-x is always on. If vt-x is off then it needs some firmware update, as indicated here. However checking if vm is hardware supported is possible. Not sure if it is necessary.
@xinglunxu as in http://kb.parallels.com/en/5653 described sysctl -a | grep machdep.cpu.features
and if you combine that with the linux solution of https://help.ubuntu.com/community/KVM/Installation you can create something boolean ;)
@dogi Thanks for the detail solution! But this can only verify if vt-x is supported but not if vt-x is enabled, right?
And this the script I can come up with to check if vt-x is hardware supported:
sysctl -a | grep machdep.cpu.features | egrep -c 'VMX'
It output 1 if true otherwise 0.
think on macosx we don't need to worry about this too much ;)
if the software is new enough it is always enabled look at https://support.apple.com/en-us/HT203296
I have created a simple program for Windows to check if virtualization is enabled or not. It has been tested on Windows 8.1 and Windows 10. The following screenshots show the output of the program on Windows 8.1 (Disabled) and 10 (Enabled and Disabled)
Will try to improve the program so that is checks if virtualization support exist in a pc before it checks for whether it is enabled or not.
Here is the source code for the first version of vircheck.exe.
@dogi I think I got what you asked for. This link shows how to check for virutalization using PowerShell.
@dogi I was able to reproduce the results of the this link.
Enabling Intel VT and AMD-V virtualization hardware extensions in BIOS
http://www.howtogeek.com/213795/how-to-enable-intel-vt-x-in-your-computers-bios-or-uefi-firmware/