Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know the command to figure out if a CPU can support VMware Workstation 8 or VMware Player 4:

$ grep flags /proc/cpuinfo
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp *lm* constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl *vmx* est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid

and then look for the vmx and lm flags

But, it seems that even if Intel Virtual Technology extensions (i.e., VT or VT-x) are disabled in the BIOS, the /proc/cpuinfo will report the same flags.

So, how can I figure out from the Linux command line (specifically Ubuntu 10.10 in my case) if VT is actually enabled without reboxing the box?

share|improve this question

migrated from Feb 13 '12 at 22:04

This question came from our site for system and network administrators.

Building on Jo-Erlend Schinstad's answer:

Install cpu-checker

$ sudo apt-get update
$ sudo apt-get install cpu-checker

Then check:

$ sudo kvm-ok

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

INFO: /dev/kvm exists
KVM acceleration can be used

Otherwise, you might see something like:

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
share|improve this answer

Perhaps kvm-ok can do the trick for you. It will check your cpuflags, then see if you have a kvm device, and finally it will check if virtualization is disabled in the bios.

Of course, this means it'll fail if you don't have kvm installed. If you use kvm, you probably won't be able to use VMWare stuff at the same time, and vice versa. However, kvm will only be used when you actually run a VM.

share|improve this answer
It would be interesting to know what kvm-ok checks, or VMware Player checks, to determine the BIOS settings. Then, one could just check that directly. – pcapademic Feb 13 '12 at 22:57
The manual page says «If running as root, it will check your CPU's MSRs to see if VT is disabled in the BIOS.» I have no idea what that means though :) – Jo-Erlend Schinstad Feb 14 '12 at 0:34
Sounds good, also the guy bellow confirms it. – Bruno Pereira Feb 20 '12 at 20:06

It seems one can check directly with the msr-tools

$ sudo apt-get update
$ sudo apt-get install msr-tools
$ sudo modprobe msr
$ sudo rdmsr 0x3A

The register should return 5 if the extensions are enabled, and return 1 if disabled.

share|improve this answer
Does it know how to distinguish lack of cpu support from not being enabled in the bios? – nealmcb Feb 6 '15 at 17:22
Thanks - this worked for me on debian to confirm I wasn't going crazy when vmx didn't show up in /proc/cpuinfo but still let me boot VMs :) these instructions in German are the clearest I've found that indicated that the return value of 7 that I got is alright too:… – Dmitri DB Jun 3 at 0:16

protected by Community Sep 3 '15 at 3:50

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.