navcontainerhelper icon indicating copy to clipboard operation
navcontainerhelper copied to clipboard

The container image contains a layer with an unrecognized format. The host upgraded to Windows 11 25H2.

Open jmaciejewskitozepterit opened this issue 1 month ago • 14 comments

Describe the issue My PC is upgraded to Windows 11 Version 25H2. And no the Docker containers with BC don't work any more.

Scripts used to create container and cause the issue

BcContainerHelper is version 6.1.8
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Pro - 10.0.26200.7019
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 28.5.1
Docker Server Version is 28.5.1
Removing Desktop shortcuts
Downloading artifact /onprem/25.0.23364.25445/w1
Downloading C:\Users\jacek\AppData\Local\Temp\b2cd137c-5f9b-4363-b47d-986559a831c9.zip
Unpacking artifact to tmp folder using 7zip
Downloading platform artifact /onprem/25.0.23364.25445/platform
Downloading C:\Users\jacek\AppData\Local\Temp\712ed8f1-3728-472b-97e8-d5f45977d39f.zip
Unpacking artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading D:\Artifacts.cache\onprem\25.0.23364.25445\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Downloading D:\Artifacts.cache\onprem\25.0.23364.25445\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Building image w1-bc250:onprem-25.0.23364.25445-w1 based on mcr.microsoft.com/businesscentral:ltsc2025 with https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/onprem/25.0.23364.25445/w1
Pulling latest image mcr.microsoft.com/businesscentral:ltsc2025
ltsc2025: Pulling from businesscentral
Digest: sha256:72ec9b49eba0641ce8569ae84425b0ff4a83009ba32be0938f844937a7068e62
Status: Image is up to date for mcr.microsoft.com/businesscentral:ltsc2025
mcr.microsoft.com/businesscentral:ltsc2025
Generic Tag: 1.0.2.81
Container OS Version: 10.0.26100.6899 (ltsc2025)
Host OS Version: 10.0.26200.7019 (Unknown/Insider build)
Using hyperv isolation
Using license file d:/ZEPTER/FLF/ZIT/ZITBC250.bclicense
Files in D:\Artifacts.cache\1vq3igdo.orq\my:
Copying Platform Artifacts
D:\Artifacts.cache\onprem\25.0.23364.25445\platform
Copying Database
Copying Licensefile
D:\Artifacts.cache\1vq3igdo.orq
Sending build context to Docker daemon  2.554GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:ltsc2025
 ---> b3d66b5189ea
Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=N artifactUrl=https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/onprem/25.0.23364.25445/w1 filesOnly=False
 ---> Running in c2d6f484ef0c
New-Bcimage Telemetry Correlation Id: e1fd3256-5cca-4bf1-b498-4387d64c41f9
New-BcContainer Telemetry Correlation Id: 2a2b35f5-0c98-42a9-938b-dfbc06fe70e5
DockerDo : hcsshim::PrepareLayer failed in Win32: The container image contains a layer with an unrecognized format. (0x
c0370112)
ExitCode: 1
Commandline: docker build --isolation=hyperv --memory 8G --no-cache --tag w1-bc250:onprem-25.0.23364.25445-w1 D:\Artifa
cts.cache\1vq3igdo.orq
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.1.8\ContainerHandling\New-NavImage.ps1:647 char:27
+ ...       if (!(DockerDo -command build -parameters @("--isolation=$isola ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo

jmaciejewskitozepterit avatar Nov 03 '25 09:11 jmaciejewskitozepterit

It looks like it is trying to build an image - if you remove the imagename parameter, does it then start the container? i.e. try with the simplest container generation. That works here - and also try to clean up your docker file system maybe using this https://freddysblog.com/2018/12/11/clean-up-after-yourself-docker-your-mom-isnt-here/

freddykristiansen avatar Nov 04 '25 07:11 freddykristiansen

I've been using this script for almost two years. It worked well.

After upgrading to Windows 11 version 25H2, it stopped working.

Is this operating system information important? Container OS Version: 10.0.26100.6899 (ltsc2025) Host OS Version: 10.0.26200.7019 (Unknown/Insider build)

When I removed the imagename paramter, it does not start

BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on Windows, PowerShell 5.1.26100.7019
think-book-pl\jacek does NOT have modify permissions to C:\WINDOWS\System32\drivers\etc\hosts
You need to run as administrator or you can run Check-BcContainerHelperPermissions -Fix to fix permissions
Downloading Platform index to C:\Users\jacek\AppData\Local\Temp\bcContainerHelper.platform.json
Downloading w1 index to C:\Users\jacek\AppData\Local\Temp\bcContainerHelper.w1.json
VERBOSE: Current build is https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.0.38460.41773/w1
Downloading Platform index to C:\Users\jacek\AppData\Local\Temp\bcContainerHelper.platform.json
Downloading w1 index to C:\Users\jacek\AppData\Local\Temp\bcContainerHelper.w1.json
VERBOSE: Periodic build is https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.0.38460.41701/w1

Name                           Value
----                           -----
Verbose                        1
accept_insiderEula             True
StorageAccount                 BcPublicPreview
Select                         Weekly
Country                        w1



w1-bc260 artifactUrl: https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.0.38460.41701/w1
w1-bc260 CRONUS


Name                           Value
----                           -----
accept_eula                    True
additionalParameters           {--cpu-count 8, --dns=8.8.8.8}
alwaysPull                     False
artifactUrl                    https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.0.38460.41701/w1
assignPremiumPlan              True
auth                           NavUserPassword
containerName                  w1-bc260
credential                     System.Management.Automation.PSCredential
doNotExportObjectsToText       True
enableSymbolLoading            False
enableTaskScheduler            False
forceRebuild                   True
includeCSIDE                   False
includePerformanceToolkit      False
includeTestFrameworkOnly       False
includeTestLibrariesOnly       True
includeTestToolkit             True
licenseFile                    d:/FLF/BC250.bclicense
memoryLimit                    8G
multitenant                    False
shortcuts                      StartMenu
updateHosts                    True
verbose                        True



BcContainerHelper is version 6.1.8
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Pro - 10.0.26200.7019
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 28.5.1
Docker Server Version is 28.5.1
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:ltsc2025
Creating Container w1-bc260
Style: sandbox
Multitenant: No
Version: 27.0.38460.41701
Platform: 27.0.41689.0
Generic Tag: 1.0.2.81
Container OS Version: 10.0.26100.6899 (ltsc2025)
Host OS Version: 10.0.26200.7019 (Unknown/Insider build)
Host OS is 26100 (24H2) or above, recommended isolation mode is hyperv. HyperV state is unknown, if you encounter problems you might need to install HyperV.
Using hyperv isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file d:/FLF/BC250.bclicense
Additional Parameters:
--cpu-count 8
--dns=8.8.8.8
--env customNavSettings=EnableTaskScheduler=False
Files in D:\BcContainerHelper\Extensions\w1-bc260\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.bclicense
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container w1-bc260 from image mcr.microsoft.com/businesscentral:ltsc2025
ba221f125e99a4b8c043694f6d04e381eef0b343bccbe9bfce859c0203cc651d
New-BcContainer Telemetry Correlation Id: 68a782bb-801d-4dc7-94ef-64f43de97d20
DockerDo : docker: Error response from daemon: hcs::CreateComputeSystem ba221f125e99a4b8c043694f6d04e381eef0b343bccbe9b
fce859c0203cc651d: The container image contains a layer with an unrecognized format.
Run 'docker run --help' for more information
ExitCode: 125
Commandline: docker run --volume "D:\Artifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=27.0.38460
.41701 --label platform=27.0.41689.0 --label country=W1 --env artifactUrl=https://bcartifacts-exdbf9fwegejdqak.b02.azur
efd.net/sandbox/27.0.38460.41701/w1 --env licenseFile="c:\run\my\license.bclicense" --name w1-bc260 --hostname w1-bc260
 --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=en-US --env databaseServer="" --env
 databaseInstance="" --volume "D:\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "D:\BcContainerHelper\Ex
tensions\w1-bc260\my:C:\Run\my" --isolation hyperv --restart unless-stopped --env filesOnly=False --memory 8G --env ena
bleApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d111
6743f0423413b16050a5345MgB8AE0AdABuAGcASABlAGkAcgBBAHAANgB5ADIASwBmADYAMwBXAGsANgBFAFEAPQA9AHwANgBiADkAZgAyADkAYQAzAGUA
NQBiADQAZQAxAGYAZAAwADAAMwBmAGYANgBiADQAMwA0ADkAYgBlADEAYQA3ADYAMAAyADYAMgA1ADIANgA0ADkAMQA5ADEAMgAxADUAZQA5ADkANABjAGM
ANwA2ADcAMgAwAGIAYQA5ADEAMAA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --cpu-count 8 --d
ns=8.8.8.8 --env customNavSettings=EnableTaskScheduler=False --env accept_eula=Y --env accept_outdated=Y --detach mcr.m
icrosoft.com/businesscentral:ltsc2025
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.1.8\ContainerHandling\New-NavContainer.ps1:1862 char:
15
+ ...       if (!(DockerDo -accept_eula -accept_outdated:$accept_outdated - ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo

jmaciejewskitozepterit avatar Nov 04 '25 12:11 jmaciejewskitozepterit

@jmaciejewskitozepterit

Is this operating system information important? Container OS Version: 10.0.26100.6899 (ltsc2025) Host OS Version: 10.0.26200.7019 (Unknown/Insider build)

If you are using an insider version of Windows 11, I would try going back to a "stable" version of windows to see if that mitigates your issue.

If that still doesn't help, could you share the logs for that run and the command you are running that is failing.

aholstrup1 avatar Nov 06 '25 10:11 aholstrup1

The current version of Windows 11 is Windows 11 version 25H2, also called the "Windows 11 2025 Update," which was released on September 30, 2025

Commandline: docker run --volume "D:\Artifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=27.0.38460
.41701 --label platform=27.0.41689.0 --label country=W1 --env artifactUrl=https://bcartifacts-exdbf9fwegejdqak.b02.azur
efd.net/sandbox/27.0.38460.41701/w1 --env licenseFile="c:\run\my\license.bclicense" --name w1-bc260 --hostname w1-bc260
 --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=en-US --env databaseServer="" --env
 databaseInstance="" --volume "D:\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "D:\BcContainerHelper\Ex
tensions\w1-bc260\my:C:\Run\my" --isolation hyperv --restart unless-stopped --env filesOnly=False --memory 8G --env ena
bleApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d111
6743f0423413b16050a5345MgB8AEgAcAB3AGsANwB3AGkAdwBzAEUAVwBDAFIAKwA2ADcAbQBQADQARAA4AHcAPQA9AHwAMwA2ADUAYwA5ADEAYQBhADUA
MwAzAGEAYwBjADgANgA2ADIAZAA5ADQANQBkADgANQBiAGMANgA4ADIAMQA4AGYAOABkADEAOAA1ADYANwBmAGYANAA1AGUAMgA2ADkAYgBjAGQAOQBiAGU
AYgAzADIAZgAzADkANwAzADMANwA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --cpu-count 8 --d
ns=8.8.8.8 --env customNavSettings=EnableTaskScheduler=False --env accept_eula=Y --env accept_outdated=Y --detach mcr.m
icrosoft.com/businesscentral:ltsc2025

Windows event log:

External DNS servers for 'w1-bc260': [8.8.8.8] [nid=9cc1c642a1e6e8fb8a9305e45fbc8f9a923935bf6cb26ea5a8d2b137b603c523 net=nat eid=a9a056b342eb628e7818c7f1bf25143204091ecaa384ece65825617406ac2f16 ep=w1-bc260]

Handler for POST /v1.51/containers/7c531e3413b2731e24ee3d943f2108b96f53dfb0e4a08a90598f96f54b05c74d/start returned error: hcs::CreateComputeSystem 7c531e3413b2731e24ee3d943f2108b96f53dfb0e4a08a90598f96f54b05c74d: The container image contains a layer with an unrecognized format.

jmaciejewskitozepterit avatar Nov 06 '25 10:11 jmaciejewskitozepterit

I haven't been able to repro this so far. Did you try the steps Freddy mentioned in his comment to clean up containers, images and the bccontainerhelper folder? https://freddysblog.com/2018/12/11/clean-up-after-yourself-docker-your-mom-isnt-here/

aholstrup1 avatar Nov 06 '25 11:11 aholstrup1

I haven't used Freddy's script yet. I have a dozen containers for different BC versions generated months ago and they work perfectly. I can't create a new container. If I delete them all, I'm not sure I'll be able to recreate them.

jmaciejewskitozepterit avatar Nov 06 '25 12:11 jmaciejewskitozepterit

I am facing a similar problem now on my PC upgraded to Windows 11 25H2.

Using this command.

New-BCContainer bc28 -artifactUrl $bcartifacturl -auth NavUserPassword -Credential $credential -accept_eula -accept_outdated -accept_insiderEula -updateHosts -assignPremiumPlan -doNotCheckHealth -dns 8.8.8.8 -includeAL -isolation hyperv -useGenericImage "$(Get-BestGenericImageName)-dev" -runSandboxAsOnPrem -memoryLimit 8G

And this is the output.

BcContainerHelper is version 6.1.9 BcContainerHelper is running as administrator Cannot check Hyper-V status. HyperV is Unknown Host is Microsoft Windows 11 Pro - 10.0.26200.7019 UsePsSession is True UsePwshForBc24 is True UseWinRmSession is never UseSslForWinRmSession is True Docker Client Version is 28.5.1 Docker Server Version is 28.5.1 Removing entries from hosts Removing bc28 from container hosts file Removing bc28-* from container hosts file Removing Desktop shortcuts Removing D:\BcContainerHelper\Extensions\bc28 Fetching all docker images Fetching all docker volumes Using image mcr.microsoft.com/businesscentral:ltsc2025-dev Disabling Health Check (always report healthy) Creating Container bc28 Style: onprem Multitenant: No Version: 28.0.41929.0 Platform: 28.0.41889.0 Generic Tag: 1.0.2.83-dev Container OS Version: 10.0.26100.6905 (ltsc2025) Host OS Version: 10.0.26200.7019 (Unknown/Insider build) Cannot check Hyper-V status. Using hyperv isolation Using locale da-DK Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in D:\BcContainerHelper\Extensions\bc28\my:

  • AdditionalOutput.ps1
  • HelperFunctions.ps1
  • MainLoop.ps1
  • SetupNavUsers.ps1
  • SetupVariables.ps1
  • updatehosts.ps1 Creating container bc28 from image mcr.microsoft.com/businesscentral:ltsc2025-dev 6e054e7f8b30d108001cc29951a037b34153f6e20da5fc272baec038f8133494 Write-Error: C:\Users\ellocal\Documents\PowerShell\Modules\BcContainerHelper\6.1.9\ContainerHandling\New-NavContainer.ps1:1862:15 Line | 1862 | … if (!(DockerDo -accept_eula -accept_outdated:$accept_outdated - … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | docker: Error response from daemon: hcs::CreateComputeSystem 6e054e7f8b30d108001cc29951a037b34153f6e20da5fc272baec038f8133494: The container image | contains a layer with an unrecognized format. Run 'docker run --help' for more information ExitCode: 125 Commandline: docker run --dns 8.8.8.8
    | --no-healthcheck --volume "D:\Artifacts.cache:c:\dl" --label nav= --env isBcSandbox=N --label version=28.0.41929.0 --label platform=28.0.41889.0
    | --label country=DK --env artifactUrl=https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.41929.0/dk --env licenseFile="" --name bc28
    | --hostname bc28 --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=da-DK --env databaseServer="" --env | databaseInstance="" --volume "D:\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "D:\BcContainerHelper\Extensions\bc28\my:C:\Run\my"
    | --isolation hyperv --restart unless-stopped --env filesOnly=False --memory 8G --env enableApiServices=Y --env useSSL=N --volume | "c:\windows\system32\drivers\etc:C:\driversetc" --env | securePassword=76492d1116743f0423413b16050a5345MgB8AFoAYgA3AEkARQA3AEgAawBZADEARQBQAEUAdgBCAHkAcQBZAFEAUgA0AHcAPQA9AHwAOQBmAGMAMQBjADcAMwA1AGQAZABkADAAZAA3ADcAZQA0AGMAYQAwADIANwBjADAAYgAxADcAZgBjAGMAOQA5ADgANwBkADYAOAAxADUAYwBjADEANwAzADMANABhADMAMwBhAGIAOQA1ADYAYgAxAGEANQA4ADUANAAwADgANQA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:ltsc2025-dev

If I pull a new OS image it does not help.

hsiungw avatar Nov 09 '25 10:11 hsiungw

Downloading and installing 7019 as we speak - let's see. Will try to create a container afterwards.

freddykristiansen avatar Nov 09 '25 12:11 freddykristiansen

I uninstall Docker Desktop 4.50.0 and reinstall 4.49.0 and give it another try and this time, I have created a business central docker container running without problem.

Maybe there is an issue with Docker Desktop 4.50.0?

hsiungw avatar Nov 09 '25 15:11 hsiungw

I don't know about Docker Desktop - I use Docker Engine (which is included in Docker Desktop) Above - the log states 28.5.1 - the latest Docker Engine is 28.5.2 - and that works. I assume that downgrade or upgrade can cleanup the filesystem on your machine - and then it works - I don't think there is a problem with a specific version of Docker. @aholstrup1 - I think you can close this as not repro.

freddydk avatar Nov 10 '25 13:11 freddydk

Same issue here, my docker updated to 4.50.0 last night along with a Windows update. Today I can't start existing containers or create new ones with this error: DockerDo : docker: Error response from daemon: hcs::CreateComputeSystem 4245009ca0b6988a0e86cbc896affa5aafda47f34f7c67e251bcd4470298f0de: The container image contains a layer with an unrecognized format.

SynPaul avatar Nov 13 '25 09:11 SynPaul

I got the same problem this morning. Running a full clean as we speak and I get back with a result in an hour.

NAVspecialist avatar Nov 14 '25 10:11 NAVspecialist

I removed the container and the Windows images and downloaded them again, it's fine now

SynPaul avatar Nov 14 '25 11:11 SynPaul

Using the good old'e freddy-your-mom-does-not-work-here-ps-script and a reboot got made it work again. Tested it with this

. "$PSScriptRoot\Parameterfile.ps1"

$containerName = 'bc365v24' $password = 'Passw0rd' $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $credential = New-Object pscredential 'admin', $securePassword $auth = 'UserPassword'

$shortcutstype = 'DesktopFolder' # None, Desktop or StartMenu $artifactUrl = Get-BcArtifactUrl -type Sandbox -version '24' -country 'dk' -select 'Latest'

New-BcContainer -accept_eula -accept_outdated -shortcuts $shortcutstype -containerName $containerName -credential $credential -auth $auth -artifactUrl $artifactUrl -dns '1.1.1.1' -updateHosts -memoryLimit '8G' -alwayspull -assignpremiumplan -licenseFile $BClicense

Could it be that the parameter -image mcr.microsoft.com/businesscentral:ltsc202x actually does not work as intended?

NAVspecialist avatar Nov 14 '25 11:11 NAVspecialist