Is there a test to see if hardware virtualization (vmx / svm) are presently enabled within a Linux session?

Posted by Dr. Edward Morbius on Server Fault See other posts from Server Fault or by Dr. Edward Morbius
Published on 2012-06-21T01:16:35Z Indexed on 2012/08/29 21:41 UTC
Read the original article Hit count: 292

Filed under:
|
|

I'm writing procedures for configuring VirtualBox support for 64-bit SMP guests, which requires hardware virtualization suppot (VTx/Intel, AMD-V/AMD). I have successfully configured this myself, however I'd like the procedure to be clear.

sed -ne '/^flags/s/^.*: //p' /proc/cpuinfo  |                               
    egrep -q '(vmx|svm)' && echo Has hardware virt || echo No HW virt

... shows if the CPU is capable.

I've still got to go enable the feature in BIOS.

Any way to test from within Linux to see that this is no or not?

Thanks.

(Edit: s/xvm/svm/ in title)

© Server Fault or respective owner

Related posts about linux

Related posts about virtualization