

Switching on the Hyper-V role on Windows will disable VirtualBox (and you won’t be able to use the Docker ToolBox until you switch Hyper-V off & reboot). This will auto-refresh for every event written to the log. To monitor the latest logs use the following PowerShell command: gc $(gi $env:LocalAppData\Docker\* | sort LastAccessTime -Desc | select -First 1) -Wait If the MobyLinuxVM booted successfully, we may confirm the Hyper-V integration Services are running: Get-VMIntegrationService -VMName MobyLinuxVM -Name "Key-Value Pair Exchange"Īnd that the DHCP service provided an IP to the VM - which we can query thanks to the Hyper-V Integration Services: $(Get-VM MobyLinuxVM).NetworkAdaptersĪll settings are stored under %APPDATA%\Docker\ folder, this folder is replicated across machines in an Enterprise setting where Roaming is enabled.Īll logs are stored under %LOCALAPPDATA%\Docker\ folder.
#DOCKER_HOST DOCKER FOR MAC CODE#
See also the docker client code for handling Windows Named Pipes going forward.

Having the Docker daemon port opened locally, allows your docker client to talk to localhost, however - it seems that going forward a named pipe solution will be used instead, if the VM was created successfully you should see the named pipe connected to its COM port: Get-VMComPort -VMName MobyLinuxVM | fl | Out-String New-NetFirewallRule -Name "DockerUdp" -DisplayName "DockerUdp" ` Profile Any -EdgeTraversalPolicy DeferToUser -Enabled True New-NetFirewallRule -Name "DockerTcp" -DisplayName "DockerTcp" ` To ensure this process can work properly, docker automatically creates DockerTcp & DockerUdp firewall rules and removes them when you close the client.

The will proxy all DNS requests from the internal network of your Windows laptop to the DNS server used by your Windows host, effectively isolating the MobyLinuxVM from the network configuration changes as you move your laptop around. Once you have the process id ( ) of the process holding the port, get the name: tasklist /SVC | findstr See if any process is using port 53: netstat -aon | findstr :53 If you’ve been running alternative solutions for your Hyper-V set-up, you need to ensure the above ports are available as follows. At the time of writing (Docker Beta 7), this includes the DNS (port 53 TPC/UDP), DHCP (port 67 UDP) and Docker daemon (port 2375 TCP). The Hyper-V KVP Daemon allows communication between the Hyper-V Host and the Linux Guest (i.e to retrieve the Guest IP and send two-way messages as we’ll see later).įinally, Docker bundles a binary which proxies the ports from the MobyLinuxVM on your windows host. MobyLinuxVM uses an Alpine bootcd which has Hyper-V Integration Services, such as the Key-Value Pair Exchange service (hv_kvp_daemon). Next, the MobyLinuxVM Virtual Machine is created in Hyper-V. Also ensure these hard-coded subnets do not overlap with already existing interfaces (We had to manually fix these things while testing the beta). Tip: If any of these steps failed, ensure a Switch with the name “DockerNAT” was created, the IP was assigned to the Virtual Interface and that Get-NetNat lists a NAT with the correct subnet. –InternalIPInterfaceAddressPrefix "10.0.75.0/24"

Get-NetAdapter "vEthernet (DockerNAT)" | New-NetIPAddress -AddressFamily IPv4 `Ī NAT object is created to handle Network Address Translation for the “10.0.75.0/24” subnet: New-NetNat –Name $SwitchName ` The new Docker client handles the Virtual Switch NAT configuration for us and adds a clever solution for DNS & DHCP.Īs part of the installation process a DockerNAT Internal Virtual Switch is created and the Virtual Interface on the Windows host for this switch gets a static IP: New-VMSwitch -Name "DockerNAT" -SwitchType Internal The first issue to overcome when using Hyper-V on Windows is the lack of DNS/DHCP & NAT services. Hearing that the new Docker client for Windows would be Alpine-based and focused on Hyper-V made us eager to see for ourselves. Note: The research for this post was done on a Beta client and technical details are subject to change.Īs indicated in previous posts, we’ve been using Docker on Windows with Hyper-V for a while.
