-
Notifications
You must be signed in to change notification settings - Fork 290
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
Docker-Machine create hyperv, Waiting for host to start, stuck #1378
Comments
So i was finally able to get docker-machine to create a VM in Hyper V. Sadly Im not really sure what, if anything really changed to make this happen. I think there might be bug in there for users that get updated from Windows 7 who may have had Docker Toolbox using VirtualBox. There's a hangup of somekind. Obviously I no longer had Docker Toolbox or VirtualBox installed but i came across a folder today in my profile for VirtualBox which I deleted. I also started up a an ubuntu VM from an iso just to see anything else run and get an IP address. So one of those 2 things may have flipped a switch back somewhere that got docker past where I was was getting stuck. It works normally now. This was really a pain in the ass though. Days I'll never get back. smh |
Also, if you've reached this post, just forget Docker-Machine and the old way of doing things altogether. Essentially your docker-machines are just a process now running in the background in windows 10 with hyper v. you do not physically need a host running docker that you can see in hyper v. That is 'old thinking' . So no more docker-machine. Move on. Just use Docker run, Or Docker Container Run. It's runs a host process in the background automagically. More on the web. Go find with Google. Just don't wast time with docker-machine like I did. |
I also encountered this issue, and fixed it, I think the root cause is: the document is unclear. |
Resolved my problem |
Do not connect the docker host directly to the external network. That's a major security hole since your docker containers will be directly accessible from outside. Instead create an internal switch with a NAT.
Since Hyper-V comes with no DHCP server, install a free DHCP server, for example TFTPD64. Configure DHCP on interface 172.16.0.1 to issue IP addresses in the range 172.16.0.2 ... 172.16.0.99. |
Thanks. This was Helpful. My issue got fixed. |
Definetly, it solved my problem |
Logged in just to thank you, solved mine too. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
PS C:\WINDOWS\system32> docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" manager1
Running pre-create checks...
Creating machine...
(manager1) Copying C:\Users\Vicky.docker\machine\cache\boot2docker.iso to C:\Users\Vicky.docker\machine\machines\manag
er1\boot2docker.iso...
(manager1) Creating SSH key...
(manager1) Creating VM...
(manager1) Using switch "Primary Virtual Switch"
(manager1) Creating VHD
(manager1) Starting VM...
(manager1) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Doc
ker\Docker\Resources\bin\docker-machine.exe env manager1
PS C:\WINDOWS\system32>
Actual behavior
PS C:\WINDOWS\system32> docker-machine create -d hyperv --hyperv-virtual-switch "External Virtual Switch" Default
Running pre-create checks...
Creating machine...
(Default) Copying C:\Users\rss.docker\machine\cache\boot2docker.iso to C:\Users\rss.docker\machine\machines\Default\boot2docker.iso...
(Default) Creating SSH key...
(Default) Creating VM...
(Default) Using switch "External Virtual Switch"
(Default) Creating VHD
(Default) Starting VM...
(Default) Waiting for host to start...
Information
So I've followed information and documenatation from Docker here https://docs.docker.com/machine/drivers/hyper-v/
It actually mentions the issue Im having here but im not using Virtual box so the linked provided isn't very helpful.
https://docs.docker.com/machine/drivers/hyper-v/#3-reboot
Windows 10 professional with Hyper V
Docker version 17.09.0-ce, build afdb6d4
docker-machine.exe version 0.12.2, build 9371605
Steps to reproduce the behavior
I run a basic docker machine command to create as follows and this is what I get.
I've looked around, tried everything. I think because I had VirtualBox installed at one point, there's something that is messing this whole thing up, but I've tried everything to try and get that install removed cleanly and completely. I've even tried ethernet vs wireless on my virtual switch, no change. I enabled containers as a feature, no change. Obviously reboots have done nothing.
Maybe Im missing something on my network configs?
The text was updated successfully, but these errors were encountered: