Containers wont run in Azure Windows Server Core 1709 VMs after changing daemon.json from C to D drive
Hi,
Expected behavior
docker can run windows servercore 1709 images (in Azure Vms) after moving from C drive to D drive by making a change to daemon.json
Actual behavior
The container refuses to start
C:\Program Files\Docker\docker.exe: Error response from daemon: container 074d134323df0c398d20d4ed4f945801d4349e24127d45639f7b588f6f7f410f encountered an error during CreateContainer: failure in a Windows system call: The operating system of the container does not match the operating system of the host. (0xc0370101) extra info: {"SystemType":"Container","Name":"074d134323df0c398d20d4ed4f945801d4349e24127d45639f7b588f6f7f410f","Owner":"docker","IsDummy":false,"VolumePath":"\\?\Volume{741e43d9-3713-41a8-84ea-2c876b69e605}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"D:\ProgramData\Docker\windowsfilter\074d134323df0c398d20d4ed4f945801d4349e24127d45639f7b588f6f7f410f","Layers":[{"ID":"9a5ec00b-893f-562a-a6aa-05727bd5e107","Path":"D:\ProgramData\Docker\windowsfilter\630eafe9e915308a9a3c15e75afcd79804c248720a93b1e2279c64af0b2a5b9a"},{"ID":"d4fb835d-5ed2-55bb-8ae1-be79c9403e84","Path":"D:\ProgramData\Docker\windowsfilter\596b586283e515c7db4543da7ede37271b2cfbef2e77dccaf39766997d2f81f1"}],"HostName":"074d134323df","MappedDirectories":[],"HvPartition":false,"EndpointList":["b8dfc4a4-b310-4de8-81b3-4af718320925"],"Servicing":false,"AllowUnqualifiedDNSQuery":true}.
Information
Because of the limited space on the C drive for Azure VM's (A3 standard) it is necessary to switch Docker to run on the D drive where the disk space is available. I've added the file daemon.json to C:\ProgramData\docker\config with content { "hosts": ["tcp://0.0.0.0:2375","npipe://"],"graph": "D:\ProgramData\Docker" }
Steps to reproduce the behavior
- Spin up an Azure VM (standard A3 in this case) on WindowsServer1709 containers image
- Run the base server core 1709 image on the VM and all is fine as expected
- Add the file daemon.json containing the below { "hosts": ["tcp://0.0.0.0:2375","npipe://"],"graph": "D:\ProgramData\Docker" }
- Restart-Service Docker
- Pull a new base image from MS (same as the original installed in the VM in C drive out of the box)
- Check the image is there - it is
- Run a container and get the error
C:\Program Files\Docker\docker.exe: Error response from daemon: container 2e44ab275d7ba608477d936b34c9a771f4af0f80866b950b1ce6b3631118c138 encountered an error during CreateContainer: failure in a Windows system call: The operating system of the container does not match the operating system of the host. (0xc0370101) extra info: {"SystemType":"Container","Name":"2e44ab275d7ba608477d936b34c9a771f4af0f80866b950b1ce6b3631118c138","Owner":"docker","IsDummy":false,"VolumePath":"\\?\Volume{0508d596-264f-411d-967b-c91c8fc5e89f}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"D:\ProgramData\Docker\windowsfilter\2e44ab275d7ba608477d936b34c9a771f4af0f80866b950b1ce6b3631118c138","Layers":[{"ID":"83fa1c0f-a4b7-592b-a260-85eb3be98ccf","Path":"D:\ProgramData\Docker\windowsfilter\3a5ff5c4273afb3f994d4981310fa559996e24c2fbfb254d909be5860cc9dad2"},{"ID":"eda6ecde-27d8-5107-8f6c-aaf519ba331a","Path":"D:\ProgramData\Docker\windowsfilter\88a6bbce4ddc09a5f1a2fb061681396b01861bb2179c79e31541107cba1d508c"}],"HostName":"2e44ab275d7b","MappedDirectories":[],"HvPartition":false,"EndpointList":["86e0170f-d69c-4175-8c68-15e5d85c31c1"],"Servicing":false,"AllowUnqualifiedDNSQuery":true}.
Have you any suggestions for how to fix this or if there is something more i need to do?
Thanks Doug
Docker info looks ok after the change
Containers: 9 Running: 0 Paused: 0 Stopped: 9 Images: 4 Server Version: 17.06.1-ee-2 Storage Driver: windowsfilter Windows: Logging Driver: json-file Plugins: Volume: local Network: l2bridge l2tunnel nat null overlay transparent Log: awslogs etwlogs fluentd json-file logentries splunk syslog Swarm: inactive Default Isolation: process Kernel Version: 10.0 16299 (16299.15.amd64fre.rs3_release.170928-1534) Operating System: Windows Server Datacenter OSType: windows Architecture: x86_64 CPUs: 4 Total Memory: 7GiB Name: sdmWinCont1709 ID: J2JS:BB5C:X6LS:23XX:POGB:5XPI:RDSV:F6SJ:3YML:MUUA:ZKC3:CHTR Docker Root Dir: D:\ProgramData\Docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

I've tried this again only this time i set the daemon.json to be "graph": "D:\Docker" }
rather than "graph": "D:\ProgramData\Docker" }
This seems to work... I made sure the D:\Docker dir existed on the host first.... so i'm not sure what the problem was before....either it was the special name D:\ProgramData\Docker or the fact the directory at that location didnt exist... im not sure which.
a bit strange.
I still have disk space issues with the pull being to the C:\Windows\Temp as part of the process... but cleaning up the Temp dir periodically at least allowed me to get the images to D..
Doug
This was a mistake on my part.
The D drive was only temporary storage and gets recycled with the Vm life cycle hence the data loss. I'll close this issue.
Thanks Doug
Thanks for following up @douglaswaights
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