Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error VT-x not available for Vagrant machine inside Virtualbox

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?

like image 917
user2230605 Avatar asked Jul 07 '14 21:07

user2230605


People also ask

Does VirtualBox require Vt-X?

Whatver how old it is, VirtualBox is type2-hypervisor, it should work without Intel-VT from box.


2 Answers

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.

like image 72
dabide Avatar answered Sep 19 '22 18:09

dabide


Vagrant in nested Virtual Box

First of all you can run definitely Vagrant inside a nested Virtual Box.

VT-X Support (related to VirtualBox)

Currently VirtualBox is not supporting nesting VT-X. There is currently a feature request pending(see.: https://www.virtualbox.org/ticket/4032) but as of now it is not expected to be in a new version of VirtualBox

Consequences from missing VT-X in nested VirtualBox

There are currently two consequences from nesting without VT-X:

  1. You cannot use multiple CPUs but you can use a single virtual cpu using vb.cpus = 1
  2. You cannot run a 64-Bit VM within a nested VirtualBox.
like image 21
fyr Avatar answered Sep 23 '22 18:09

fyr