Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
Experience Sitecore! | Sitecore Docker breaks when running Build.ps1 with "hcsshim::PrepareLayer failed in Win32: Incorrect function. (0x1)" message

Experience Sitecore!

Martin Miles on Sitecore

Sitecore Docker breaks when running Build.ps1 with "hcsshim::PrepareLayer failed in Win32: Incorrect function. (0x1)" message


Recently I was trying to build docker images from the main Sitecore repository, and got quite a weird message.

hcsshim::PrepareLayer - failed failed in win32 : Incorrect function. (0x1)

This message is not self-explanatory and it fired up when the actual build for the first image took place, in my case that was SQL server 2017. Some other details: quite fress and new instance of Windows 10 x64 build 1909, using Hyper-V, no docker / images previously been utilized at thtis computer.

After few hours long googling, I came to understanding that was caused by c:\windows\system32\cbfsconnectnetrdr2017.dll referenced by autorun. There is one halpful tool that helps out troubleshoouting such issues - Sysinternals Autoruns. Here is the output generated by Autoruns for my system:


What is that DLL and how did it get to my machine? CBFSConnect is a known library for creating and managing virtual filesystems for cloud storage providers such as such as Box, Dropbox etc., and this DLL is a kernel mode system drive. Sometimes it may be a leftover from a previously installed software, that was not uninstalled fully and properly.

Depending no your system you may see this DLL as either:

  • C:\Windows\system32\cbfsconnectnetrdr2017.dll  - for newer systems, or
  • C:\Windows\System32\drivers\cbfs6.sys
You may check if it is running or no tby running  a command-line utility for common minifilter driver management operations command (a command-line utility for common minifilter driver management operations):


Resolution
The easiest I found was to just simply rename this driver. Once restarted, docker build worked well.

Hope this helps someone
blog comments powered by Disqus