microsoft / nav-docker

Official Microsoft repository for Dynamics NAV in Docker resources. It has not been decided yet, to which extend Microsoft will ship Docker images with NAV, so everything in this repo is work in progress and might be subject to deletion.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WindowsPowerShellScripts Removed Thus Business Central Installation Fails Using Custom Image

geschwint opened this issue · comments

The subfolder "WindowsPowerShellScripts" has been removed from the platform in Business Central 25.0, thus causing the creation of Business Central container to fail when copying PowerShell scripts. The missing folder remains missing in newer versions in bcinsider.

Error message is referring to non-existing folder "WindowsPowerShellScripts" when running RoboCopy.

Error:

Found version 25.0.23364.23629
Downloading artifact /sandbox/25.0.23364.23629/w1
Downloading C:\Users\stli01\AppData\Local\Temp\ef6e291e-3987-45b0-9d75-ecf2b09937ea.zip
Unpacking artifact to tmp folder using 7zip
c:\bcartifacts.cache\sandbox\25.0.23364.23629\w1
c:\bcartifacts.cache\sandbox\25.0.23364.23629\platform
Using local generic image: signup-dev-generic-sql2019-20240903:latest
BcContainerHelper is version 6.0.19
BcContainerHelper is running as administrator
HyperV is Disabled
Host is Microsoft Windows 11 Enterprise - 10.0.22621.4037
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 26.1.3
Docker Server Version is 26.1.3
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Building multitenant image w1:sandbox-25.0.23364.23629-w1-mt based on signup-dev-generic-sql2019-20240903:latest with https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.23364.23629/w1
Generic Tag: 1.0.2.43
Container OS Version: 10.0.20348.2655 (ltsc2022)
Host OS Version: 10.0.22621.4037 (22H2)
Using HyperV isolation
Using license file *********
Downloading c:\bcartifacts.cache\scgz4lm4.qpj\my\license.bclicense
Files in c:\bcartifacts.cache\scgz4lm4.qpj\my:
- license.bclicense
Copying Platform Artifacts
c:\bcartifacts.cache\sandbox\25.0.23364.23629\platform
Copying Database
Copying Licensefile
Copying Extensions
C:\bcartifacts.cache\sandbox\25.0.23364.23629\w1\Extensions
c:\bcartifacts.cache\scgz4lm4.qpj
Sending build context to Docker daemon  2.853GB

Step 1/6 : FROM signup-dev-generic-sql2019-20240903:latest
 ---> a39f23eaefdc
Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.23364.23629/w1 filesOnly=False
 ---> Running in 2b629d57a6fa
 ---> Removed intermediate container 2b629d57a6fa
 ---> cf3377ec348f
Step 3/6 : COPY my /run/
 ---> f48ed04948f1
Step 4/6 : COPY NAVDVD /NAVDVD/
 ---> b62527c5eaeb
Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant
 ---> Running in 0fc0f0dabcd0
c:\run\my folder doesn't exist, creating it
Using DVD installer from C:\Run\240
Installing Business Central: multitenant=True, installOnly=True, filesOnly=False, includeTestToolkit=False, includeTestLibrariesOnly=False, includeTestFrameworkOnly=False, includePerformanceToolkit=False, appArtifactPath=, platformArtifactPath=, databasePath=, licenseFilePath
=, rebootContainer=False
Installing from DVD
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
C:\NAVDVD\ServiceTier\Program Files
C:\NAVDVD\ServiceTier\System64Folder
Copying PowerShell Scripts
C:\NAVDVD\WindowsPowerShellScripts\Cloud\NAVAdministration
Cannot find path 'C:\NAVDVD\WindowsPowerShellScripts\Cloud\' because it does not exist.
Installation failed
At C:\Run\start.ps1:399 char:9
+         throw "Installation failed"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Installation failed:String) [ 
   ], RuntimeException
    + FullyQualifiedErrorId : Installation failed
 
New-Bcimage Telemetry Correlation Id: e4befb68-ac0f-4563-981f-cf83a977b5a7
New-BcContainer Telemetry Correlation Id: 136ecfac-7588-4654-b04f-482852949301
DockerDo : The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; \Run\start.ps1 -installOnly -multitenant' returned a non-zero code: 1
ExitCode: 1
Commandline: docker build --isolation=HyperV --memory 16G --no-cache --tag w1:sandbox-25.0.23364.23629-w1-mt c:\bcartifacts.cache\scgz4lm4.qpj
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.19\ContainerHandling\New-NavImage.ps1:711 char:27
+ ...       if (!(DockerDo -command build -parameters @("--isolation=$isola ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo

What is the command you are running here? and the full log?
(and please remember to format as code)

I can see you have the full output - but not the command

Just tried with the latest BcContainerHelper - works fine.

Hi Freddy

The error comes from the command

Write-Host "Copying PowerShell Scripts" RoboCopyFiles -Source "$navDvdPath\WindowsPowerShellScripts\Cloud\NAVAdministration" -Destination "$runPath\NAVAdministration" -e

in the file navinstall.ps1. Running this on BC25 fails as the folder WindowsPowerShellScripts is missing in the platform

I understood that, but please specify the command you are using to get to this problem
I just created a container and an image with the latest insider build - works fine.

So, you must be doing something different than me

I close this case and humbly apologize as I missed the change you made for BC24 fixes when I merged over to our own scripting base.

You fixed this for BC24 so it is not an issue.

PS. ... doing something different, indeed