Skip to content
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

Boot2Docker kernel does not consistently recognize Hyper-V Network Adapter as a device #1862

Closed
pldmgg opened this issue Mar 20, 2018 · 2 comments

Comments

@pldmgg
Copy link

pldmgg commented Mar 20, 2018

NOTE: For tracking purposes, be aware that I also copy-pasted this same issue in two other palces because I'm not sure of the appropriate place given the problem:

Envrionment Info:

  • Windows 1709
  • Windows PowerShell 5.1
  • Docker For Windows 17.12.0-ce-win47
  • boot2docker.iso that says it's using Docker version 17.12.1-ce, build 7390fc6

From PowerShell:

PS C:\Users\pdadmin> docker-machine create -d hyperv --hyperv-virtual-switch "ToInternal" DockerHostA
Creating CA: C:\Users\pdadmin\.docker\machine\certs\ca.pem
Creating client certificate: C:\Users\pdadmin\.docker\machine\certs\cert.pem
Running pre-create checks...
(DockerHostA) Image cache directory does not exist, creating it at C:\Users\pdadmin\.docker\machine\cache...
(DockerHostA) No default Boot2Docker ISO found locally, downloading the latest release...
(DockerHostA) Latest release for github.com/boot2docker/boot2docker is v17.12.1-ce
(DockerHostA) Downloading C:\Users\pdadmin\.docker\machine\cache\boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v17.12.1-ce/boot2docker.iso...
(DockerHostA) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(DockerHostA) Copying C:\Users\pdadmin\.docker\machine\cache\boot2docker.iso to C:\Users\pdadmin\.docker\machine\machines\DockerHostA\boot2docker.iso...
(DockerHostA) Creating SSH key...
(DockerHostA) Creating VM...
(DockerHostA) Using switch "ToInternal"
(DockerHostA) Creating VHD
(DockerHostA) Starting VM...
(DockerHostA) Waiting for host to start...

Docker-Machine hangs here. Using Hyper-V VM console (i.e. vmconnect.exe), I can see that during boot, boot2docker mentions that it can't find eth0 or eth1 (not sure why it says anything about eth1...there's only one Adapter attached to the VM, so there shoul only be an eth0 as far as I understand). While docker-machine continues to hang (after 80 seconds), here is the output of Get-VM Hyper-V cmdlet:

PS C:\Users\pdadmin> $testA = Get-VM -Name DockerHostA
PS C:\Users\pdadmin> $testA | fl *


ParentCheckpointId                  : 1a188696-c3ac-4ecf-b140-c08cf78b1db6
ParentCheckpointName                : Automatic Checkpoint - DockerHostA - (3/20/2018 - 12:12:00 PM)
VMName                              : DockerHostA
VMId                                : 6abb8e25-2bb1-4a7e-b19b-8d4dfc68a64b
CheckpointFileLocation              : C:\Users\pdadmin\.docker\machine\machines\DockerHostA\DockerHostA
ConfigurationLocation               : C:\Users\pdadmin\.docker\machine\machines\DockerHostA\DockerHostA
SmartPagingFileInUse                : False
SmartPagingFilePath                 : C:\Users\pdadmin\.docker\machine\machines\DockerHostA\DockerHostA
SnapshotFileLocation                : C:\Users\pdadmin\.docker\machine\machines\DockerHostA\DockerHostA
AutomaticStartAction                : StartIfRunning
AutomaticStartDelay                 : 0
AutomaticStopAction                 : Save
AutomaticCriticalErrorAction        : Pause
AutomaticCriticalErrorActionTimeout : 30
AutomaticCheckpointsEnabled         : True
CPUUsage                            : 0
MemoryAssigned                      : 912261120
MemoryDemand                        : 619708416
MemoryStatus                        : OK
NumaAligned                         : False
NumaNodesCount                      : 1
NumaSocketCount                     : 1
Heartbeat                           : OkApplicationsUnknown
IntegrationServicesState            :
IntegrationServicesVersion          : 0.0
Uptime                              : 00:03:12.6840000
OperationalStatus                   : {Ok}
PrimaryOperationalStatus            : Ok
SecondaryOperationalStatus          :
StatusDescriptions                  : {Operating normally}
PrimaryStatusDescription            : Operating normally
SecondaryStatusDescription          :
Status                              : Operating normally
ReplicationHealth                   : NotApplicable
ReplicationMode                     : None
ReplicationState                    : Disabled
ResourceMeteringEnabled             : False
CheckpointType                      : Standard
EnhancedSessionTransportType        : VMBus
Groups                              : {}
Version                             : 8.3
VirtualMachineType                  : RealizedVirtualMachine
VirtualMachineSubType               : Generation1
Notes                               :
State                               : Running
ComPort1                            : VMComPort (Name = 'COM 1', VMName = 'DockerHostA') [Id =
                                      'Microsoft:6ABB8E25-2BB1-4A7E-B19B-8D4DFC68A64B\8E3A359F-559A-4B6A-98A9-1690A6100ED7\0', VMId =
                                      '6abb8e25-2bb1-4a7e-b19b-8d4dfc68a64b']
ComPort2                            : VMComPort (Name = 'COM 2', VMName = 'DockerHostA') [Id =
                                      'Microsoft:6ABB8E25-2BB1-4A7E-B19B-8D4DFC68A64B\8E3A359F-559A-4B6A-98A9-1690A6100ED7\1', VMId =
                                      '6abb8e25-2bb1-4a7e-b19b-8d4dfc68a64b']
DVDDrives                           : {DVD Drive on IDE controller number 1 at location 0}
FibreChannelHostBusAdapters         : {}
FloppyDrive                         : VMFloppyDiskDrive (Name = 'Diskette Drive', VMName = 'DockerHostA') [Id =
                                      'Microsoft:6ABB8E25-2BB1-4A7E-B19B-8D4DFC68A64B\8F0D2762-0B00-4E04-AF4F-19010527CB93\0\0\D', VMId =
                                      '6abb8e25-2bb1-4a7e-b19b-8d4dfc68a64b']
HardDrives                          : {Hard Drive on IDE controller number 0 at location 0}
RemoteFxAdapter                     :
VMIntegrationService                : {Guest Service Interface, Heartbeat, Key-Value Pair Exchange, Shutdown...}
DynamicMemoryEnabled                : True
MemoryMaximum                       : 1099511627776
MemoryMinimum                       : 536870912
MemoryStartup                       : 1073741824
ProcessorCount                      : 1
BatteryPassthroughEnabled           : False
Generation                          : 1
IsClustered                         : False
ParentSnapshotId                    : 1a188696-c3ac-4ecf-b140-c08cf78b1db6
ParentSnapshotName                  : Automatic Checkpoint - DockerHostA - (3/20/2018 - 12:12:00 PM)
Path                                : C:\Users\pdadmin\.docker\machine\machines\DockerHostA\DockerHostA
SizeOfSystemFiles                   : 81920
GuestControlledCacheTypes           : False
LowMemoryMappedIoSpace              : 134217728
HighMemoryMappedIoSpace             : 536870912
LockOnDisconnect                    : Off
CreationTime                        : 3/20/2018 12:11:53 PM
Id                                  : 6abb8e25-2bb1-4a7e-b19b-8d4dfc68a64b
Name                                : DockerHostA
NetworkAdapters                     : {Network Adapter}
CimSession                          : CimSession: .
ComputerName                        : WIN10LATESTA
IsDeleted                           : False

...specifically note $testA.NetworkAdapters.StatusDescription and $testA.NetworkAdapters.Status ...

PS C:\Users\pdadmin> $testA.NetworkAdapters | fl *


VMCheckpointId                          : 00000000-0000-0000-0000-000000000000
VMCheckpointName                        :
VmmqQueuePairs                          : 1
VmmqQueuePairsRequested                 : 16
ClusterMonitored                        : True
MacAddress                              : 00155D020D0A
DynamicMacAddressEnabled                : True
InterruptModeration                     : True
AllowPacketDirect                       : False
IsLegacy                                : False
IsSynthetic                             : True
IPAddresses                             : {}
DeviceNaming                            : Off
IovWeight                               : 0
IovQueuePairsRequested                  : 1
IovInterruptModeration                  : Default
PacketDirectNumProcs                    : 0
PacketDirectModerationCount             : 64
PacketDirectModerationInterval          : 1000000
IovQueuePairsAssigned                   : 0
IovUsage                                : 0
VirtualFunction                         :
MandatoryFeatureId                      : {}
MandatoryFeatureName                    : {}
PoolName                                :
Connected                               : True
SwitchName                              : ToInternal
AdapterId                               : 5B6CF86F-8B51-426F-840F-5F1B9DD5460F
TestReplicaPoolName                     :
TestReplicaSwitchName                   :
StatusDescription                       : {Degraded, The protocol version of the component installed in the virtual machine does not match the version
                                          expected by the hosting system}
Status                                  : {Degraded, ProtocolVersion}
IsManagementOs                          : False
IsExternalAdapter                       : False
Id                                      : Microsoft:6ABB8E25-2BB1-4A7E-B19B-8D4DFC68A64B\5B6CF86F-8B51-426F-840F-5F1B9DD5460F
SwitchId                                : f9884cc2-8d28-4c68-8f3b-202b55d77b90
AclList                                 : {}
ExtendedAclList                         : {}
IsolationSetting                        : VMNetworkAdapterIsolationSetting
RoutingDomainList                       : {}
VlanSetting                             : VMNetworkAdapterVlanSetting
BandwidthSetting                        :
CurrentIsolationMode                    : Vlan
MacAddressSpoofing                      : Off
DhcpGuard                               : Off
RouterGuard                             : Off
PortMirroringMode                       : None
IeeePriorityTag                         : Off
VirtualSubnetId                         : 0
DynamicIPAddressLimit                   : 0
StormLimit                              : 0
AllowTeaming                            : Off
FixSpeed10G                             : Off
VMQWeight                               : 100
IPsecOffloadMaxSA                       : 512
VrssEnabled                             : False
VrssEnabledRequested                    : True
VmmqEnabled                             : False
VmmqEnabledRequested                    : False
VrssMaxQueuePairs                       : 1
VrssMaxQueuePairsRequested              : 16
VrssMinQueuePairs                       : 1
VrssMinQueuePairsRequested              : 1
VrssQueueSchedulingMode                 : Dynamic
VrssQueueSchedulingModeRequested        : Dynamic
VrssExcludePrimaryProcessor             : False
VrssExcludePrimaryProcessorRequested    : False
VrssIndependentHostSpreading            : False
VrssIndependentHostSpreadingRequested   : False
VrssVmbusChannelAffinityPolicy          : Strong
VrssVmbusChannelAffinityPolicyRequested : Strong
VmqUsage                                : 0
IPsecOffloadSAUsage                     : 0
VFDataPathActive                        : False
VMQueue                                 :
BandwidthPercentage                     : 0
IsTemplate                              : False
Name                                    : Network Adapter
VMId                                    : 6abb8e25-2bb1-4a7e-b19b-8d4dfc68a64b
VMName                                  : DockerHostA
VMSnapshotId                            : 00000000-0000-0000-0000-000000000000
VMSnapshotName                          :
CimSession                              : CimSession: .
ComputerName                            : WIN10LATESTA
IsDeleted                               : False

In this situation, I either need to kill the docker-machine process or wait for it to timeout.

Please note that this problem (i.e. boot2docker not recognizing the Network Adapter as a device) happens about 70% of the time. However, about 30% of the time, it actually works as expected.

If I am lucky enough to actually establish a Docker Machine, after a baremetal host reboot (or really, in any situation where the Docker Machine VM is going from a non "Running" state to a "Running" state), there is a similar probability that the same thing will happen (i.e. boot2docker not recognizing the Network Adapter as a device).

After several Docker Machine VM reboots, it eventually works as expected. However, this is very inconsistent - sometimes it takes 1 VM reboot, sometimes it takes 10. Doesn't matter if you use docker-machine restart DockerHostA or Restart-VM -Name DockerHostA.

This was also tested with similar results with the latest v18.03.0-ce-rc4 boot2docker.iso.

@jasonbivins
Copy link

Hi @pldmgg thanks for reporting. I'm going to close the issue here since it relates to docker-machine and not necessarily docker-for-windows

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

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.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants