navcontainerhelper icon indicating copy to clipboard operation
navcontainerhelper copied to clipboard

LocalDevEnv - Error: docker.exe: Error response from daemon: hcsshim::CreateComputeSystem : The request is not supported.

Open fvet opened this issue 2 years ago • 3 comments

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue I'm trying to contribute to the BusinessCentralApps project (https://github.com/microsoft/BusinessCentralApps/issues/115) following the new 'How to Development' guidelines, as mentioned at BCTechDays. https://www.youtube.com/watch?v=a1p8fTFPVwI&t=3496s

I'm using the https://github.com/microsoft/BusinessCentralApps/blob/main/App/.AL-Go/localDevEnv.ps1 script, although when running the script, it fails (2)

I do have a full working local Docker setup, that is used on daily basis for running tests on my own developments. (docker is using the 'Containers' feature, not the 'Hyper-V' feature). I'm a bit reluctant on switching to Hyper-V (if that would be the cause) not to break my current setup (as suggested in https://github.com/microsoft/Windows-Containers/issues/227) (1)

image

Any insights on how to get the localDevEnv scripts working (in combination with the 'Containers' option)?

Scripts used to create container and cause the issue

(1) Script used for my local container to perform tests > ALL OK.

$includeTestToolkit = $true # Enable when container is used to run tests locally
$containerName = 'bcserverbe2' 
$artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -country 'be' -select 'Latest' 

New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -includeTestToolkit:$includeTestToolkit `
    -memoryLimit 8G `
    -updateHosts

(2) Scripts used to contribute to the base app

https://github.com/microsoft/BusinessCentralApps/blob/main/App/.AL-Go/localDevEnv.ps1

Full output of scripts

  _                     _   _____             ______            
 | |                   | | |  __ \           |  ____|           
 | |     ___   ___ __ _| | | |  | | _____   __ |__   _ ____   __
 | |    / _ \ / __/ _` | | | |  | |/ _ \ \ / /  __| | '_ \ \ / /
 | |____ (_) | (__ (_| | | | |__| |  __/\ V /| |____| | | \ V / 
 |______\___/ \___\__,_|_| |_____/ \___| \_/ |______|_| |_|\_/  
                                                                
This script will create a docker based local development environment for your project.

NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1

All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a Local Sandbox configuration point to your environment.

Applying settings from C:\Projects\Github\BusinessCentralApps\.github\AL-Go-Settings.json
Applying settings from C:\Projects\Github\BusinessCentralApps\App\.AL-Go\settings.json
Checking System Requirements

Container name
--------------
Please enter the name of the container to create (default bcserver) 
bcserver selected

Authentication mechanism for container
--------------------------------------
a Windows Authentication
b Username/Password authentication

Select authentication mechanism for container (default b) 
Username/Password authentication selected

LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps

Local path or a secure download URL to license file  (default none) 
none selected

Downloading BcContainerHelper preview version from Blob Storage
Using 7zip
BcContainerHelper version 6.0.0-preview1081
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Applying settings from C:\Projects\Github\BusinessCentralApps\.github\AL-Go-Settings.json
Applying settings from C:\Projects\Github\BusinessCentralApps\App\.AL-Go\settings.json
Applying settings from C:\Projects\Github\BusinessCentralApps\App\.AL-Go\localDevEnv.settings.json
Checking type
Checking appFolders, testFolders and bcptTestFolders
Application Dependency 23.0.0.0
Checking artifact setting for project
Downloading artifacts from https://bcartifacts.azureedge.net/sandbox/23.0.12034.12841/base
Updating app- and test Dependencies
Analyzing Test App Dependencies
Checking project dependencies
Checking appDependencyProbingPaths
Add override for NewBcContainer
Add override for ImportTestToolkitToBcContainer
Add override for PublishBcContainerApp
  _____                               _                
 |  __ \                             | |               
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___ 
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv
Container name                  bcserver
Image name                      
ArtifactUrl                     https://bcartifacts.azureedge.net/sandbox/23.0.12034.12841/base
SasToken                        Not Specified
BcAuthContext                   Not Specified
Environment                     
ReUseContainer                  False
KeepContainer                   True
useCompilerFolder               False
artifactCachePath               
useDevEndpoint                  True
Auth                            UserPassword
Credential                      Specified
CompanyName                     
MemoryLimit                     8G
FailOn                          error
TreatTestFailuresAsWarnings     False
Enable Task Scheduler           False
Assign Premium Plan             False
Install Test Runner             True
Install Test Framework          True
Install Test Libraries          True
Install Perf. Toolkit           True
InstallOnlyReferencedApps       True
generateDependencyArtifact      False
CopySymbolsFromContainer        False
enableCodeCop                   True
enableAppSourceCop              False
enableUICop                     False
enablePerTenantExtensionCop     False
doNotPerformUpgrade             False
doNotPublishApps                False
uninstallRemovedApps            False
escapeFromCops                  False
doNotBuildTests                 False
doNotRunTests                   True
doNotRunBcptTests               True
useDefaultAppSourceRuleSet      False
rulesetFile                     
enableExternalRulesets          False
azureDevOps                     False
gitLab                          False
gitHubActions                   False
vsixFile                        
License file                    Not specified
CodeSignCertPfxFile             Not specified
CodeSignCertPfxPassword         Not specified
CodeSignCertIsSelfSigned        False
KeyVaultCertPfxFile             Not specified
KeyVaultCertPfxPassword         Not specified
KeyVaultClientId                
BuildOutputFile                 
ContainerEventLogFile           
TestResultsFile                 C:\Projects\Github\BusinessCentralApps\App\TestResults.xml
BcptTestResultsFile             C:\Projects\Github\BusinessCentralApps\App\bcptTestResults.json
TestResultsFormat               JUnit
AdditionalCountries             
PackagesFolder                  .packages
OutputFolder                    
BuildArtifactFolder             
CreateRuntimePackages           False
AppVersion                      23.0
AppBuild                        12034
AppRevision                     12841
SourceRepositoryUrl             
SourceCommit                    
BuildBy                         BcContainerHelper,6.0.0-preview1081
BuildUrl                        
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\AMCBanking365Fundamentals\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\APIReportsFinance\App
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\BasicExperience\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\CompanyHub\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\ContosoCoffeeDemoDataset\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DataArchive\App
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DataCorrectionFA\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DataSearch\App
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DynamicsGPHistoricalData\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DynamicsGPHistorySmartLists\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - Current User Connector\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - Microsoft 365 Connector\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - Outlook REST API\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - SMTP API\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - SMTP API\test library
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - SMTP Connector\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\EssentialBusinessHeadlines\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridAPI\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridBaseDeployment\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridBC\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridBCLast\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridGP\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\ImageAnalysis\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\INTaxEngine\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Intrastat\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\LatePaymentPredictor\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\MSWalletPayments\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\OnPrem Permissions\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\PayPalPaymentsStandard\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\QBMigration\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\QuickbooksPayrollFileImport\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\RecommendedApps\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\SalesAndInventoryForecast\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\ServiceDeclaration\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Shopify\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\SimplifiedBankStatementImport\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\UKSendRemittanceAdvice\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\VATGroupManagement\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\WorldPayPaymentsStandard\app
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\MicrosoftUniversalPrint
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\SendToEmailPrinter
- C:\Projects\Github\BusinessCentralApps\App\Layers\W1\Application
- C:\Projects\Github\BusinessCentralApps\App\Layers\W1\BaseApp
- C:\Projects\Github\BusinessCentralApps\App\Layers\W1\Tests\TestLibraries
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\BusinessCentralPerformanceToolkit
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\TestFramework\TestStabilityTools\PreventMetadataUpdates
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\TestFramework\TestLibraries\Any
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\TestFramework\TestLibraries\Assert
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\TestFramework\TestLibraries\Permissions Mock
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\TestFramework\TestLibraries\Variable Storage
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\TestFramework\TestRunner
- C:\Projects\Github\BusinessCentralApps\App\Modules\System
- C:\Projects\Github\BusinessCentralApps\App\Modules\System Test Libraries
Test application folders
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\AMCBanking365Fundamentals\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\BasicExperience\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DataArchive\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\DynamicsGPHistoricalData\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - Current User Connector\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - Microsoft 365 Connector\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - Outlook REST API\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - SMTP API\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Email - SMTP Connector\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\EssentialBusinessHeadlines\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridBaseDeployment\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridBC\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridBCLast\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\HybridGP\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\ImageAnalysis\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\INTaxEngine\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Intrastat\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\LatePaymentPredictor\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\MSWalletPayments\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\OnPrem Permissions\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\PayPalPaymentsStandard\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\QBMigration\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\QuickbooksPayrollFileImport\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\RecommendedApps\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\SalesAndInventoryForecast\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\ServiceDeclaration\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\Shopify\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\SimplifiedBankStatementImport\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\UKSendRemittanceAdvice\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\VATGroupManagement\test
- C:\Projects\Github\BusinessCentralApps\App\Apps\W1\WorldPayPaymentsStandard\test
- C:\Projects\Github\BusinessCentralApps\App\Modules\System Tests
- C:\Projects\Github\BusinessCentralApps\App\Modules\DevTools\BusinessCentralPerformanceToolkit Tests
BCPT Test application folders
- None
BCPT Test suites
- None
Custom CodeCops
- None
NewBccontainer override
Param(
    [Hashtable]$parameters
)

$parameters.multitenant = $false
$parameters.RunSandboxAsOnPrem = $true
$parameters.memoryLimit = "16G"
if ("$env:GITHUB_RUN_ID" -eq "") {
    $parameters.isolation = "hyperv"
    $parameters.includeAL = $true
    $parameters.doNotExportObjectsToText = $true
    $parameters.shortcuts = "none"
}

$parameters.MyScripts = @(@{"SetupDatabase.ps1" = '. c:\run\SetupDatabase.ps1; Invoke-Sqlcmd -Query "UPDATE [CRONUS].[dbo].[Published Application] SET [Published 
As] = 2, [Tenant ID] = ''Default''"' })

New-BcContainer @parameters

Invoke-ScriptInBcContainer -containerName $parameters.ContainerName -scriptblock { $progressPreference = 'SilentlyContinue' }
ImportTestToolkitToBcContainer override
Param(
    [hashtable] $parameters
)

Write-Host "Skipping Test Toolkit import"
PublishBcContainerApp override
Param([Hashtable]$parameters)

if (Test-BcContainer -containerName $parameters.ContainerName) {
    Publish-BcContainerApp @parameters -syncMode ForceSync
}


  _____       _ _ _                                          _        _                            
 |  __ \     | | (_)                                        (_)      (_)                           
 | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___ 
 |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
 | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
 |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
                           __/ |   __/ |                                                 __/ |     
                          |___/   |___/                                                 |___/      

Pulling mcr.microsoft.com/businesscentral:10.0.20348.1906-dev

Pulling generic image took 3 seconds

   _____                _   _                               _        _                 
  / ____|              | | (_)                             | |      (_)                
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __ 
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |   
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|   
                                     __/ |                                             
                                    |___/                                              

Creaing docker container
BcContainerHelper is version 6.0.0-preview1081
BcContainerHelper is running as administrator
HyperV is Disabled
UsePsSession is True
Host is Microsoft Windows 11 Pro - 10.0.22621.2283
Docker Client Version is 19.03.5
Docker Server Version is 19.03.5
Removing entries from hosts
Removing bcserver from container hosts file
Removing bcserver-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\bcserver
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1906-dev
Creating Container bcserver
Style: onprem
Multitenant: No
Version: 23.0.12034.12841
Platform: 23.0.12831.0
Generic Tag: 1.0.2.14-dev
Container OS Version: 10.0.20348.1906 (ltsc2022)
Host OS Version: 10.0.22621.2283 (22H2)
Using hyperv isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Projects\Github\BusinessCentralApps\App:c:\sources"
--volume "C:/Projects/Github/BusinessCentralApps:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupDatabase.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bcserver from image mcr.microsoft.com/businesscentral:10.0.20348.1906-dev
a0b3f0764ed9c29ca7c832d9cb4286cb24bf4d843dfd95aa3d475f8f6918347f
New-BcContainer Telemetry Correlation Id: d03749bd-3b73-4df9-bee9-ab10ca78cc51
Run-AlPipeline Telemetry Correlation Id: a0a39a21-38b9-4427-80ff-3dc2f4f0d6a7
Removing BcContainerHelper
Error: docker.exe: Error response from daemon: hcsshim::CreateComputeSystem a0b3f0764ed9c29ca7c832d9cb4286cb24bf4d843dfd95aa3d475f8f6918347f: The request is not s
upported.
(extra info: {"SystemType":"Container","Name":"a0b3f0764ed9c29ca7c832d9cb4286cb24bf4d843dfd95aa3d475f8f6918347f","Owner":"docker","IgnoreFlushesDuringBoot":true,"
LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\a0b3f0764ed9c29ca7c832d9cb4286cb24bf4d843dfd95aa3d475f8f6918347f","Layers":[{"ID":"178f3d6e-4298-5941-80
fc-d30de59d2b3f","Path":"C:\\ProgramData\\docker\\windowsfilter\\4e6bf94ce865271b4e9f8ca2a1789f4425d257a89ca18afc61684884cca3c90b"},{"ID":"93146c56-1476-5c6b-aaa5
-8d586c064486","Path":"C:\\ProgramData\\docker\\windowsfilter\\297790ae444d92989b23c2d8f7c57138980916eb8447d5358091023644c329ad"},{"ID":"f4f499e4-3c6e-5832-b335-d
fecb8cf1e97","Path":"C:\\ProgramData\\docker\\windowsfilter\\a5ac688843616fbcf2d20c615179f80c68d01c238964a43a30ea864c90b6d3b7"},{"ID":"356c3ed1-8cde-507c-9fe9-10c
b6306b785","Path":"C:\\ProgramData\\docker\\windowsfilter\\b07933aeba24db4d6c1494925ca52074bf69733b1b57bf179884d11af745ea38"},{"ID":"af85e329-bf03-5119-995e-76d0d
abbbc16","Path":"C:\\ProgramData\\docker\\windowsfilter\\0c4fb90175c5acc845fa27fd0fb24ddbc5c09aad65b3870dfba464502954ed54"},{"ID":"c247fc16-23fe-5077-91c9-43014d4
75ec3","Path":"C:\\ProgramData\\docker\\windowsfilter\\3777e24049db88e7ea516557f9b109b21b0aafe53465aca658c3ec0ee06916b1"},{"ID":"24ac2905-902b-5483-9e1b-15f457bb4
0a9","Path":"C:\\ProgramData\\docker\\windowsfilter\\ff42d02caea2fd4ca0d8cbf4d39ecd53e671412e3033bb23fc1389ad8071bd29"},{"ID":"d35567fa-65c3-5106-907f-e94305d5713
2","Path":"C:\\ProgramData\\docker\\windowsfilter\\4b2e9d0f058dc46d77b7e52f28674c3a8d5ad8814f34ea5d6164145cdef6b62b"},{"ID":"052cab84-7c52-5e20-90ca-9b88bf655507"
,"Path":"C:\\ProgramData\\docker\\windowsfilter\\cf2380c00f09bf5cc2963164d13cd8d841276cf10ae61c5f02154752d94ddb7e"},{"ID":"f5907a84-1f28-570a-a8b8-33f098da010b","
Path":"C:\\ProgramData\\docker\\windowsfilter\\97513b7f1526b2325710c52e1ff08a861be31f50ecb6813bfc2d7077815b8dce"},{"ID":"6fefa2b9-317e-5c26-af0c-38f125e85e6b","Pa
th":"C:\\ProgramData\\docker\\windowsfilter\\3cf9f6ac7a108de8b524f8b9bc43c0875aac50a8026b90ca8ab97be6ab1033a7"},{"ID":"0be8a7fa-54f1-5041-9db4-bfe374f625d4","Path
":"C:\\ProgramData\\docker\\windowsfilter\\ef0cd4f35104c53e16e31a78f109cdd3f4acd7e28a8fd7dddb30f0e07dd3cfdf"},{"ID":"bf5d16ae-49c9-55b0-a0c4-4e9b8de11b58","Path":
"C:\\ProgramData\\docker\\windowsfilter\\0d5b224fe83341655d717b286fbffd8d8a173512f5ee389659e881889238ab70"},{"ID":"b118729f-f058-5b7b-8fd2-7b4077af8253","Path":"C
:\\ProgramData\\docker\\windowsfilter\\7fd847d03c9b0b907700c3abe4dd5d06912cff8988459c5f97d11f1d6d56da05"},{"ID":"c65aa857-3aa3-5b75-91be-6aaa755ce94a","Path":"C:\
\ProgramData\\docker\\windowsfilter\\e971574bfe63d2999c25dee267ee2d7a1dacf530a62e201168c9db2f98841b04"}],"MemoryMaximumInMB":16384,"HostName":"bcserver","MappedDi
rectories":[{"HostPath":"c:\\bcartifacts.cache","ContainerPath":"c:\\dl","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPa
th":"c:\\windows\\system32\\drivers\\etc","ContainerPath":"c:\\driversetc","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"Host
Path":"c:\\projects\\github\\businesscentralapps\\app","ContainerPath":"c:\\sources","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":fal
se},{"HostPath":"c:\\projects\\github\\businesscentralapps","ContainerPath":"c:\\shared","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM"
:false},{"HostPath":"c:\\programdata\\bccontainerhelper","ContainerPath":"c:\\programdata\\bccontainerhelper","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":
0,"CreateInUtilityVM":false},{"HostPath":"c:\\programdata\\bccontainerhelper\\extensions\\bcserver\\my","ContainerPath":"c:\\run\\my","ReadOnly":false,"BandwidthM
aximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false}],"HvPartition":true,"EndpointList":["03323052-6caf-43f4-87f5-a0c752baa4fc"],"HvRuntime":{"ImagePath":"C:\\Pro
gramData\\docker\\windowsfilter\\7fd847d03c9b0b907700c3abe4dd5d06912cff8988459c5f97d11f1d6d56da05\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}).
ExitCode: 125
Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=N --label version=23.0.12034.12841 --label platform=23.0.12831.0 --la
bel country=W1 --env artifactUrl=https://bcartifacts.azureedge.net/sandbox/23.0.12034.12841/base --env licenseFile="" --name bcserver --hostname bcserver --env au
th=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=en-US --env databaseServer="" --env databaseInstance="" --volume "C:\ProgramData\BcCont
ainerHelper:C:\ProgramData\BcContainerHelper" --volume "C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:C:\Run\my" --isolation hyperv --restart unless-sto
pped --env filesOnly=False --memory 16G --env enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=764
92d1116743f0423413b16050a5345MgB8AGQAMABmAEYAMgB5AEoAdwA3AEcAagBGAFcAUABuAGgAawBOAHoAMgA1AEEAPQA9AHwAMAA5ADIAZABiADUAZAAzADUAMABmAGYAYQBmADIAMABjADEAYwA3ADUAMABhA
GMAZQAyADQAYwAxADUAYwAzAA== --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --volume "C:\Projects\Github\BusinessCentralApps\App:c:\source
s" --volume "C:/Projects/Github/BusinessCentralApps:c:\shared" --env customNavSettings=EnableTaskScheduler=False --env accept_eula=Y --env accept_outdated=Y --det
ach mcr.microsoft.com/businesscentral:10.0.20348.1906-dev
Stacktrace: at DockerDo, C:\Users\frederic.vercaemst\AppData\Local\Temp\4a9d2417-b775-4043-a0d9-53608019c9e1\BcContainerHelper\HelperFunctions.ps1: line 259
at New-BcContainer, C:\Users\frederic.vercaemst\AppData\Local\Temp\4a9d2417-b775-4043-a0d9-53608019c9e1\BcContainerHelper\ContainerHandling\New-NavContainer.ps1: 
line 1969
at <ScriptBlock>, C:\Projects\Github\BusinessCentralApps\App\.AL-Go\NewBcContainer.ps1: line 17
at <ScriptBlock>, C:\Users\frederic.vercaemst\AppData\Local\Temp\4a9d2417-b775-4043-a0d9-53608019c9e1\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 993
at <ScriptBlock>, C:\Users\frederic.vercaemst\AppData\Local\Temp\4a9d2417-b775-4043-a0d9-53608019c9e1\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 922
at <ScriptBlock>, C:\Users\frederic.vercaemst\AppData\Local\Temp\4a9d2417-b775-4043-a0d9-53608019c9e1\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 904
at Run-AlPipeline, C:\Users\frederic.vercaemst\AppData\Local\Temp\4a9d2417-b775-4043-a0d9-53608019c9e1\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 866
at CreateDevEnv, C:\Users\frederic.vercaemst\AppData\Local\Temp\tmp4E03.tmp.ps1: line 1682
at <ScriptBlock>, C:\Projects\Github\BusinessCentralApps\App\.AL-Go\localDevEnv.ps1: line 126

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

  • does it happen all the time?
  • did it use to work?

fvet avatar Oct 09 '23 09:10 fvet

Looking at the output, I notice the --isolation hyperv parameter in the logs

Is it supported parameter by the LocalDevEnv script to change the Isolation for the CreateDevEnv part?

fvet avatar Oct 09 '23 09:10 fvet

You can remove $parameters.isolation = "hyperv" from BusinessCentralApps\App.AL-Go\NewBcContainer.ps1. It works fine. I tried it yesterday. Note PR 466 (v23 Build/Container issues) in the BC BaseApp repo. Three files are missing some namespaces.

DanielGoehler avatar Oct 09 '23 19:10 DanielGoehler

@DanielGoehler Thx!

As a reference: I was able to create the localdevenv by removing the $parameters.isolation = "hyperv" from NewBcContainer.ps1.

image


@freddydk Would it be possible to :

  • Align / update the documentation on how to contribute to the MS apps?
    • ALAppExtensions (System / Modules) refers to https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-set-up-an-environment
    • whereas BCBusinessCentralApps promotes the use of localDevEnv.ps1
  • Make the isolation a user-asked parameter for the localDevEnv.ps1 script? (so we don't need to modify the script and exclude this change from being committed)
  • Make if part of localDevEnv.settings.json? (although this file is not gitignored either)
  • Provide guidance on using the c:\programdata\bccontainerhelper\bccontainerhelper.config.json instead and set the isolation level to process instead of hyperv? (tested but it seems to be overruled by $parameters.isolation = "hyperv" from NewBcContainer.ps1 again)
Import-Module bccontainerhelper 

$bcContainerHelperConfig

$bcContainerHelperConfig.defaultNewContainerParameters = @{
"Accept_Eula" = $true
"Isolation" = "process"
"UpdateHosts" = $true
}

$bcContainerHelperConfig | ConvertTo-Json | Set-Content "C:\ProgramData\BcContainerHelper\BcContainerHelper.config.json" 

I think a similar suggestion was made in https://github.com/microsoft/AL-Go/issues/363#issuecomment-1437857006 .


References used:

  • https://www.dvlprlife.com/2022/06/set-bccontainerhelp-default-configuration-values/
  • https://freddysblog.com/2020/10/10/bccontainerhelper-configuration/
  • https://freddysblog.com/2020/08/11/bccontainerhelper/

fvet avatar Oct 17 '23 15:10 fvet