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.
MIT License
179 stars 91 forks source link

Initialization of container failed error while Host Locally Business Central Cloud Ver-16.0.11240.11946 #463

Closed Sandygitl closed 4 years ago

Sandygitl commented 4 years ago

I am using below powershell commands :

install-module navcontainerhelper -force

set accept_eula to $true to accept the eula found here: https://go.microsoft.com/fwlink/?linkid=861843

$accept_eula = $false

$containername = '' $navdockerimage = 'mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us' $appbacpacuri = '' $tenantbacpacuri = ''

$additionalParameters = @() if ($appbacpacuri -ne '' -and $tenantbacpacuri -ne '') { $additionalParameters = @("--env appbacpac=""$appbacpacuri""","--env tenantBacpac=""$tenantbacpacuri""") }

$credential = get-credential -UserName $env:USERNAME -Message "Using Windows Authentication. Please enter your Windows credentials." New-NavContainer -accept_eula:$accept_eula -containername $containername -auth Windows -Credential $credential -includeal -includetesttoolkit -alwaysPull -doNotExportObjectsToText -usessl:$false -updateHosts -assignPremiumPlan -shortcuts Desktop -imageName $navdockerimage ` -additionalParameters $additionalParameters

Below is the error message : Initialization of container testautomation failed At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.5.10\ContainerHandling\Wait-NavContainerReady.ps1:44 char:17

freddydk commented 4 years ago

Please provide the full output of the command and please format it with the "insert Code" (next to bold, italic etc)

Sandygitl commented 4 years ago

Hi Freddydk,

Thanks for the immediate response. Below is the full output of command :

PS C:\WINDOWS\system32> New-NavContainer -accept_eula:$accept_eula -containername $containername -auth Windows -Credential $credential -includeal -includetesttoolkit -alwaysPull -doNotExportObjectsToText -usessl:$false -updateHosts -assignPremiumPlan -shortcuts Desktop -imageName $navdockerimage ` -additionalParameters $additionalParameters NavContainerHelper is version 0.6.5.10 NavContainerHelper is running as administrator Host is Microsoft Windows 10 Enterprise - 1909 Docker Client Version is 19.03.8 Docker Server Version is 19.03.8 Pulling image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 16.0.11240.11946-us-ltsc2019: Pulling from businesscentral/sandbox Using image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 Removing testautomation from host hosts file Removing C:\ProgramData\NavContainerHelper\Extensions\testautomation Creating Container testautomation Version: 16.0.11240.11946-us Style: sandbox Platform: 16.0.11233.11920 Generic Tag: 0.0.9.99 Container OS Version: 10.0.17763.973 (ltsc2019) Host OS Version: 10.0.18363.836 (1909) The container operating system does not match the host operating system, forcing hyperv isolation. Using locale en-US Using hyperv isolation Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:

  • AdditionalOutput.ps1
  • MainLoop.ps1
  • SetupNavUsers.ps1
  • SetupVariables.ps1
  • updatehosts.ps1 Creating container testautomation from image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 2ff5d4187bbeaedf6341ddc4d7429d523c0604512adeb7f4e131bd2502c05ca6 Waiting for container testautomation to be ready Initializing... Setting host.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting gateway.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file) Setting host.containerhelper.internal to 172.25.176.1 in container hosts file Starting Container Hostname is testautomation PublicDnsName is testautomation You are trying to run a container which is more than 90 days old. Microsoft recommends that you always run the latest version of our containers. Set the environment variable ACCEPT_OUTDATED to 'Y' if you want to run this container anyway. at , C:\Run\navstart.ps1: line 54 at , C:\Run\start.ps1: line 121 at , : line 1Error Initializing... Setting host.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting gateway.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file) Setting host.containerhelper.internal to 172.25.176.1 in container hosts file Starting Container Hostname is testautomation PublicDnsName is testautomation You are trying to run a container which is more than 90 days old. Microsoft recommends that you always run the latest version of our containers. Set the environment variable ACCEPT_OUTDATED to 'Y' if you want to run this container anyway. at , C:\Run\navstart.ps1: line 54 at , C:\Run\start.ps1: line 121 at , : line 1 Initialization of container testautomation failed At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.5.10\ContainerHandling\Wait-NavContainerReady.ps1:44 char:17
  • ... throw "Initialization of container $containerName failed" ...
  • 
    + CategoryInfo          : OperationStopped: (Initialization ...tomation failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container testautomation failed
freddydk commented 4 years ago

Add -accept_outdated to the new-navcontainer command.

Sandygitl commented 4 years ago

Thanks Freddydk. That issues is resolved by using -accept_outdated command but getting below error now. It seems to be related to setting up of SA password. Below is the output of command.

PS C:\WINDOWS\system32> New-NavContainer -accept_eula:$accept_eula -accept_outdated -containername $containername -auth Windows -Credential $credential -includeal -includetesttoolkit -alwaysPull -doNotExportObjectsToText -usessl:$false -updateHosts -assignPremiumPlan -shortcuts Desktop -imageName $navdockerimage -additionalParameters $additionalParameters NavContainerHelper is version 0.6.5.10 NavContainerHelper is running as administrator Host is Microsoft Windows 10 Enterprise - 1909 Docker Client Version is 19.03.8 Docker Server Version is 19.03.8 Pulling image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 16.0.11240.11946-us-ltsc2019: Pulling from businesscentral/sandbox Digest: sha256:49343c50398ba12766d44037633513094d1d6da16ed7b75bb566a2162d7c398e Status: Image is up to date for mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 Using image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 Removing container testautomation Removing testautomation from host hosts file Removing C:\ProgramData\NavContainerHelper\Extensions\testautomation Creating Container testautomation Version: 16.0.11240.11946-us Style: sandbox Platform: 16.0.11233.11920 Generic Tag: 0.0.9.99 Container OS Version: 10.0.17763.973 (ltsc2019) Host OS Version: 10.0.18363.836 (1909) The container operating system does not match the host operating system, forcing hyperv isolation. Using locale en-US Using hyperv isolation Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:

  • AdditionalOutput.ps1
  • MainLoop.ps1
  • SetupNavUsers.ps1
  • SetupVariables.ps1
  • updatehosts.ps1 Creating container testautomation from image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 b98fd6ee1b7d719a0b3db2f5e771b56520227d4fb5addcd9e7f5410e4a2d43a3 Waiting for container testautomation to be ready Initializing... Setting host.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting gateway.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file) Setting host.containerhelper.internal to 172.25.176.1 in container hosts file Starting Container Hostname is testautomation PublicDnsName is testautomation Using Windows Authentication Starting Local SQL Server Starting Internet Information Server Modifying Service Tier Config File with Instance Specific Settings Starting Service Tier Registering event sources Creating DotNetCore Web Server Instance Enabling Financials User Experience Creating http download site Creating Windows user sandy Setting SA Password and enabling SA Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=5327; handshake=6153; [Login] initialization=238; authentication=3514; [Post-Login] complete=3008; at , C:\Run\SetupSqlUsers.ps1: line 13 at , C:\Run\navstart.ps1: line 183 at , C:\Run\start.ps1: line 121 at , : line 1Error Initializing... Setting host.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting gateway.docker.internal to 192.168.0.102 in container hosts file (copy from host hosts file) Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file) Setting host.containerhelper.internal to 172.25.176.1 in container hosts file Starting Container Hostname is testautomation PublicDnsName is testautomation Using Windows Authentication Starting Local SQL Server Starting Internet Information Server Modifying Service Tier Config File with Instance Specific Settings Starting Service Tier Registering event sources Creating DotNetCore Web Server Instance Enabling Financials User Experience Creating http download site Creating Windows user sandy Setting SA Password and enabling SA Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=5327; handshake=6153; [Login] initialization=238; authentication=3514; [Post-Login] complete=3008; at , C:\Run\SetupSqlUsers.ps1: line 13 at , C:\Run\navstart.ps1: line 183 at , C:\Run\start.ps1: line 121 at , : line 1 Initialization of container testautomation failed At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.5.10\ContainerHandling\Wait-NavContainerReady.ps1:44 char:17
  • ... throw "Initialization of container $containerName failed" ...
  • 
    + CategoryInfo          : OperationStopped: (Initialization ...tomation failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container testautomation failed
freddydk commented 4 years ago

Have never seen that before - did you provide your windows credentials - else you can change to UserPassword authentication.

Sandygitl commented 4 years ago

I login in my system with 4 digit pin. So I given my Windows User ID and new password for windows credentials. Will try to change authentication type as NavUserPassword. Thanks!

Sandygitl commented 4 years ago

Below is the output of command .

PS C:\WINDOWS\system32> New-NavContainer -accept_eula:$accept_eula -accept_outdated -containername $containername -auth Navuserpassword -includeal -includetesttoolkit -alwaysPull -doNotExportObjectsToText -usessl:$false -updateHosts -assignPremiumPlan -shortcuts Desktop -imageName $navdockerimage ` -additionalParameters $additionalParameters NavContainerHelper is version 0.6.5.10 NavContainerHelper is running as administrator Host is Microsoft Windows 10 Enterprise - 1909 Docker Client Version is 19.03.8 Docker Server Version is 19.03.8 Pulling image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 16.0.11240.11946-us-ltsc2019: Pulling from businesscentral/sandbox Digest: sha256:49343c50398ba12766d44037633513094d1d6da16ed7b75bb566a2162d7c398e Status: Image is up to date for mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 Using image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 Removing testautomation from host hosts file Removing C:\ProgramData\NavContainerHelper\Extensions\testautomation Creating Container testautomation Version: 16.0.11240.11946-us Style: sandbox Platform: 16.0.11233.11920 Generic Tag: 0.0.9.99 Container OS Version: 10.0.17763.973 (ltsc2019) Host OS Version: 10.0.18363.836 (1909) The container operating system does not match the host operating system, forcing hyperv isolation. Using locale en-US Using hyperv isolation Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:

  • AdditionalOutput.ps1
  • MainLoop.ps1
  • SetupNavUsers.ps1
  • SetupVariables.ps1
  • updatehosts.ps1 Creating container testautomation from image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 7ae58a4b142ff6dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3

Below error message is coming now.

DockerDo : docker.exe: Error response from daemon: hcsshim::CreateComputeSystem 7ae58a4b142ff6dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3: This operation returned because the timeout period expired. (extra info: {"SystemType":"Container","Name":"7ae58a4b142ff6dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3","Own er":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\ProgramData\Docker\windowsfilter\7ae58a4b142ff6 dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3","Layers":[{"ID":"0e3660b0-5a8c-5457-a824-03670fc915ef","Path":"C: \ProgramData\Docker\windowsfilter\bdd73d42051e0f85164e0d71bb40cf9a4c73011e42a3badd7ff4b6931b9a035e"},{"ID":"fc7d4 b09-d1b3-5d98-8fb6-e6a5743baf77","Path":"C:\ProgramData\Docker\windowsfilter\aae88c9b1fc5860003fbcf466d41c4bfcc3b 2ee7e21eb2ab6bc60fb9201acb40"},{"ID":"c5433675-dbab-56d0-83a1-cda6a8046a5b","Path":"C:\ProgramData\Docker\windowsf ilter\38b4ffb33ba6ee4fe693abbdda24044409cd90dee4842e1ecf90927eefa10b9e"},{"ID":"6ee58b5f-30c8-5b30-9bba-6b9f3df1f1e3 ","Path":"C:\ProgramData\Docker\windowsfilter\6a5e3353575cd906b72268458a6c6711896e42d36f601bcaafe15d85bd993233"}, {"ID":"3a7b086e-5cf9-51a6-af36-929a7dbde23c","Path":"C:\ProgramData\Docker\windowsfilter\2736adc1046ad9d81094ae65 bb8b1b96ee678924d3f4c002c0fbef30438f8b43"},{"ID":"9cc733d3-0b61-525b-b9c9-13a2e2fd0b3e","Path":"C:\ProgramData\Dock er\windowsfilter\d31e00d61bb8aac5367f630a38486fee4cfd1d4417534a3c2858e84ba97def4e"},{"ID":"3b84249d-bdc5-5488-8024- 59a5556e6794","Path":"C:\ProgramData\Docker\windowsfilter\dc6fd12cb01c7c311e1f06a75324496cfba2789ea79278e20ffd9d4 c316aa108"},{"ID":"fc37c248-472c-5275-a229-7b15eaceae39","Path":"C:\ProgramData\Docker\windowsfilter\6f56da4515ad 8dad950127cc3ceec86fff283866e0444e4c147089209a0622ec"},{"ID":"7aa08aef-e418-53c3-8a5a-0ffd4fef89bc","Path":"C:\Progr amData\Docker\windowsfilter\1c3ce3350a103b7c60e6c61af41c91ecc39402d404aa77df770d4e76fbc3326a"},{"ID":"33b5f1d6-7bc b-5a70-a1f8-5615ead4bb0d","Path":"C:\ProgramData\Docker\windowsfilter\c6e5bf995d7c9250312ca41a1ccec0edf0a85d5553a 2bf38755fadc80662105f"},{"ID":"90892a9b-4f82-5ca9-b4c9-3c132afb540e","Path":"C:\ProgramData\Docker\windowsfilter\ 0eb8e7e563e2e5577ea17d1e7070159bf973e0b0ff5fdbb1c76fbb887746322b"},{"ID":"85516cce-c2ad-524b-8500-b56ea6811610","Path ":"C:\ProgramData\Docker\windowsfilter\97a904b67233af22a08d9477ecccb2284135361c86c967b2b7b5c1bccae88fb9"},{"ID":" 61b04e42-bb1e-59e2-b146-71fa44213f0b","Path":"C:\ProgramData\Docker\windowsfilter\e90f63b4a489203ca769122237a0094 11ba7b22dd85c6bd5ad8fd452c6415749"},{"ID":"68841545-2318-5b04-92bd-12fe2200918c","Path":"C:\ProgramData\Docker\win dowsfilter\37dd3a1888968bae3d6784e6313b92382c533dfccf2e83c6b579d2d00421bef5"},{"ID":"98a7021f-61ea-5ee3-a28b-b84e367 804ae","Path":"C:\ProgramData\Docker\windowsfilter\db42347b757b818aa3a0efaabcb5f2d2dd3eab69ee3ffd276542d6067db153 d7"},{"ID":"03b06c4d-0b76-5efa-838f-f287b045aff6","Path":"C:\ProgramData\Docker\windowsfilter\d875abec686e36b2113 93c3ed38a416eb0e585b543694a1d51f17c5ad153d8b1"},{"ID":"e567b7f8-14f6-5d40-b423-bb803cc15e87","Path":"C:\ProgramData\ \Docker\windowsfilter\16ed94de27821cbe208ac1c130f9543186030614b4f2caf2cf375e933a3515c1"},{"ID":"186d444d-890a-56f5- 9b86-de07439a1108","Path":"C:\ProgramData\Docker\windowsfilter\e7a21afc463af6c0a8c38a3fb7a0af3122d9667823c8c2b145 c8a86b038592e3"},{"ID":"be5777fb-8ccb-5ec0-beee-2c1077013d6a","Path":"C:\ProgramData\Docker\windowsfilter\ecc208c 7134bd5a8e2ccd9e36f29edd9ba953e1b339db6646b0bc1f87f589c4f"},{"ID":"90b288f9-2f52-58cf-a3bc-aad4d92af9f2","Path":"C:\ ProgramData\Docker\windowsfilter\c481c61adf2962e584f7fcf206baaf9666475bddc76641640dddeec2c205a47b"},{"ID":"b444a6b 3-f7c0-51bf-bd4b-e3f48d038522","Path":"C:\ProgramData\Docker\windowsfilter\34a64367f9070aa52039354bc43287a41ced98 f77391e76af648eb88b96561a2"},{"ID":"288979dc-27b1-5368-a905-b6a28aa7ca78","Path":"C:\ProgramData\Docker\windowsfil ter\104790799f3ae799e02202ddcf032e5290f1e94d7bcded33f3db06b1cd921e5c"},{"ID":"4030b5b2-5b8f-5e2e-a2ff-1cf4b6e71d01", "Path":"C:\ProgramData\Docker\windowsfilter\220c99fd06ed49e0aa562afcd9e5150696ebd8d92c3ccaeb1654adec611a00a7"},{" ID":"6fa53681-68f8-57ab-809c-78075f0c009b","Path":"C:\ProgramData\Docker\windowsfilter\c9f16e7d8d62fea61e288b3ec4 405d2a891bed4796fe948dd1984c17ffa6d33b"},{"ID":"f24b4288-6bad-5e18-969a-d0297500fc54","Path":"C:\ProgramData\Docker \windowsfilter\d7ea524383279664e4631eafaa2722df275bf80861143a77cb48acd8b8ab2b72"},{"ID":"54990003-72d7-52b4-8301-01 f23201f6b3","Path":"C:\ProgramData\Docker\windowsfilter\d3a049e92b30c50d5a00ecd198c26f731917afb4c5a45135b55c2b578 b0831bf"},{"ID":"c4a231af-8f37-5be5-a136-19253f379d67","Path":"C:\ProgramData\Docker\windowsfilter\1a23a7fee22e19 e5ab59ed9198e387db9d060d08c62e93cdb75fc195fe925d54"},{"ID":"16f211fe-69a1-5744-99ee-5b56ec35fbf4","Path":"C:\Program Data\Docker\windowsfilter\1ad40aeb34ece5f7f8ef3d2092909470247ef88fab99d9aaf7c22d43cfed488a"},{"ID":"9aa1bc77-d1f8- 5b0d-aa6a-6f874bd0feb0","Path":"C:\ProgramData\Docker\windowsfilter\200987e366b5d22a01cbf61781b81e57d3722fa89923c d3d2522ebe1cb26f7b9"},{"ID":"1d073c34-ef63-572d-99fc-1b04ae28315d","Path":"C:\ProgramData\Docker\windowsfilter\03 cb90dc4e3f0e8296702dbfcaf2c687a46d68b723a6e1754425b36df399d946"},{"ID":"b80b1f37-433c-51a0-a645-e99851ea5795","Path": "C:\ProgramData\Docker\windowsfilter\9a77d95e403c2d60978fd741bcede51dedf27895065e3ae6f7b60f9cb06522c2"},{"ID":"a6 231f9c-775d-5d45-a6eb-e65d0b84fa7a","Path":"C:\ProgramData\Docker\windowsfilter\37d15d741ecaa3e5562f33d774cdc6c12 5c8898ba066d3aa194e4cc3ea0c0dd9"},{"ID":"0b46f22f-7d10-5c5a-8ad9-176f9d559c9a","Path":"C:\ProgramData\Docker\windo wsfilter\c78e43fd3e7b7dd4cfa718b1bb2f168a6864f5f1b6420dbcbd24ecfe036b8a93"},{"ID":"a05232c0-cba3-5cb6-a8fb-e3a122b9d b07","Path":"C:\ProgramData\Docker\windowsfilter\6868ddc806056a8d061bd00ee3d96e49d00ccc5ba576ba17e34bd786d664a6aa "},{"ID":"a5907d1d-f76f-5a82-a78b-f8ded9cb5223","Path":"C:\ProgramData\Docker\windowsfilter\15397833d9d3955ed3245 b1fc5baa176660480151c3402c641d3d9be21d30388"},{"ID":"01dfcede-88d1-5e4d-8f46-d2f814ab5ed3","Path":"C:\ProgramData\D ocker\windowsfilter\9de923507dbd83ed9295a7a3242036d02edc75a0fa32de45f61ee683e19f0170"}],"MemoryMaximumInMB":4096,"H ostName":"testautomation","MappedDirectories":[{"HostPath":"c:\windows\system32\drivers\etc","ContainerPath":"c:\ \driversetc","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPath":"c:\progra mdata\navcontainerhelper","ContainerPath":"c:\programdata\navcontainerhelper","ReadOnly":false,"BandwidthMaximum": 0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPath":"c:\programdata\navcontainerhelper\extensions\testautoma tion\my","ContainerPath":"c:\run\my","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":fal se}],"HvPartition":true,"EndpointList":["C5FC95BA-F46B-4074-9B10-D0DEF3CB66BF"],"HvRuntime":{"ImagePath":"C:\Program Data\Docker\windowsfilter\15397833d9d3955ed3245b1fc5baa176660480151c3402c641d3d9be21d30388\UtilityVM"},"AllowUnqu alifiedDNSQuery":true}). ExitCode: 125 Commandline: docker run --env licenseFile="" --name testautomation --hostname testautomation --env auth=Navuserpassword --env username="Sandeep" --env ExitOnError=N --env locale=en-US --env databaseServer="" --env databaseInstance="" --volume "C:\ProgramData\NavContainerHelper:C:\ProgramData\NavContainerHelper" --volume "C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:C:\Run\my" --isolation hyperv --restart unless-stopped --memory 4G --env enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5345MgB8AHkAbgBMAHkA NgBzAGwARQA1ADMAVwBSAEkAaQBOAHUAZQB5ADIAbABUAHcAPQA9AHwAZAA4ADkAYgBhADIAYwA2ADYAZQA1ADgAZABjAGMAMwAxADUAYwA2ADMAMABjA DcANABlAGIAYgAwAGMANgBjAGUAYQBiADMAMgA3ADYAZQA5ADEAMABmADIAYQBkADEAOAAxAGQAMgBiADAANgBiADAAMgA5ADYANABkADYAYgA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019 At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.5.10\ContainerHandling\New-NavContainer.ps1:1273 char:19

Any suggestions to solve this error. Thanks!

freddydk commented 4 years ago

Please format things with insert code

Sandygitl commented 4 years ago
PS C:\WINDOWS\system32> New-NavContainer -accept_eula:$accept_eula `
         -accept_outdated `
                 -containername $containername `
                 -auth Navuserpassword `
                 -includeal `
         -includetesttoolkit `
                 -alwaysPull `
                 -doNotExportObjectsToText `
                 -usessl:$false `
                 -updateHosts `
                 -assignPremiumPlan `
                 -shortcuts Desktop `
                 -imageName $navdockerimage `
                 -additionalParameters $additionalParameters
NavContainerHelper is version 0.6.5.10
NavContainerHelper is running as administrator
Host is Microsoft Windows 10 Enterprise - 1909
Docker Client Version is 19.03.8
Docker Server Version is 19.03.8
Pulling image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
16.0.11240.11946-us-ltsc2019: Pulling from businesscentral/sandbox
Digest: sha256:49343c50398ba12766d44037633513094d1d6da16ed7b75bb566a2162d7c398e
Status: Image is up to date for mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
Using image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
Removing testautomation from host hosts file
Removing C:\ProgramData\NavContainerHelper\Extensions\testautomation
Creating Container testautomation
Version: 16.0.11240.11946-us
Style: sandbox
Platform: 16.0.11233.11920
Generic Tag: 0.0.9.99
Container OS Version: 10.0.17763.973 (ltsc2019)
Host OS Version: 10.0.18363.836 (1909)
The container operating system does not match the host operating system, forcing hyperv isolation.
Using locale en-US
Using hyperv isolation
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Files in C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container testautomation from image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
7ae58a4b142ff6dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3
DockerDo : docker.exe: Error response from daemon: hcsshim::CreateComputeSystem 
7ae58a4b142ff6dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3: This operation returned because the timeout period 
expired.
(extra info: {"SystemType":"Container","Name":"7ae58a4b142ff6dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3","Own
er":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\7ae58a4b142ff6
dd12aaf093a16df779e55be02963e8f410aee5012ba90f6ff3","Layers":[{"ID":"0e3660b0-5a8c-5457-a824-03670fc915ef","Path":"C:
\\ProgramData\\Docker\\windowsfilter\\bdd73d42051e0f85164e0d71bb40cf9a4c73011e42a3badd7ff4b6931b9a035e"},{"ID":"fc7d4
b09-d1b3-5d98-8fb6-e6a5743baf77","Path":"C:\\ProgramData\\Docker\\windowsfilter\\aae88c9b1fc5860003fbcf466d41c4bfcc3b
2ee7e21eb2ab6bc60fb9201acb40"},{"ID":"c5433675-dbab-56d0-83a1-cda6a8046a5b","Path":"C:\\ProgramData\\Docker\\windowsf
ilter\\38b4ffb33ba6ee4fe693abbdda24044409cd90dee4842e1ecf90927eefa10b9e"},{"ID":"6ee58b5f-30c8-5b30-9bba-6b9f3df1f1e3
","Path":"C:\\ProgramData\\Docker\\windowsfilter\\6a5e3353575cd906b72268458a6c6711896e42d36f601bcaafe15d85bd993233"},
{"ID":"3a7b086e-5cf9-51a6-af36-929a7dbde23c","Path":"C:\\ProgramData\\Docker\\windowsfilter\\2736adc1046ad9d81094ae65
bb8b1b96ee678924d3f4c002c0fbef30438f8b43"},{"ID":"9cc733d3-0b61-525b-b9c9-13a2e2fd0b3e","Path":"C:\\ProgramData\\Dock
er\\windowsfilter\\d31e00d61bb8aac5367f630a38486fee4cfd1d4417534a3c2858e84ba97def4e"},{"ID":"3b84249d-bdc5-5488-8024-
59a5556e6794","Path":"C:\\ProgramData\\Docker\\windowsfilter\\dc6fd12cb01c7c311e1f06a75324496cfba2789ea79278e20ffd9d4
c316aa108"},{"ID":"fc37c248-472c-5275-a229-7b15eaceae39","Path":"C:\\ProgramData\\Docker\\windowsfilter\\6f56da4515ad
8dad950127cc3ceec86fff283866e0444e4c147089209a0622ec"},{"ID":"7aa08aef-e418-53c3-8a5a-0ffd4fef89bc","Path":"C:\\Progr
amData\\Docker\\windowsfilter\\1c3ce3350a103b7c60e6c61af41c91ecc39402d404aa77df770d4e76fbc3326a"},{"ID":"33b5f1d6-7bc
b-5a70-a1f8-5615ead4bb0d","Path":"C:\\ProgramData\\Docker\\windowsfilter\\c6e5bf995d7c9250312ca41a1ccec0edf0a85d5553a
2bf38755fadc80662105f"},{"ID":"90892a9b-4f82-5ca9-b4c9-3c132afb540e","Path":"C:\\ProgramData\\Docker\\windowsfilter\\
0eb8e7e563e2e5577ea17d1e7070159bf973e0b0ff5fdbb1c76fbb887746322b"},{"ID":"85516cce-c2ad-524b-8500-b56ea6811610","Path
":"C:\\ProgramData\\Docker\\windowsfilter\\97a904b67233af22a08d9477ecccb2284135361c86c967b2b7b5c1bccae88fb9"},{"ID":"
61b04e42-bb1e-59e2-b146-71fa44213f0b","Path":"C:\\ProgramData\\Docker\\windowsfilter\\e90f63b4a489203ca769122237a0094
11ba7b22dd85c6bd5ad8fd452c6415749"},{"ID":"68841545-2318-5b04-92bd-12fe2200918c","Path":"C:\\ProgramData\\Docker\\win
dowsfilter\\37dd3a1888968bae3d6784e6313b92382c533dfccf2e83c6b579d2d00421bef5"},{"ID":"98a7021f-61ea-5ee3-a28b-b84e367
804ae","Path":"C:\\ProgramData\\Docker\\windowsfilter\\db42347b757b818aa3a0efaabcb5f2d2dd3eab69ee3ffd276542d6067db153
d7"},{"ID":"03b06c4d-0b76-5efa-838f-f287b045aff6","Path":"C:\\ProgramData\\Docker\\windowsfilter\\d875abec686e36b2113
93c3ed38a416eb0e585b543694a1d51f17c5ad153d8b1"},{"ID":"e567b7f8-14f6-5d40-b423-bb803cc15e87","Path":"C:\\ProgramData\
\Docker\\windowsfilter\\16ed94de27821cbe208ac1c130f9543186030614b4f2caf2cf375e933a3515c1"},{"ID":"186d444d-890a-56f5-
9b86-de07439a1108","Path":"C:\\ProgramData\\Docker\\windowsfilter\\e7a21afc463af6c0a8c38a3fb7a0af3122d9667823c8c2b145
c8a86b038592e3"},{"ID":"be5777fb-8ccb-5ec0-beee-2c1077013d6a","Path":"C:\\ProgramData\\Docker\\windowsfilter\\ecc208c
7134bd5a8e2ccd9e36f29edd9ba953e1b339db6646b0bc1f87f589c4f"},{"ID":"90b288f9-2f52-58cf-a3bc-aad4d92af9f2","Path":"C:\\
ProgramData\\Docker\\windowsfilter\\c481c61adf2962e584f7fcf206baaf9666475bddc76641640dddeec2c205a47b"},{"ID":"b444a6b
3-f7c0-51bf-bd4b-e3f48d038522","Path":"C:\\ProgramData\\Docker\\windowsfilter\\34a64367f9070aa52039354bc43287a41ced98
f77391e76af648eb88b96561a2"},{"ID":"288979dc-27b1-5368-a905-b6a28aa7ca78","Path":"C:\\ProgramData\\Docker\\windowsfil
ter\\104790799f3ae799e02202ddcf032e5290f1e94d7bcded33f3db06b1cd921e5c"},{"ID":"4030b5b2-5b8f-5e2e-a2ff-1cf4b6e71d01",
"Path":"C:\\ProgramData\\Docker\\windowsfilter\\220c99fd06ed49e0aa562afcd9e5150696ebd8d92c3ccaeb1654adec611a00a7"},{"
ID":"6fa53681-68f8-57ab-809c-78075f0c009b","Path":"C:\\ProgramData\\Docker\\windowsfilter\\c9f16e7d8d62fea61e288b3ec4
405d2a891bed4796fe948dd1984c17ffa6d33b"},{"ID":"f24b4288-6bad-5e18-969a-d0297500fc54","Path":"C:\\ProgramData\\Docker
\\windowsfilter\\d7ea524383279664e4631eafaa2722df275bf80861143a77cb48acd8b8ab2b72"},{"ID":"54990003-72d7-52b4-8301-01
f23201f6b3","Path":"C:\\ProgramData\\Docker\\windowsfilter\\d3a049e92b30c50d5a00ecd198c26f731917afb4c5a45135b55c2b578
b0831bf"},{"ID":"c4a231af-8f37-5be5-a136-19253f379d67","Path":"C:\\ProgramData\\Docker\\windowsfilter\\1a23a7fee22e19
e5ab59ed9198e387db9d060d08c62e93cdb75fc195fe925d54"},{"ID":"16f211fe-69a1-5744-99ee-5b56ec35fbf4","Path":"C:\\Program
Data\\Docker\\windowsfilter\\1ad40aeb34ece5f7f8ef3d2092909470247ef88fab99d9aaf7c22d43cfed488a"},{"ID":"9aa1bc77-d1f8-
5b0d-aa6a-6f874bd0feb0","Path":"C:\\ProgramData\\Docker\\windowsfilter\\200987e366b5d22a01cbf61781b81e57d3722fa89923c
d3d2522ebe1cb26f7b9"},{"ID":"1d073c34-ef63-572d-99fc-1b04ae28315d","Path":"C:\\ProgramData\\Docker\\windowsfilter\\03
cb90dc4e3f0e8296702dbfcaf2c687a46d68b723a6e1754425b36df399d946"},{"ID":"b80b1f37-433c-51a0-a645-e99851ea5795","Path":
"C:\\ProgramData\\Docker\\windowsfilter\\9a77d95e403c2d60978fd741bcede51dedf27895065e3ae6f7b60f9cb06522c2"},{"ID":"a6
231f9c-775d-5d45-a6eb-e65d0b84fa7a","Path":"C:\\ProgramData\\Docker\\windowsfilter\\37d15d741ecaa3e5562f33d774cdc6c12
5c8898ba066d3aa194e4cc3ea0c0dd9"},{"ID":"0b46f22f-7d10-5c5a-8ad9-176f9d559c9a","Path":"C:\\ProgramData\\Docker\\windo
wsfilter\\c78e43fd3e7b7dd4cfa718b1bb2f168a6864f5f1b6420dbcbd24ecfe036b8a93"},{"ID":"a05232c0-cba3-5cb6-a8fb-e3a122b9d
b07","Path":"C:\\ProgramData\\Docker\\windowsfilter\\6868ddc806056a8d061bd00ee3d96e49d00ccc5ba576ba17e34bd786d664a6aa
"},{"ID":"a5907d1d-f76f-5a82-a78b-f8ded9cb5223","Path":"C:\\ProgramData\\Docker\\windowsfilter\\15397833d9d3955ed3245
b1fc5baa176660480151c3402c641d3d9be21d30388"},{"ID":"01dfcede-88d1-5e4d-8f46-d2f814ab5ed3","Path":"C:\\ProgramData\\D
ocker\\windowsfilter\\9de923507dbd83ed9295a7a3242036d02edc75a0fa32de45f61ee683e19f0170"}],"MemoryMaximumInMB":4096,"H
ostName":"testautomation","MappedDirectories":[{"HostPath":"c:\\windows\\system32\\drivers\\etc","ContainerPath":"c:\
\driversetc","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPath":"c:\\progra
mdata\\navcontainerhelper","ContainerPath":"c:\\programdata\\navcontainerhelper","ReadOnly":false,"BandwidthMaximum":
0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPath":"c:\\programdata\\navcontainerhelper\\extensions\\testautoma
tion\\my","ContainerPath":"c:\\run\\my","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":fal
se}],"HvPartition":true,"EndpointList":["C5FC95BA-F46B-4074-9B10-D0DEF3CB66BF"],"HvRuntime":{"ImagePath":"C:\\Program
Data\\Docker\\windowsfilter\\15397833d9d3955ed3245b1fc5baa176660480151c3402c641d3d9be21d30388\\UtilityVM"},"AllowUnqu
alifiedDNSQuery":true}).
ExitCode: 125
Commandline: docker run --env licenseFile="" --name testautomation --hostname testautomation --env 
auth=Navuserpassword --env username="Sandeep" --env ExitOnError=N --env locale=en-US --env databaseServer="" --env 
databaseInstance="" --volume "C:\ProgramData\NavContainerHelper:C:\ProgramData\NavContainerHelper" --volume 
"C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:C:\Run\my" --isolation hyperv --restart 
unless-stopped --memory 4G --env enableApiServices=Y --env useSSL=N --volume 
"c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5345MgB8AHkAbgBMAHkA
NgBzAGwARQA1ADMAVwBSAEkAaQBOAHUAZQB5ADIAbABUAHcAPQA9AHwAZAA4ADkAYgBhADIAYwA2ADYAZQA1ADgAZABjAGMAMwAxADUAYwA2ADMAMABjA
DcANABlAGIAYgAwAGMANgBjAGUAYQBiADMAMgA3ADYAZQA5ADEAMABmADIAYQBkADEAOAAxAGQAMgBiADAANgBiADAAMgA5ADYANABkADYAYgA= 
--env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env accept_eula=Y --env accept_outdated=Y 
--detach mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
At C:\Program 
Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.5.10\ContainerHandling\New-NavContainer.ps1:1273 char:19
+ ...       if (!(DockerDo -accept_eula -accept_outdated:$accept_outdated - ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo
freddydk commented 4 years ago

Have you tried to re-run. I haven't seen this before - looks like a docker timeout

Sandygitl commented 4 years ago

After restarting system and re-run multiple times, timeout error is resolved.

Getting new error related to navserver instance. Below is the output .

PS C:\WINDOWS\system32> New-NavContainer -accept_eula:$accept_eula `
         -accept_outdated `
                 -containername $containername `
                 -auth Windows `
                 -Credential $credential `
                 -includeal `
         -includetesttoolkit `
                 -alwaysPull `
                 -doNotExportObjectsToText `
                 -usessl:$false `
                 -updateHosts `
                 -assignPremiumPlan `
                 -shortcuts Desktop `
                 -imageName $navdockerimage `
                 -additionalParameters $additionalParameters
NavContainerHelper is version 0.6.5.10
NavContainerHelper is running as administrator
Host is Microsoft Windows 10 Enterprise - 1909
Docker Client Version is 19.03.8
Docker Server Version is 19.03.8
Pulling image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
16.0.11240.11946-us-ltsc2019: Pulling from businesscentral/sandbox
Digest: sha256:49343c50398ba12766d44037633513094d1d6da16ed7b75bb566a2162d7c398e
Using image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
Removing testautomation from host hosts file
Removing C:\ProgramData\NavContainerHelper\Extensions\testautomation
Creating Container testautomation
Version: 16.0.11240.11946-us
Style: sandbox
Platform: 16.0.11233.11920
Generic Tag: 0.0.9.99
Container OS Version: 10.0.17763.973 (ltsc2019)
Host OS Version: 10.0.18363.836 (1909)
The container operating system does not match the host operating system, forcing hyperv isolation.
Using locale en-US
Using hyperv isolation
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Files in C:\ProgramData\NavContainerHelper\Extensions\testautomation\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container testautomation from image mcr.microsoft.com/businesscentral/sandbox:16.0.11240.11946-us-ltsc2019
4bdac844ff92247e7887890b026cf7b38579b1de81ecff05598fb3909c0b0c7a
Waiting for container testautomation to be ready
Initializing...
Setting host.docker.internal to 192.168.0.101 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.0.101 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.28.80.1 in container hosts file
Starting Container
Hostname is testautomation
PublicDnsName is testautomation
Using Windows Authentication
Starting Local SQL Server
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Enabling Financials User Experience
Creating http download site
Creating Windows user sandy
Setting SA Password and enabling SA
Creating SUPER user
Assign Premium plan for TESTAUTOMATION\SANDY
Container IP Address: 172.28.86.44
Container Hostname  : testautomation
Container Dns Name  : testautomation
Web Client          : http://testautomation/BC/
Dev. Server         : http://testautomation
Dev. ServerInstance : BC
Setting testautomation to 172.28.86.44 in host hosts file

Files:
http://testautomation:8080/ALLanguage.vsix

WARNING: You are running a container which is 91 days old.
Microsoft recommends that you always run the latest version of our containers.

Initialization took 3554 seconds
Ready for connections!
Reading CustomSettings.config from testautomation
Creating Desktop Shortcuts for testautomation

Below is the error :
docker : Set-NavServerInstance : ServerInstance 'MicrosoftDynamicsNavServer$BC' failed 
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.6.5.10\ContainerHandling\Invoke-ScriptInNavContainer.ps1:105 
char:13
+             docker exec $containerName powershell $file
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Set-NavServerIn...ver$BC' failed :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
MuhammadAizaz1 commented 4 years ago

@Sandygitl I have resolved this error by enabling virtualization from BIOS. It should be available and enabled in task manager. image is attached for your reference. image

freddydk commented 4 years ago

Thanks