check if VT-x is activated without having to reboot in Linux? check if VT-x is activated without having to reboot in Linux? linux linux

check if VT-x is activated without having to reboot in Linux?


You can use rdmsr from msr-tools to read register IA32_FEATURE_CONTROL (address 0x3a). The kernel module msr has to be loaded for this.

On most Linux systems:

sudo modprobe msrsudo rdmsr 0x3a

Values 3 and 5 mean it's activated.


You can use

sudo kvm-ok

from cpu-checker. On Intel, which has the most complicated logic, kvm-ok checks that if bit 0 of rdmsr 0x3a (the lock bit) is set, bit 2 (which allows virt use outside of SMX mode, something to do with trusted boot) must also be set. If the output of rdmsr 0x3a is anything but 1 or 3, you will be able to use kvm. kvm will set bit 2 of the msr if necessary, I expect virtualbox and the rest have the same logic.


Install cpu-checker and run "kvm-ok"

If the CPU is enabled, you should see something like:

INFO: /dev/kvm existsKVM acceleration can be used

othewise

INFO: /dev/kvm does not existHINT:   sudo modprobe kvm_intelINFO: Your CPU supports KVM extensionsINFO: KVM (vmx) is disabled by your BIOSHINT: Enter your BIOS setup and enable Virtualization Technology (VT),   and then hard poweroff/poweron your systemKVM acceleration can NOT be used