Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

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 #2256

Closed
GiantEnemyCrab opened this issue Nov 11, 2015 · 21 comments

Comments

@GiantEnemyCrab
Copy link

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

@dmp42
Copy link
Contributor

dmp42 commented Nov 11, 2015

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.

@GiantEnemyCrab
Copy link
Author

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?

@dmp42
Copy link
Contributor

dmp42 commented Nov 11, 2015

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.

@GiantEnemyCrab
Copy link
Author

yes, I am on the VM server (not physical) and trying to create docker machine with the virtualbox docker inside that VM.

@nathanleclaire
Copy link
Contributor

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.

@nathanleclaire
Copy link
Contributor

@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.

@GiantEnemyCrab
Copy link
Author

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.

@GiantEnemyCrab
Copy link
Author

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

@dgageot
Copy link
Member

dgageot commented Nov 11, 2015

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.

@GiantEnemyCrab
Copy link
Author

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.

@dgageot
Copy link
Member

dgageot commented Nov 11, 2015

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

@GiantEnemyCrab
Copy link
Author

screen

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?

@dgageot
Copy link
Member

dgageot commented Nov 12, 2015

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?

@nathanleclaire
Copy link
Contributor

Click on VM => "Virtual Machine" menu => Preferences => Processors and Memory => Advanced options => Enable hypervisor applications in this virtual machine

@GiantEnemyCrab
Copy link
Author

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.

@dgageot
Copy link
Member

dgageot commented Nov 12, 2015

@GiantEnemyCrab Great! Let's close this ticket then.

@dgageot dgageot closed this as completed Nov 12, 2015
@nathanleclaire
Copy link
Contributor

Nicely done everyone 👍

@ye4241
Copy link

ye4241 commented Dec 25, 2015

This solution works for me.(Window 10/8)

  1. In the BIOS, enable the Intel Virtualization Technology. F10 and press Y to save.Reboot.
  2. Win+Q, Find the Hyper-V Manager, Stop the service.
  3. Win+X, then press A, bcdedit /set hypervisorlaunchtype off, press enter to disable hyper-v.
  4. Reboot, and the hardware speedup is enabled now!

@krishna81m
Copy link

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

@sanjayjaiswar
Copy link

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.

@xavyaly
Copy link

xavyaly commented Feb 11, 2020

$ 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants