All Linux HowTo's

KVM Error – ioctl(KVM_CREATE_VM) failed: 16 Device or Resource busy

I ran into this error in the test lab today and figured I would document the cause. When you create a QEMU/KVM virtual machine using the command line virt-install or the graphical virtual machine manager you get an error similar to the following

Error starting domain: internal error: process exited while connecting to monitor: ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
failed to initialize KVM: Device or resource busy

This is caused by the virtualization technology for your CPU (Intel VT-x or AMD-V) being locked by another hypervisor, in our case it was VirtualBox. If we had VirtualBox open we could build and start our QEMU/KVM machines just fine however as soon as we started one of our VirtualBox machines and tried to build or start a QEMU/KVM machine we would get the error.

Interestingly if you had your QEMU/KVM machines running first and then tried to start a VirtualBox machine, the error message from VirtualBox tells you straight away what the error is, something along the lines of “Intel VT-x is in use by another hypervisor”.

Probably not something many people will encounter but it might help somebody.

Similar Posts:

6 comments

  1. The second I read this I realised what the problem was. I’d seen this problem before and resolved it but forgot that if VirtualBox is running even without any of its VMs actually running you still get the error. You need to make sure VB is not running at all because it locks the VT-x and QEMU can’t access the number of cores it needs. I literally spent hours on this so thanks for the reminder.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.