How to detect if VT-X has been turned on in the BIOS?
Solution 1:
VT-X information is stored in model-specific registers (MSR) 0x34 which can be accessed via msr-tools
. Install it by running sudo apt-get install msr-tools
then run the following commands
sudo modprobe msr
sudo rdmsr 0x3A
If the return value is 3, 5 or 7 then VT-X is enabled
See Reliably detecting if Intel VT is disabled in the BIOS
Solution 2:
There are two ways to verify:
-
On Debian-based distros (such as Ubuntu), you can check support for VT-x by installing
cpu-checker
and runkvm-ok
with sudo rights.If the CPU is enabled, you should see something like:
INFO: /dev/kvm exists KVM acceleration can be used
Otherwise, you'll get:
INFO: /dev/kvm does not exist HINT: sudo modprobe kvm_intel INFO: Your CPU supports KVM extensions INFO: KVM (vmx) is disabled by your BIOS HINT: Enter your BIOS setup and enable Virtualization Technology (VT), and then hard poweroff/poweron your system KVM acceleration can NOT be used
-
On Debian-based and RHEL-based systems, you can use
virt-host-validate
which is provided by thelibvirt-client
package. Documentation on usage can be found here.