microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
382 stars 246 forks source link

Initialization of container failed #2539

Closed NubizPRLI closed 2 years ago

NubizPRLI commented 2 years ago

Getting this error when trying to create a NAV2016 version i Docker

New-BCContainer Telemetry Correlation Id: 6bcb5dd1-3ac7-48d2-9e93-28c73fba23ac Initialization of container GH2016 failed At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.10\ContainerHandling\Wait-NavContainerReady.ps1:42 char:17

Describe the issue A clear and concise description of what the issue is.

Scripts used to create container and cause the issue

$artifacturl = Get-BCArtifactUrl -type OnPrem -version 9.0.50682.0 -country dk -select First
$credential = New-Object pscredential 'XXXXXXX', (ConvertTo-SecureString -String 'XXXXXXX' -AsPlainText -Force)
$containerName = 'GH2016'

New-BCContainer -accept_eula -containerName $containerName -artifactUrl $artifacturl -auth NavUserPassword -Credential $credential -updateHosts -shortcuts DesktopFolder -isolation hyperv -licenseFile "C:\Users\XXXXXXX\Documents\Business Central licenser\NAV2016\NAV2016.flf" -dns 8.8.8.8

**Full output of scripts**

PS C:\WINDOWS\system32> C:\Users\XXXXXXX\Documents\PowerShell\Opret ny container BC9.0.50682.0.ps1 BcContainerHelper is version 3.0.10 BcContainerHelper is running as administrator Hyper-V is Enabled UsePsSession is True Host is Microsoft Windows 11 Pro - 21H2 Docker Client Version is 20.10.16 Docker Server Version is 20.10.16 Removing Session GH2016 Removing container GH2016 Removing entries from hosts Removing GH2016 from container hosts file Removing GH2016-* from container hosts file Removing Desktop shortcuts Removing C:\ProgramData\BcContainerHelper\Extensions\GH2016 Fetching all docker images Fetching all docker volumes Using image mcr.microsoft.com/businesscentral:10.0.20348.768 Creating Container GH2016 Style: onprem Multitenant: No Version: 9.0.50682.0 Platform: 9.0.50682.0 Generic Tag: 1.0.2.7 Container OS Version: 10.0.20348.768 (ltsc2022) Host OS Version: 10.0.22000.708 (21H2) Using hyperv isolation Using locale da-DK Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Using license file C:\Users\XXXXXXX\Documents\Business Central licenser\NAV2016\NAV2016.flf Files in C:\ProgramData\BcContainerHelper\Extensions\GH2016\my:

Screenshots image

Thanks in advance

Preben Lindahl

NubizPRLI commented 2 years ago

Hi Freddy

Use then following script:

-myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/SelfSignedCertificateEx/SetupCertificate.ps1")

and it worked

So please close this issue

Many thanks

Preben