boot2docker in windows 10 hyperv won't boot

Created on 15 Mar 2017  路  14Comments  路  Source: boot2docker/boot2docker

I have tried the boot2docker iso from here (v17.03.0-ce) as well as the boot2docker.iso from the latest toolbox install (uninstalled virtualbox). Whether creating a new vm with the boot2docker iso manually via hyperv manager or via docker-machine command line, both result in the vm not booting due to boot2docker not reporting an ip address.

Steps to reproduce via hyperv manager:

  • Setup external virtual switch
    image
  • Create new vm from boot2docker.iso with the previously configured external switch

The boot2docker vm gets stuck with the following message _'Waiting as requested... 10'_
image

Further investigation in docker-machine debug shows that the VM is not reporting an ip address and perpetually hangs.

Steps to re-produce via docker-machine:

  • Open powershell in Admin mode
    -Run _docker-machine --debug create --driver hyperv --hyperv-virtual-switch 'External' boot2docker_

image

image

question

Most helpful comment

With the newer releases of Windows 10's Hyper-V it is possible to use the Default Switch, which runs a DHCP server and can assign therefore an IP address with NAT networking enabled. If you use a private switch, you need to handle the DHCP server yourself, and for external wirtual switch you have to make sure you assign the right physical network port that is attached to a segment with a DHCP server.

As mentioned by @tianon, if the problem persists create a new issue... however, continued testing for me did never reveal that the ISO was mistaken, but rather the setup of networking and the virtual switch creation.

All 14 comments

I was able to reproduce it with the latest boot2docker ISO and docker binaries

Seems not to be related to the switch type as I can reproduce with ext network, internal and nat.

Configuration:

  • boot2docker v17.05.0-ce
  • Docker version 17.03.1-ce, build c6d412e
  • docker-machine.exe version 0.10.0, build 76ed2a6

You need to have an external network with DHCP for HyperV to work (Hyper-V does not provide a DHCP server on the virtual switches).

(Copying my reply from the minishift issue for the sake of reference)

The network is properly configured: it's bridged to the Ethernet network adapter where DHCP is available.
Truth be told, I don't think this is a network-related issue.
I was able to boot properly on a different machine with the same configuration steps but with different, older, hardware.

I have a feeling this may be just hardware incompatibility with my workstation setup. Ryzen CPUs are supported by newer kernels than the one shipping with boot2docker/minishift image and the telling sign is that the boot process hangs at the hardware detection/configuration stage.

More tests:

It may be some kind of customization done by boot2docker on top of TCL but I have no idea how to turn on any kind of verbose logging of udev (assuming it's udev)

More manual bisecting on boot2docker.

  • Latest working version: v1.11.0 32ee7e9eef424d2fb137746fb9778fee3f9067ac
  • First broken version: v1.11.1-rc1 903a35267e902a1322d2fddd73530d815a4c841b

I'll try to build all the commits in between using this:
https://github.com/boot2docker/boot2docker/compare/v1.11.0...v1.11.1-rc1

My guess is either the kernel version bump or the make oldconfig one

According to git bisect 7d3984daabec39e3b3c35dea9f3e5173fa6e19a6 is the first bad commit

commit 7d3984daabec39e3b3c35dea9f3e5173fa6e19a6
Author: Tianon Gravi admwiggin@gmail.com
Date: Mon Apr 18 16:01:18 2016 -0700

Update kernel to 4.4.7

See also https://github.com/docker/machine/issues/3327#issuecomment-211606359 (and following discussion)

Still broken in https://github.com/boot2docker/boot2docker/releases/tag/v17.06.1-ce

@tianon You seem to be the most active on the repo. Is there anything I can do to help to fix this issue?

It needs someone to figure out what changed from Linux 4.1 to 4.4 and what we need to fix in our kernel/build to make Hyper-V work properly again.

@nanomad can you also change the title, as this is unrelated to the IP address

So my prior thread was marked closed and pointed to this. Does this issue have a solution or is it just stating an issue without a solution? My external network had a DHCP server.

So my motherboard has 2 Ethernet ports. Plugging my router from Ethernet 2 to Ethernet fixed this along with the latest windows update.

I've successfully tested Hyper-V on Windows 10 with the latest releases of boot2docker, so I'm going to close this. If this still isn't working, please open a fresh issue describing steps to reproduce with the latest release. Thanks!

With the newer releases of Windows 10's Hyper-V it is possible to use the Default Switch, which runs a DHCP server and can assign therefore an IP address with NAT networking enabled. If you use a private switch, you need to handle the DHCP server yourself, and for external wirtual switch you have to make sure you assign the right physical network port that is attached to a segment with a DHCP server.

As mentioned by @tianon, if the problem persists create a new issue... however, continued testing for me did never reveal that the ISO was mistaken, but rather the setup of networking and the virtual switch creation.

Note: @nanomad did experience an issue with incompatibility with Ryzen CPUs. Although a later kernel of TCL should be able to resolve this. Other distros did not have this issue...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

linux-china picture linux-china  路  15Comments

lunaticare picture lunaticare  路  8Comments

mclarkson picture mclarkson  路  5Comments

aheissenberger picture aheissenberger  路  12Comments

tianon picture tianon  路  8Comments