microsoft / hcsshim

Windows - Host Compute Service Shim
MIT License
556 stars 248 forks source link

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

Open 4ampro opened 3 months ago

4ampro commented 3 months ago

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

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

nick-webbgh commented 3 months ago

I'm also getting this error using the powershell script below. Any help would be greatly appreciated. I've tried removing all containers, uninstalling and re-installing Docker Desktop.

$containerName = 'bcnwtest004' $password = 'P@ssw0rd' $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $credential = New-Object pscredential 'admin', $securePassword $auth = 'UserPassword' $artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -country 'gb' -select 'Latest' New-BcContainer -accept_eula -containerName $containerName -credential $credential -auth $auth -artifactUrl $artifactUrl -imageName 'bcnwtest004img' -memoryLimit 8G -updateHosts Here's the script output:

BcContainerHelper is version 6.0.0 BcContainerHelper is running as administrator HyperV is Enabled UsePsSession is True Host is Microsoft Windows 11 Pro - 10.0.22631.3296 Docker Client Version is 25.0.3 Docker Server Version is 25.0.3 Removing Desktop shortcuts Fetching all docker images Fetching all docker volumes ArtifactUrl and ImageName specified WARNING: Unable to find matching generic image for your host OS. Using mcr.microsoft.com/businesscentral:10.0.20348.2340 Fetching all docker images Building multitenant image bcnwtest004img:sandbox-23.5.16502.17828-gb-mt based on mcr.microsoft.com/businesscentral:10.0.20348.2340 with https://bcartifac ts.azureedge.net/sandbox/23.5.16502.17828/gb Pulling latest image mcr.microsoft.com/businesscentral:10.0.20348.2340 10.0.20348.2340: Pulling from businesscentral 7c76e5cf7755: Already exists a61557bf6642: Already exists 4e27dceaede8: Already exists 4ed1ee36e917: Already exists 4e3161feeb34: Already exists 4a87fb828d64: Already exists cea67d57f3f9: Already exists 38b4ae346056: Already exists a778e25f053d: Already exists 32229c882b1e: Already exists 02e64a21450c: Already exists aa49fedb3e4f: Already exists 0ae32a5a2c8d: Already exists Digest: sha256:7473a1ca0616569f43a7b5e14add41f0a5fa8b4b5077abe86c5e4ade1af40d51 Status: Downloaded newer image for mcr.microsoft.com/businesscentral:10.0.20348.2340 mcr.microsoft.com/businesscentral:10.0.20348.2340 Generic Tag: 1.0.2.17 Container OS Version: 10.0.20348.2340 (ltsc2022) Host OS Version: 10.0.22631.3296 (Unknown/Insider build) Using hyperv isolation Files in c:\bcartifacts.cache\c32c41ui.ikq\my: Copying Platform Artifacts c:\bcartifacts.cache\sandbox\23.5.16502.17828\platform Copying Database Copying Licensefile Copying ConfigurationPackages C:\bcartifacts.cache\sandbox\23.5.16502.17828\gb\ConfigurationPackages Copying Extensions C:\bcartifacts.cache\sandbox\23.5.16502.17828\gb\Extensions Copying Applications.GB C:\bcartifacts.cache\sandbox\23.5.16502.17828\gb\Applications.GB c:\bcartifacts.cache\c32c41ui.ikq Sending build context to Docker daemon 2.571GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.20348.2340 ---> c4cd601a3c1b Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcartifacts.azureedge.net/sandbo x/23.5.16502.17828/gb filesOnly=False ---> Running in d5030fcc2b87 New-Bcimage Telemetry Correlation Id: 3de8646c-5061-4028-8279-85131418d96d New-BcContainer Telemetry Correlation Id: 8c0459ae-1c1c-43c7-beb7-6c5531617284 DockerDo : hcsshim::PrepareLayer failed in Win32: The system cannot find the path specified. (0x3) ExitCode: 1 Commandline: docker build --isolation=hyperv --memory 8G --no-cache --tag bcnwtest004img:sandbox-23.5.16502.17828-gb-mt c:\bcartifacts.cache\c32c41ui.ikq At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.0\ContainerHandling\New-NavImage.ps1:694 char:27