New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host needs VT-x/AMD-v enabled for docker-machine to work on virtualbox #1983

Closed
dgageot opened this Issue Oct 14, 2015 · 9 comments

Comments

Projects
None yet
7 participants
@dgageot
Copy link
Contributor

dgageot commented Oct 14, 2015

If VT-x or AMD-v are not enabled on the host machine, the vm won't boot boot2docker properly and the whole creation process will hang forever.

To reproduce:

docker-machine create -d virtualbox default

, on a host without VT-x/AMD-v

We need to:

  • Detect that VT-x/AMD-v is not enabled and fail as early as possible
  • Understand why the start command hangs for what it looks forever
@thaJeztah

This comment has been minimized.

Copy link
Member

thaJeztah commented Oct 14, 2015

@jeanlaurent

This comment has been minimized.

Copy link
Member

jeanlaurent commented Oct 14, 2015

@nathanleclaire

This comment has been minimized.

Copy link
Contributor

nathanleclaire commented Oct 14, 2015

I think my main concern in the immediate future is to detect this case for Windows users (the most likely to have it disabled), so maybe we can focus on that. I don't see any reliable way to find the information in the links referenced without assuming something like Powershell, though. Maybe I'm overlooking something.

At any rate, can VBoxManage itself detect whether virtualization is enabled through the command line? I know that it complains if you attempt to run it in Xen, so there might be something there we can try and parse.

@dgageot

This comment has been minimized.

Copy link
Contributor

dgageot commented Oct 15, 2015

We should be able to detect that VT-x/AMD-v is enabled on windows with this command:

> wmic cpu get VirtualizationFirmwareEnabled
VirtualizationFirmwareEnabled
TRUE

(edit) This only works on windows 8, not 7

If wmic is not available then we could create the vm anyway and then find a way to see if it's enabled.

@dgageot dgageot self-assigned this Oct 15, 2015

@dgageot

This comment has been minimized.

Copy link
Contributor

dgageot commented Oct 15, 2015

The only way I found to detect afterwards is to look at the vm's log in ~/.docker/machine/machines/default/default/Logs/VBox.log

When is works, it says:

00:00:00.121781 HM: HMR3Init: VT-x w/ nested paging and unrestricted guest execution hw support

Otherwise it says:

00:00:00.121781 HM: HMR3Init: Falling back to raw-mode: VT-x is disabled in the BIOS for both all CPU modes
@dgageot

This comment has been minimized.

Copy link
Contributor

dgageot commented Oct 20, 2015

Closed by #1990

@serjN

This comment has been minimized.

Copy link

serjN commented Mar 24, 2016

@dgageot, you can check if virtualization enabled on windows 7 by utility Microsoft® Hardware-Assisted Virtualization Detection Tool. It has console mode, but needs admin rights.

@xhchrn

This comment has been minimized.

Copy link

xhchrn commented Jun 4, 2018

It seems a problem that the core isolation in Windows is enabled. See here:
https://stackoverflow.com/a/50403200/8585276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment