Error VT-x not available for Vagrant machine inside Virtualbox

user2230605 picture user2230605 · Jul 7, 2014 · Viewed 46.9k times · Source

I have an Ubuntu Virtual machine that is configured to have VT-x enabled, 6 Processors, and 25 GB RAM.

Inside that virtual machine I am trying to start a vagrant machine with the following configuration:

master.vm.box = "precise32"
master.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--cpuexecutioncap", "80"]
    vb.memory = 10000
    vb.customize ["modifyvm", :id, "--cpus", "2"]   
    vb.customize ["modifyvm", :id, "--ioapic", "on"]
end

When I start the Vagrant I get the error VT-x not enabled.

I tried both 32 bit and 64 bit versions of Vagrant but still no luck.

Any idea how can I run Vagrant machine inside the Virtualbox?

Answer

dabide picture dabide · Jul 16, 2014

You can only use one virtual CPU without VT-x. Thus, the error message stating that VT-x isn't enabled is caused by the following line:

vb.customize ["modifyvm", :id, "--cpus", "2"]

Replacing it with the following works (Vagrant has a shorthand for setting the CPU count):

vb.cpus = 1

NOTE: You can only run 32-bit VMs inside another VM.