Ubuntu – Can VirtualBox and KVM run alongside each other

kvmvirtualboxvirtualization

I have a KVM virtual instance running on my machine. I installed VirtualBox; but, when I tried to start the VirtualBox VM machine, I got the following error:

VERR_VMX_IN_VMX_ROOT_MODE

I searched based on this error message and the problem is that KVM is already installed.

I know that I can switch between them by removing some modules then use VirtualBox. However, my question is how to make them run simultaneously?

Best Answer

Your only real option is a matter of order:

If you start and open the VirtualBox machine, wait for it to finish booting and then start the KVM machine (from virt-manager or virsh) it should work correctly. Booting the machines in the opposite order will not work.

Loading and unloading the kvm and kvm_intel modules will satisfy VirtualBox's requirements. A smoother, script-based method for this can be found here.

EDIT: this solution (boot order) no longer seems to work for me, since upgrading to Ubuntu 13.10. YMMV.