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)
The answer comes from the similar question brian99 pointed at.
Install
kvm-ok
for your distro (from cpu-checker under Debian/Ubuntu). Runkvm-ok
which will then check the various prerequisites for hardware virtualization are present:/dev/kvm
presentThe output should indicate whether your system is capable, or what capabilities are missing to make so. Exit status should (I haven't confirmed) also be testable (shown below).
Sample run:
It is actually even easier than installing an additional utility - just try to load the relevant
kvm
module, or check if it is loaded withlsmod
. If kvm loads, you're all set, if not - you need to edit the BIOS settings, and perform a cold restart,A very similar question was asked a few months ago on askubuntu, and has some possible answers.