Checking hardware assisted virtualization support in CPU
Code: Select all
egrep -q '^flags.*(vmx|svm)' /proc/cpuinfo && echo yes
If you don't get yes in output, then the answer is obviously no.
Checking whether hardware virtualization is enabled/used in AMD CPUs
Checking SVME bit (12th bit, counting from 0 as in AMD docs, SVM Enable) in EFER (MSR 0xC0000080, Extended Feature Enable Register).
You can check it using rdmsr from msr-tools package.
If you get a number where 4th (counting from 1 and obviously from right) hexadecimal digit has first bit set, or it just equals 1, then SVME is on.
If you've got an error, then you have to load msr module before.
KVM problem
KVM module works a bit differently than VB. E.g. in case of AMD KVM sets SVME immediately after loading. So having KVM module loaded, you'll get following, and a bit misleading, message in VB:
Code: Select all
HWACCM: No VT-x or AMD-V CPU extension found. Reason VERR_SVM_IN_USE
Misleading is only a first part, reason is correct.
Solution
To unload KVM modules type:
Code: Select all
sudo modprobe -r kvm_amd kvm_intel
It will be a bit off-topic now, but still may be useful for somebody.
Checking whether hardware virtualization is permanently (in current session) disabled
For AMD CPU to check whether you can use hardware virtualization, i.e. it wasn't blocked by BIOS, etc. you have to look at SVME_DISABLE bit (4th, counting from 0) in VM_CR (MSR 0xC0010114).
If you get a number where 2nd (counting from 1) hexadecimal digit has first bit set, or it just equals 1, then your hardware virtualization is not available in this session.