microsoft / microsoft/hcsshim

hcsshim::PrepareLayer failed in Win32: The system cannot find the path specified. (0x3) on Docker Desktop 4.28.0 (139021)

Open
#2,075 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
694
Forks
304
Avg merge
1d 19h
Merged PRs (30d)
28

Description

I am encountering "hcsshim::PrepareLayer failed in Win32: The system cannot find the path specified" on Windows 10 Pro Version10.0.19045 Build 19045:

Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl"

docker version
Client:
Cloud integration: v1.0.35+desktop.11
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:13:02 2024
OS/Arch: windows/amd64
Context: default

Server: Docker Desktop 4.28.0 (139021)
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 20:55:49 2024
OS/Arch: windows/amd64
Experimental: false

It happens during: Status: Image is up to date for mcr.microsoft.com/businesscentral:10.0.19041.1415
mcr.microsoft.com/businesscentral:10.0.19041.1415
Using image mcr.microsoft.com/businesscentral:10.0.19041.1415

Full Error:
Creating container Container from image mcr.microsoft.com/businesscentral:10.0.19041.1415
e7f2784186ed2e216c869521f6c6362767c03c8fed7fb27160ce78468a447499
New-BCContainer Telemetry Correlation Id: 3f66ddac-bbd9-4aff-8ffc-6fafce473a21
DockerDo : docker: Error response from daemon: hcsshim::PrepareLayer failed in Win32: The system cannot find the path specified. (0x3).
ExitCode: 125
Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=23.5.16502.17686 --label
platform=23.0.17641.0 --label country=US --env artifactUrl=https://bcartifacts.azureedge.net/sandbox/23.5.16502.17686/us --env multitenant=Y
--env licenseFile="c:\run\my\license.bclicense" --name Container --hostname Container --env auth=NavUserPassword --env username="admin" --env
ExitOnError=N --env locale=en-US --env databaseServer="" --env databaseInstance="" --volume
"C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume
"C:\ProgramData\BcContainerHelper\Extensions\Container\my:C:\Run\my" --isolation process --restart unless-stopped --env filesOnly=False --env
enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5
345MgB8AG8ANwBUAGYAcwBmAE4AUABmAG4AawBPAHkANQBFAG8AeABVAGQAbQA4AHcAPQA9AHwANgBlAGEAZgA5AGMAYQBiADMAZABkADEAOQAyAGMAOAAzADMAZQA4ADAAOABhADQANAA
1AGMANgA2ADMAYgAyADIAMgA4ADIANAA2AGIAYQA2ADgAMgAyAGUAYQA4AGYANAA3AGYAMAA2ADgAYwBiAGEANQAwADUAZQA3AGEAMgA= --env
passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env accept_eula=Y --env accept_outdated=Y --detach
mcr.microsoft.com/businesscentral:10.0.19041.1415
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.0\ContainerHandling\New-NavContainer.ps1:1969 char:15

  • ... if (!(DockerDo -accept_eula -accept_outdated:$accept_outdated - ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo

This is after a complete reinstall of Docker Desktop.
I am unable to create New-BCContainer because of this issue.
Any help is appreciated.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported docker run command, especially the volume mappings and --isolation process option, then inspect New-NavContainer.ps1 at line 1969 where DockerDo invokes it. Reproduce on the stated Windows and Docker Desktop versions while checking which path triggers hcsshim::PrepareLayer. Done means identifying a reproducible cause and documenting or validating a fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, powershell
Domain
infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.