I run a command like:
docker-machine --debug create -d "virtualbox" default
I get
Error creating machine: Error in driver during machine creation: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
Here is my environment
helios@mtl-helios:~$ docker --version
Docker version 1.9.0, build 76d6bc9
helios@mtl-helios:~$ docker-machine --version
docker-machine version 0.5.0 (04cfa58)
helios@mtl-helios:~$ vboxmanage --version
5.0.8r103449
helios@mtl-helios:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
Would be great if anybody could point me to resolve this.
Here is the --debug output: https://gist.github.com/GiantEnemyCrab/633c6c7e9f8fd929d348
And here is the VBox.log: https://gist.github.com/GiantEnemyCrab/43f3f9990af26deec4c8
Hi @GiantEnemyCrab
I believe the error message tells you what's wrong and what to do:
This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
You need to go into your laptop BIOS and enable VT-X/AMD-v.
Thanks for the response! Actually, I am on vmware and it's one of the VMs, headless. I am not the admin of the machine, but I suppose it is still possible to configure it?
So, you are _inside_ a VMWare VM and trying to start virtualbox inside it?
If so, it's very unlikely to work. Virtualization inside virtualization is usually not working.
yes, I am on the VM server (not physical) and trying to create docker machine with the virtualbox docker inside that VM.
I do have VirtualBox inside of VMware Fusion working on a VM on my laptop, you have to toggle a setting in the Preferences menu for the VM to get nested virtualization to work though.
@GiantEnemyCrab If our VTX check is preventing you from being able to make a VM when you otherwise could (e.g. with older versions of Machine), then we should fix it, but check to make sure creating any VM at all works please.
Thanks for the feedback so far to both of you.
The older versions, I could try 0.4.1 or 0.4.0 and come back here with results.
hi @nathanleclaire
I am back here with some results. It looks like the machine itself is created in 0.4.1, I think.....
It is having a problem doing ssh into the virtualbox though. And it keeps being in the loop of attempting the ssh quite a number of times. It could be another issue?
Anyway, I will paste the debug log here.
VBox.log file: https://gist.github.com/GiantEnemyCrab/42187e86f4867028dced
docker-machine debug on: https://gist.github.com/GiantEnemyCrab/2df075516e922a68a0d1
Hi @GiantEnemyCrab, before version 0.5.0, the vm was looping attempting ssh connection because the vm could in fact not be started. With version 0.5.0, the exact error is now displayed.
ok, I somehow switched the version of virtualbox to 4.3 default, let me try with 5.0.8 again, sorry about this, and will be back with some results.
To make sure that there's really a problem with the created vm, you can capture its screen with VBoxManage controlvm vm_name screenshot.png screen.png
Thanks @dgageot, I got the screenshot. And there is a message before the docker whale ascii art saying:
This kernel requires an x86-64 CPU, but only detected an -686 CPU.
Unable to boot = please use a kernel appropriate for your CPU.
In this case, at least, VM is created using 0.4.1?
But weird, the CPU is indeed x86_64.
helios@mtl-helios:~$ uname -a
Linux mtl-helios 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Hmmmm, how can I move forward?
Hi @GiantEnemyCrab The thing is you are running VirtualBox _inside_ VMWare VM. So even if the host is a x86-64 with hardware virtualization enabled, there's a good chance that Virtualbox isn't able to use those VT-X instructions.
@nathanleclaire How did you make it work?
Click on VM => "Virtual Machine" menu => Preferences => Processors and Memory => Advanced options => Enable hypervisor applications in this virtual machine
Thank you so much for the insight!
It turns out that since I am already in Ubuntu, I don't really need to do the virtualbox stuff. I can just docker create / docker run by pulling an image, such as postgres and it can run just fine.
I was blindly trying to follow instructions specifically for windows / mac, but it does not look like I need the initial docker-machine create default part anyway.
Please confirm that, and I think the error message given about VT-X, etc, is appropriate in docker-machine v0.5.0. In that case the ticket can be closed.
However, @nathanleclaire 's preference editing is a great reference as well.
@GiantEnemyCrab Great! Let's close this ticket then.
Nicely done everyone :+1:
This solution works for me.(Window 10/8)
Have same problem on my Windows 7 Enterprise laptop running a Ubuntu OS VM using Oracle VirtualBox.
However, I do see Virtualization enabled on my Windows laptop as well as on Ubuntu VM. The Oracle VirtualBox includes System Acceleration Setting: VT-x/AMD-V, Nested Paging, Hyper-V ParaVirtualization on the Ubuntu VM, I tried the default paravirtualization as well, but of no use.
My windows laptop (has its own windows OS - docker issues) is able to start docker containers on created docker-machine on my laptop but not on Ubuntu VM,
Everything is messed up if I use docker-machine comands on my Ubuntu VM.
root@hyper-VirtualBox:/home/hyper# docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Stopped Unknown
root@hyper-VirtualBox:/home/hyper# docker-machine start default(default) Starting VM...
This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
root@hyper-VirtualBox:/home/hyper# docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running Unknown Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output :
root@hyper-VirtualBox:/home/hyper# docker-machine -v
docker-machine version 0.5.3, build 4d39a66
VMWare Workstation/Fusion - Ubuntu VM (64bit 16.04)
Click on VM => "Virtual Machine" menu => Preferences => Processors and Memory => Advanced options => Enable hypervisor applications in this virtual machine
sudo apt-get install virtualbox
https://github.com/docker/labs/blob/master/swarm-mode/beginner-tutorial/swarm-node-vbox-setup.sh
./swarm-node-vbox-setup.sh
Worked just fine.
$ sudo docker-machine create --driver virtualbox manager1
Running pre-create checks...
Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
Please note i am using AWS ubuntu 16.04 machine
Please guide me how to resolve this error in ubuntu 16.04 through CLI asap
Most helpful comment
Click on VM => "Virtual Machine" menu => Preferences => Processors and Memory => Advanced options => Enable hypervisor applications in this virtual machine