core
core copied to clipboard
hcsshim::PrepareLayer - failed failed in win32 : Incorrect function. (0x1)
Problem encountered on https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/docker-image Operating System: windows
Provide details about the problem you are experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.
I have windows 10 enterprise 1903 and I get the error in the title when I attempt to build a docker image. Any help would be appreciated.
This is still an open issue with Win10 1903, https://github.com/docker/for-win/issues/3884. Looks like uninstalling cloud storage providers with file system filters like Dropbox, Box, etc. as a workaround is an option for some users.
@jeanhibbert did the workaround provided by @lairdnet solve your problem?
This is still an open issue with Win10 1903, docker/for-win#3884. Looks like uninstalling cloud storage providers with file system filters like Dropbox, Box, etc. as a workaround is an option for some users.
deinstall cloud storage providers or virus scanners; if you identify which one is not working please share in https://github.com/docker/for-win/issues/3884 @carlossanlop yes; after deinstall, all works fine
@jeanhibbert didn't get a response from you, but @bplasmeijer confirmed the proposed workaround helped. Closing this issue.
This problem is still present today (1/6/2020) - and uninstalling cloud providers / virus scanners is not a reasonable workaround for many. Is there a better fix in the sight?
Thanks for the information, @adriatic. Reopening the issue. @MichaelSimons would you mind taking a look in case you have some insights on this problem? @Pilchie since this is an ASP docker tutorial, should the issue be moved to the ASP repo?
This issue is a core docker on Windows issue, not related to the ASP.NET aspect of the tutorial, so I don't see any reason to move it to AspNetCore.
+1 to @Pilchie's response. This is an issue for the Windows container team.
Windows just did an update and laid down a new copy of this driver.
- Rename the C:\Windows\System32\drivers\cbfs6.sys as something else (or delete it).
- Remove the container.
- Reboot.
See: https://github.com/docker/for-win/issues/3884#issuecomment-533952921
For me, it was actually C:\Windows\System32\drivers\cbfs4.sys
- I renamed it
- Did docker system prune -a (be careful with that)
- Restarted
And that was my welcome error with Docker :/ I can't even tell if it is a issue with my solution or it's coming from docker - windows.
Severity Code Description Project File Line Suppression State Error CTC1014 Docker command failed with exit code 1. hcsshim::PrepareLayer - failed failed in Win32: Incorrect function. (0x1)
@shirhatti can you help with this?
Getting the error. Sending build context to Docker daemon 3.248GB Step 1/16 : FROM mcr.microsoft.com/windows/servercore:ltsc2019 ---> fdf6432edbdc Step 2/16 : LABEL maintainer [email protected] ---> Running in 278d34409243 hcsshim::PrepareLayer - failed failed in Win32: Incorrect function. (0x1)
I don't have dropbox or any other mentioned software here.
fltmc output
Filter Name Num Instances Altitude Frame
FsDepends 8 407000 0 mfehidk 9 321300.00 0 storqosflt 0 244000 0 wcifs 0 189900 0 CldFlt 0 180451 0 MfeEERM 0 146800 0 MfeEEFF 4 146200 0 FileCrypt 0 141100 0 luafv 1 135000 0 MfeEpeRp 1 66666 0 npsvctrig 1 46000 0 Wof 2 40700 0 FileInfo 9 40500 0
I don't have the C:\Windows\System32\drivers\cbfs4.sys driver installed on my system. Please suggest how do I fix this issue?
Looking at the linked issues, as I understand it there are two separate issues in play. Both of these are external to dotnet and are tracked on their appropriate repos. The two issues are:
- Specifying
--storage-opts
via docker run or in thedaemon.json
causes docker builds to fail on Windows 10 version 1903 and newer - Using a callback-based filter file system driver causes docker builds to fail on Windows 10 version 1903 or newer. The linked issues have identified certain software that bring incompatible drivers with workarounds and it may be worth perusing the linked issues for workarounds
For the purposes of this tutorial that @jeanhibbert originally asked about, I'm going to recommend using linux containers with Docker for Windows until a fix is readily available.
Any updates on this topic? This issue still exists.
Also asking for an update. Is there a general workaround?
Why Microsoft put this as a get-started sample in their Docker site? Kind of humiliating themselves. Never saw anyone provided getting-started but it doesn't work
Same happened to me. Had Box installed. After uninstall and machine restart, it started working.
@shirhatti do we need to make updates to the tutorial or add a note about this?