Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

##[error]DockerDo : docker: Error response from daemon: hcs::CreateComputeSystem 20a2d6b76d69c179ca2b39b2969833e015b9f6aa998cac334ea47601cae371dd: The virtual machine could not be started because a required feature is not installed. ExitCode: 125 #3415

Closed
sauerkreut opened this issue Mar 14, 2024 · 11 comments · Fixed by #3416
Assignees

Comments

@sauerkreut
Copy link

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

Describe the issue
Running a pipeline after the "Fairly big change rolling out on Business Central on Docker!!!" by Freddy Kristiansen on Yammer ( https://www.yammer.com/dynamicsnavdev/#/Threads/show?threadId=2707513621381120 ) returns: ##[error]DockerDo : docker: Error response from daemon: hcs::CreateComputeSystem 20a2d6b76d69c179ca2b39b2969833e015b9f6aa998cac334ea47601cae371dd: The virtual machine could not be started because a required feature is not installed. ExitCode: 125

Scripts used to create container and cause the issue

Param(
    [Parameter(Mandatory=$false)]
    [string] $version = "ci",
    [Parameter(Mandatory=$false)]
    [int] $appBuild = 0,
    [Parameter(Mandatory=$false)]
    [int] $appRevision = 0,
    [Parameter(Mandatory=$false)]
    [string] $baseFolder,
    [Parameter(Mandatory=$false)]
    [string] $settingsFileName,
    [Parameter(Mandatory=$false)]
    [string] $variableGroupNamePipelineSettings = 'PipelineSettings'
)
#$localMode = $true

function IsRuntimePackage($appFile){
    $tmpFolder = "$ENV:SYSTEM_DEFAULTWORKINGDIRECTORY"
    $result = $false
    try {
        $tmpFolder = Join-Path $tmpFolder ([Guid]::NewGuid())
        Extract-AppFileToFolder -appFilename $appFile -appFolder $tmpFolder -generateAppJson 6> $null        
    }
    catch {
        if ($_.exception.message -eq "You cannot extract a runtime package")
        {
            $result = $true
        } else{
            throw
        }
    }
    if (Test-Path $tmpFolder){
        Remove-Item $tmpFolder -Recurse
    }
    return $result
}
function IsSymbolsPackage($appFile){
    $tmpFolder = "$ENV:SYSTEM_DEFAULTWORKINGDIRECTORY"
    $result = $false
    try {
        $tmpFolder = Join-Path $tmpFolder ([Guid]::NewGuid())
        Extract-AppFileToFolder -appFilename $appFile -appFolder $tmpFolder -generateAppJson 6> $null        
        if ((-not(Test-Path(Join-Path $tmpFolder "src"))) -and (Test-Path(Join-Path $tmpFolder "NavxManifest.xml")) ){
            $result = $true
        }
    }
    catch {
        if ($_.exception.message -eq "You cannot extract a runtime package")
        {            
        } else{
            throw
        }
    }
    if (Test-Path $tmpFolder){
        Remove-Item $tmpFolder -Recurse
    }
    return $result
}

. $PSScriptRoot\Resolve-DependenciesFromAzureFeedCustom.ps1

$buildArtifactFolder = $ENV:BUILD_ARTIFACTSTAGINGDIRECTORY
Write-Host "BUILD_DEFINITIONNAME: $ENV:BUILD_DEFINITIONNAME"
$devOpsPat = $ENV:DevOpsPAT
if ($devOpsPat){
    Write-Host "$($devOpsPat.SubString(0,5))..."
    #Write-Host "...$($devOpsPat.SubString(5))"
}else{
    Write-Host "No DevOps Personal Access Token found."
}

$organizationName = "$ENV:SYSTEM_COLLECTIONURI".Split("/")[3]
Write-Host "Organization: $organizationName"

$projectName =  "$ENV:SYSTEM_TEAMPROJECT"
Write-Host "Project: $projectName"

$uriOrga = "https://dev.azure.com/$organizationName/" 
$requestUri = $uriOrga + "$projectName/_apis/distributedtask/variablegroups?groupName=$variableGroupNamePipelineSettings&api-version=7.0"
Write-Host "Url for variable group: $requestUri"
$authHeader = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$devOpsPat")) }

$webServiceResult = Invoke-RestMethod -Uri $requestUri -Method get -Headers $authHeader -ContentType "application/json"        
if ($webServiceResult.value){
    Write-Host "Getting pipeline settings '$variableGroupNamePipelineSettings' successful." -ForegroundColor Green
    $pipelineSettings = $webServiceResult.value.variables
    $pipelineSettings
    #Example: if ($pipelineSettings.GenerateSasLinkForLatestApp.value -eq 1) { ... }
}else{
    throw "Getting pipeline settings '$variableGroupNamePipelineSettings' failed."
}

if ($baseFolder -eq ''){
    $baseFolder = (Get-Item (Join-Path $PSScriptRoot "..")).FullName
}
Write-Host "Base Folder: "
Write-Host $baseFolder

$prebuildScriptFullName = Join-Path $baseFolder 'scripts\prebuild.ps1'
if (Test-Path $prebuildScriptFullName){
    . $prebuildScriptFullName
}

$readmeFullName = "$baseFolder\README.md"
if (Test-Path $readmeFullName){
   Copy-Item $readmeFullName "$buildArtifactFolder\README.md"
}
$mainAppJsonFullName = "$baseFolder\app.json"
if (Test-Path $mainAppJsonFullName){
   Copy-Item $mainAppJsonFullName "$buildArtifactFolder\app.json"
}else{
    $mainAppJsonFullName = "$baseFolder\app\app.json"
    if (Test-Path $mainAppJsonFullName){
       Copy-Item $mainAppJsonFullName "$buildArtifactFolder\app.json"
    }
}

. (Join-Path $PSScriptRoot "Read-Settings.ps1") -version $version -settingsFileName $settingsFileName

if ($pipelineSettings.bcContainerHelperVersion){
    Write-Host "Override bc container helper version from pipeline settings. (repo settings: $bcContainerHelperVersion, pipeline settings: $($pipelineSettings.bcContainerHelperVersion.value)"
    $bcContainerHelperVersion = $pipelineSettings.bcContainerHelperVersion.value
    
}
if (-not $localMode){
    . (Join-Path $PSScriptRoot "Install-BcContainerHelper.ps1") -bcContainerHelperVersion $bcContainerHelperVersion -genericImageName $genericImageName
}
if ($appFolders -eq '\'){
    $appFolders = '.\'
}
if ((!$appFolders) -and (!$testFolders)){
    Write-Host "Auto discover apps: "
    #$appFolders = Get-ChildItem -Path $baseFolder -Filter app.json -Recurse|Select-Object DirectoryName
    $appFolders = @()
    $testFolders = @()
    foreach($f in Get-ChildItem -Path $baseFolder -Filter app.json -Recurse){
        #if ($f.DirectoryName.Length -gt $baseFolder.Length){
        #    $subfolder = $f.DirectoryName.Substring($baseFolder.Length+1)        
        #    if ($subfolder.ToLower().EndsWith("test")){
        #        $testFolders += $subfolder
        #    }
        #    else
        #    {
        #        $appFolders += $subfolder
        #    }
        #}
        if($f.DirectoryName.ToLower().EndsWith('test')){
            $testFolders += $f.DirectoryName
        }else{
            $appFolders += $f.DirectoryName
        }
    }
    if ($appFolders.Count -eq 1){
        $appFolders = $appFolders[0]
    }
    Write-Host
    Write-Host "----------------------------------------------"
    Write-Host "App Folders:"
    Write-Host "----------------------------------------------"
    $appFolders|Format-List
    Write-Host
    Write-Host "----------------------------------------------"
    Write-Host "Test Folders:"
    Write-Host "----------------------------------------------"
    $testFolders|Format-List
}
if ($enableAppSourceCop){
    Write-Host "Backup AppSourceCop.json files"
    foreach($f in Get-ChildItem -Path $baseFolder -Filter AppSourceCop.json -Recurse){
        Write-Host $f.FullName
        Rename-Item -Path $f.FullName -NewName "$($f.FullName).bak"
    }
}
if ($appFolders.GetType() -eq [System.String]){
    if ([IO.Path]::IsPathRooted($appFolders)){    
        $appJsonFullName = $appFolders
    } else {
        $appJsonFullName = Join-Path $baseFolder $appFolders
    }
    $appJsonFullName = Join-Path $appJsonFullName 'app.json'
    
    if (Test-Path $appJsonFullName){
        $appSettings = Get-Content $appJsonFullName|ConvertFrom-Json
        $majorVersion = $appSettings.version.SubString(0,$appSettings.version.IndexOf("."))
        $minorVersion = $appSettings.version.SubString($appSettings.version.IndexOf(".")+1)
        $minorVersion = $minorVersion.SubString(0,$minorVersion.IndexOf("."))     
        Write-Host "##vso[build.updatebuildnumber]${majorVersion}.${minorVersion}.${appBuild}.${appRevision}"
    }
}

$mainAppFolder = $baseFolder
if(Test-Path "$baseFolder\app\app.json"){
    $mainAppFolder = Join-Path $baseFolder 'app'
}

if ($pipelineSettings.ResolveDependenciesFromArtifactFeed.value -eq 1) {
    Write-Host "---------------------------------------------------"
    Write-Host "Resolving Dependencies from Artifact Feed..."
    Write-Host "---------------------------------------------------"
    # Resolve-DependenciesFromAzureFeedCustom -organization "$ENV:SYSTEM_COLLECTIONURI" -feed $projectName -appsFolder $mainAppFolder -pat $devOpsPat -projectName $projectName -AlwaysUseLatestVersionFromArtifactFeed ($pipelineSettings.AlwaysUseLatestVersionFromArtifactFeed.value -eq 1)
    # Example value: $ArtifactFeedsForDependencies = "Comporsys.C365\Comporsys.C365,Comporsys.TDH\Comporsys.TDH,ThirdPartyApps"    
    if ($pipelineSettings.ArtifactFeedsForDependencies){
        $ignoredDependencies = @()
        foreach ($feedForDependency in $pipelineSettings.ArtifactFeedsForDependencies.value.Split(',')){
            if ($feedForDependency.Contains('\')){
                $projectNameFeed = $feedForDependency.Split('\')[0]
                $feedName2 = $feedForDependency.Split('\')[1]
                Resolve-DependenciesFromAzureFeedCustom `
                    -organization "$ENV:SYSTEM_COLLECTIONURI" `
                    -feed $feedName2 `
                    -appsFolder $mainAppFolder `
                    -pat $devOpsPat `
                    -projectName $projectNameFeed `
                    -AlwaysUseLatestVersionFromArtifactFeed ($pipelineSettings.AlwaysUseLatestVersionFromArtifactFeed.value -eq 1) `
                    -ignoredDependencies ([ref]$ignoredDependencies)
            }else{
                $projectNameFeed = '' #global feed
                $feedName2 = $feedForDependency
                Resolve-DependenciesFromAzureFeedCustom `
                    -organization "$ENV:SYSTEM_COLLECTIONURI" `
                    -feed $feedName2 `
                    -appsFolder $mainAppFolder `
                    -pat $devOpsPat `
                    -AlwaysUseLatestVersionFromArtifactFeed ($pipelineSettings.AlwaysUseLatestVersionFromArtifactFeed.value -eq 1) `
                    -ignoredDependencies ([ref]$ignoredDependencies)
            }
        }
    }else{
        Resolve-DependenciesFromAzureFeedCustom -organization "$ENV:SYSTEM_COLLECTIONURI" -feed $projectName -appsFolder $mainAppFolder -pat $devOpsPat -projectName $projectName -AlwaysUseLatestVersionFromArtifactFeed ($pipelineSettings.AlwaysUseLatestVersionFromArtifactFeed.value -eq 1)
    }

    if ($pipelineSettings.UseOnlyArtifactFeedAndIgnoreInstallAppsSetting.value -eq 1) {
        $installApps = @()
    } else {
        if ($installApps -is [String]) { $installApps = @($installApps.Split(',').Trim() | Where-Object { $_ }) }
        if (!$installApps) { $installApps = @() }
    }
    Get-ChildItem -Path "$mainAppFolder\.alpackages\*.app" -Recurse|ForEach-Object { $installApps +=  $_.FullName }

    $hasSymbolOnlyDependencies = $false
    Get-ChildItem -Path "$mainAppFolder\.alpackages\*.app" -Recurse|ForEach-Object { if(!$hasSymbolOnlyDependencies){$hasSymbolOnlyDependencies = IsSymbolsPackage -appFile $_.FullName }}
    Write-Host "Has Symbol only dependencies: $hasSymbolOnlyDependencies"
    if($hasSymbolOnlyDependencies){
        $CreateRuntimePackages = $false
    }
}
if ($installApps -and ($pipelineSettings.ResolveDependenciesFromArtifactFeed.value -eq 1) -and ($pipelineSettings.UseOnlyArtifactFeedAndIgnoreInstallAppsSetting.value -eq 1)){       
    $runtimeApps = @()
    $nonRuntimeApps = @() 
    foreach ($installApp in $installApps){
        if (IsRuntimePackage -appFile $installApp){
            $runtimeApps += $installApp
        }else{
            $nonRuntimeApps += $installApp
        }
    }
    #$runtimeApps = $installApps|Where-Object { $_.endswith('runtime.app') }
    #$nonRuntimeApps = $installApps|Where-Object { !$_.endswith('runtime.app') }
    if ($runtimeApps){
        $installApps = $runtimeApps
    }else{
        $installApps = @()
    }
    #only non runtime apps can be sorted with this function without any container
    if ($nonRuntimeApps){
        $nonRuntimeAppsSorted = Sort-AppFilesByDependencies -appFiles $nonRuntimeApps
        $installApps += $nonRuntimeAppsSorted
    }

}

$params = @{}
$insiderSasToken = "$ENV:insiderSasToken"
if($forceFlfLicense){
    $licenseFile = "$ENV:flfLicenseFile"
}
else {
    $licenseFile = "$ENV:licenseFile"    
}

$codeSigncertPfxFile = "$ENV:CodeSignCertPfxFile"
if (!$doNotSignApps -and $codeSigncertPfxFile) {
    if ("$ENV:CodeSignCertPfxPassword" -ne "") {
        $codeSignCertPfxPassword = try { "$ENV:CodeSignCertPfxPassword" | ConvertTo-SecureString } catch { ConvertTo-SecureString -String "$ENV:CodeSignCertPfxPassword" -AsPlainText -Force }
        $params = @{
            "codeSignCertPfxFile" = $codeSignCertPfxFile
            "codeSignCertPfxPassword" = $codeSignCertPfxPassword
        }
    }
    else {
        $codeSignCertPfxPassword = $null
    }
}

$allTestResults = "testresults*.xml"
$testResultsFile = Join-Path $baseFolder "TestResults.xml"
$testResultsFiles = Join-Path $baseFolder $allTestResults
if (Test-Path $testResultsFiles) {
    Remove-Item $testResultsFiles -Force
}

$fobFiles = @()
$NewBcContainer = $null
if ($fobFileFolders){
    $buildRoot = (Get-Item (Join-Path $PSScriptRoot "..\")).FullName
    foreach($fobFileFolder in $fobFileFolders){
        Write-Host "Fob File Folder: $fobFileFolder" -ForegroundColor Cyan
        $fobFileFolderFullPath = Join-Path $buildRoot $fobFileFolder
        #Write-Host "Fob File Folder Full: $fobFileFolderFullPath" -ForegroundColor Cyan
        foreach($f in Get-ChildItem -Path $fobFileFolderFullPath -Filter *.fob -Recurse){
            Write-Host $f
            $fobFiles += $f.FullName
        }
    }
    $fobFiles|Format-Table

    $NewBcContainer = {
        Param([Hashtable]$parameters)
        Write-Host "New BC Container on the way...";
        $parameters += @{"enableSymbolLoading" = $true};
        New-BcContainer @parameters;
        Invoke-ScriptInBcContainer $parameters.ContainerName -scriptblock { $progressPreference = 'SilentlyContinue' };
        Write-Host "Container is ready..." -ForegroundColor Green;
        Start-Sleep -Seconds 90
        foreach ($fobFile in $fobFiles){
            Write-Host "Importing fob file $fobFile...";
            Import-ObjectsToNavContainer -objectsFile $fobFile -containerName $containerName -ImportAction Overwrite -SynchronizeSchemaChanges Force
            Write-Host "Fob file imported.";
        }
        Write-Host "Generating Symbol Refs...";
        Generate-SymbolsInNavContainer -containerName $containerName;
        Start-Sleep -Seconds 90
        Write-Host "Symbol Refs. generated.";
    }
} else {
    Write-Host "No fob files folder specified. Go ahead as usual..."
}

$preCompileAppInBcContainer = $null
if ($enableAppSourceCop){
    $preCompileAppInBcContainer = {
        Param([string] $appType,[ref] $compilationParams)
        $appFolder = $compilationParams.value.appProjectFolder
        $appSourceCopJsonFile = Join-Path $appFolder "AppSourceCop.json"
        $appSourceCopJsonFileBackup = "${appSourceCopJsonFile}.bak"
        if (Test-Path -Path $appSourceCopJsonFileBackup -PathType leaf) {
            if (Test-Path -Path $appSourceCopJsonFile -PathType leaf) {
                Remove-Item -Path $appSourceCopJsonFile
            }
            Rename-Item -Path $appSourceCopJsonFileBackup -NewName "AppSourceCop.json"
        }
    }
}

$transscriptFullName = (Join-Path $PSScriptRoot "transcript.txt")

if (!$localMode){
    $DockerPull = { Param($imageName) docker pull $imageName }
}else{
    $DockerPull = { Param($imageName) }
    $imageName = ""
}

Start-Transcript -Path $transscriptFullName

Run-AlPipeline @params `
    -pipelinename $pipelineName `
    -containerName $containerName `
    -imageName $imageName `
    -artifact $artifact.replace('{INSIDERSASTOKEN}',$insiderSasToken) `
    -DockerPull $DockerPull `
    -memoryLimit $memoryLimit `
    -baseFolder $baseFolder `
    -licenseFile $LicenseFile `
    -installApps $installApps `
    -previousApps $previousApps `
    -appFolders $appFolders `
    -testFolders $testFolders `
    -doNotRunTests:$doNotRunTests `
    -testResultsFile $testResultsFile `
    -testResultsFormat 'JUnit' `
    -installTestFramework:$installTestFramework `
    -installTestLibraries:$installTestLibraries `
    -installPerformanceToolkit:$installPerformanceToolkit `
    -enableCodeCop:$enableCodeCop `
    -enableAppSourceCop:$enableAppSourceCop `
    -enablePerTenantExtensionCop:$enablePerTenantExtensionCop `
    -enableUICop:$enableUICop `
    -AppSourceCopMandatoryAffixes $appSourceCopMandatoryAffixes `
    -AppSourceCopSupportedCountries $appSourceCopSupportedCountries `
    -escapeFromCops `
    -additionalCountries $additionalCountries `
    -buildArtifactFolder $buildArtifactFolder `
    -CreateRuntimePackages:$CreateRuntimePackages `
    -appBuild $appBuild -appRevision $appRevision `
    -NewBcContainer $NewBcContainer `
    -PreCompileApp $preCompileAppInBcContainer `
    -doNotPublishApps:$hasSymbolOnlyDependencies   

Stop-Transcript

if (Test-Path $transscriptFullName){
    Copy-Item $transscriptFullName "$buildArtifactFolder\transscript.txt"
 }
 
. (Join-Path $PSScriptRoot "AnalyzeTranscript.ps1") -version $version -settingsFileName $settingsFileName

Write-Host "##vso[task.setvariable variable=TestResults]$allTestResults"

if (($pipelineSettings.PushBuildToArtifacts.value -eq 1) -and $devOpsPat){
    Set-Location "$ENV:SYSTEM_DEFAULTWORKINGDIRECTORY"

    $files = @() + (Get-ChildItem -Path "$buildArtifactFolder\Apps\*.app")
    if (($files.Count -gt 0) -and (Test-Path "$buildArtifactFolder\app.json")){

        New-Item -Name "app-package" -ItemType Directory
        
        Copy-Item -Path "$buildArtifactFolder\Apps\*" -Destination "app-package" -Recurse
        if (Test-Path("$buildArtifactFolder\README.md")){
            Copy-Item -Path "$buildArtifactFolder\README.md" -Destination "app-package\README.md"
        }
        
        $appJsonContent = Get-Content -Path "$buildArtifactFolder\app.json"|ConvertFrom-Json
        $packageName = $appJsonContent.id
        $packageDescription = $appJsonContent.name     
        Write-Host "Projectname: $projectName"
        . (Join-Path $PSScriptRoot "PublishArtifact.ps1") -devOpsPat $devOpsPat -projectName $projectName -feedName $projectName -relativePath "app-package\" -promoteArtifactPackage $false -packageName $packageName -packageDescription $packageDescription -version "${majorVersion}.${minorVersion}.${appBuild}"
    }
}

Full output of scripts

2024-03-14T04:23:33.3432755Z ##[section]Starting: Run Pipeline
2024-03-14T04:23:33.3544661Z ==============================================================================
2024-03-14T04:23:33.3544838Z Task         : PowerShell
2024-03-14T04:23:33.3544916Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-03-14T04:23:33.3545042Z Version      : 2.236.2
2024-03-14T04:23:33.3545120Z Author       : Microsoft Corporation
2024-03-14T04:23:33.3545221Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-03-14T04:23:33.3545349Z ==============================================================================
2024-03-14T04:23:34.3654017Z Generating script.
2024-03-14T04:23:34.4560594Z Formatted command: . 'D:\a\1\s\scripts\DevOps-Pipeline.ps1' -version "ci" -appBuild 7163 -appRevision 0 -baseFolder D:\a\1\s\XXX
2024-03-14T04:23:34.5048102Z ========================== Starting Command Output ===========================
2024-03-14T04:23:34.5329696Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\21185704-cea4-41ec-915a-d3374cbf7364.ps1'"
2024-03-14T04:23:34.8743273Z BUILD_DEFINITIONNAME: XXXXX
2024-03-14T04:23:34.8806072Z eyJ0e...
2024-03-14T04:23:34.8876368Z Organization: XXX-XXX
2024-03-14T04:23:34.8883475Z Project: XXXXXXXX
2024-03-14T04:23:34.8897183Z Url for variable group: https://dev.azure.com/
2024-03-14T04:23:34.9854580Z Getting pipeline settings 'PipelineSettings' successful.
2024-03-14T04:23:34.9967818Z 
2024-03-14T04:23:34.9972274Z 
2024-03-14T04:23:34.9985976Z AlwaysUseLatestVersionFromArtifactFeed         : @{value=1}
2024-03-14T04:23:34.9990359Z ArtifactFeedsForDependencies                   : @{value=XXX.XXX\XXX}
2024-03-14T04:23:35.0000544Z GenerateSasLinkForLatestApp                    : @{value=0}
2024-03-14T04:23:35.0006421Z PushBuildToArtifacts                           : @{value=1}
2024-03-14T04:23:35.0015884Z PushBuildToAzTransfer                          : @{value=1}
2024-03-14T04:23:35.0020020Z PushReadmeToWiki                               : @{value=1}
2024-03-14T04:23:35.0029356Z ReleaseShareName                               : @{value=build}
2024-03-14T04:23:35.0033426Z ReleaseShareSubFolder                          : @{value=/}
2024-03-14T04:23:35.0042618Z ResolveDependenciesFromArtifactFeed            : @{value=1}
2024-03-14T04:23:35.0046763Z UseOnlyArtifactFeedAndIgnoreInstallAppsSetting : @{value=1}
2024-03-14T04:23:35.0056746Z WikiRepoUrl                                    : @{value=https://dev.azure.com/}
2024-03-14T04:23:35.0066534Z 
2024-03-14T04:23:35.0078381Z Base Folder: 
2024-03-14T04:23:35.0084172Z D:\a\1\s\XXX
2024-03-14T04:23:35.1263932Z Set artifact = ///de/latest
2024-03-14T04:23:35.1315493Z Set pipelineName = MyApp-ci
2024-03-14T04:23:35.1348015Z Set containerName = hostedagent-myapp-ci
2024-03-14T04:23:35.1526763Z Set installApps = ''
2024-03-14T04:23:35.1554951Z Set previousApps = ''
2024-03-14T04:23:35.1564901Z Set appSourceCopMandatoryAffixes = ''
2024-03-14T04:23:35.1574917Z Set appSourceCopSupportedCountries = ''
2024-03-14T04:23:35.1604355Z Set appFolders = 'app'
2024-03-14T04:23:35.1653677Z Set testFolders = ''
2024-03-14T04:23:35.1703868Z Set memoryLimit = '6G'
2024-03-14T04:23:35.1740746Z Set additionalCountries = ''
2024-03-14T04:23:35.1767524Z Set genericImageName = ''
2024-03-14T04:23:35.1833103Z Set vaultNameForLocal = 'ALBuild'
2024-03-14T04:23:35.1872580Z Set bcContainerHelperVersion = 'latest'
2024-03-14T04:23:35.1908143Z Set installTestFramework = False
2024-03-14T04:23:35.1914914Z Set installTestLibraries = False
2024-03-14T04:23:35.1922909Z Set installPerformanceToolkit = False
2024-03-14T04:23:35.1946191Z Set enableCodeCop = True
2024-03-14T04:23:35.1973613Z Set enableAppSourceCop = True
2024-03-14T04:23:35.2002443Z Set enablePerTenantExtensionCop = True
2024-03-14T04:23:35.2030275Z Set enableUICop = True
2024-03-14T04:23:35.2059246Z Set doNotSignApps = True
2024-03-14T04:23:35.2068841Z Set doNotRunTests = False
2024-03-14T04:23:35.2098606Z Set cacheImage = True
2024-03-14T04:23:35.2124870Z Set CreateRuntimePackages = True
2024-03-14T04:23:35.2135779Z Set forceFlfLicense = False
2024-03-14T04:23:35.4952212Z Downloading https://bccontainerhelper.azureedge.net/public/6.0.9.zip
2024-03-14T04:23:37.8166943Z BcContainerHelper version 6.0.9
2024-03-14T04:23:40.2056985Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2024-03-14T04:23:40.3292670Z Running on Windows, PowerShell 5.1.20348.2227
2024-03-14T04:23:42.6813047Z Backup AppSourceCop.json files
2024-03-14T04:23:42.6869767Z D:\a\1\s\XXX\app\AppSourceCop.json
2024-03-14T04:23:42.7350005Z ---------------------------------------------------
2024-03-14T04:23:42.7350285Z Resolving Dependencies from Artifact Feed...
2024-03-14T04:23:42.7369489Z ---------------------------------------------------
2024-03-14T04:23:42.7404697Z 
2024-03-14T04:23:43.0846396Z Reading 1 app.json file(s)...
2024-03-14T04:23:43.0851078Z 
2024-03-14T04:23:43.0951347Z    XXX
2024-03-14T04:23:43.1009191Z      Added 3a9c42a0-165a-4522-99df-aa4efdcd7192 to ignored apps
2024-03-14T04:23:43.1009638Z 
2024-03-14T04:23:43.1024931Z Checking dependencies...
2024-03-14T04:23:43.1025310Z 
2024-03-14T04:23:43.1085575Z    XXX
2024-03-14T04:23:43.1122259Z      Checking dependencies...
2024-03-14T04:23:43.1200567Z      Name: XXX
2024-03-14T04:23:43.1232269Z      Publisher: XXX
2024-03-14T04:23:43.1238050Z      Checking artifact feed XXX
2024-03-14T04:23:43.3590497Z      Name: XXX
2024-03-14T04:23:43.3598004Z      Publisher: XXX
2024-03-14T04:23:43.3605472Z      Checking artifact feed XXX...
2024-03-14T04:23:44.2559914Z 
2024-03-14T04:23:44.2688055Z Reading 1 app.json file(s)...
2024-03-14T04:23:44.2688650Z 
2024-03-14T04:23:44.2708763Z    XXX
2024-03-14T04:23:44.2719613Z      Added 3a9c42a0-165a-4522-99df-aa4efdcd7192 to ignored apps
2024-03-14T04:23:44.2724087Z 
2024-03-14T04:23:44.2733267Z Checking dependencies...
2024-03-14T04:23:44.2737108Z 
2024-03-14T04:23:44.2773867Z    XXX
2024-03-14T04:23:44.2782683Z      Checking dependencies...
2024-03-14T04:23:44.2801625Z      Name: XXX
2024-03-14T04:23:44.2809354Z      Publisher: XXX
2024-03-14T04:23:44.2824866Z      Checking artifact feed XXX...
2024-03-14T04:23:44.3056478Z      Package Artifact URL: https://dev.azure.com/a
2024-03-14T04:23:44.3319467Z      Version 23.0.7162 (requested: 23.0.0, latest: 23.0.7162) has been found for Package with name 92c1cd32-bd59-46ef-9952-daa608ad2954 in project XXX and feed XXX.
2024-03-14T04:24:30.3924273Z {
2024-03-14T04:24:30.3939323Z   "Description": "XXX",
2024-03-14T04:24:30.3944004Z   "ManifestId": "9676D5B0C0687382964E171D6039AE46B3881C87DC1B6CB9CA6681F9E9B3B73901",
2024-03-14T04:24:30.3954871Z   "PackageSize": 74427,
2024-03-14T04:24:30.3958941Z   "SuperRootId": "14631E30CCBFF698D17EF4604F699DF80ED5EED8F59A7A5B0CD7C14F6E8D655502",
2024-03-14T04:24:30.3967874Z   "Version": "23.0.7162"
2024-03-14T04:24:30.3970907Z }
2024-03-14T04:24:30.4934672Z      Downloaded completed.
2024-03-14T04:24:30.5021696Z      Copied to D:\a\1\s\XXX\app\.alpackages
2024-03-14T04:24:30.5028262Z 
2024-03-14T04:24:31.7159567Z       XXX
2024-03-14T04:24:31.7167378Z         Checking dependencies...
2024-03-14T04:24:31.7185494Z         Name: XXX.XXX
2024-03-14T04:24:31.7192322Z         Publisher: XXX
2024-03-14T04:24:31.7202409Z         Checking artifact feed XXX...
2024-03-14T04:24:31.7363642Z         Package Artifact URL: https://dev.azure.com/
2024-03-14T04:24:31.7671928Z         Version 23.0.6798 (requested: 23.0.0, latest: 23.4.7144) has been found for Package with name 233f62ec-6dab-44e2-8b2b-5987aa809028 in project XXX and feed XXX.
2024-03-14T04:24:35.7668379Z {
2024-03-14T04:24:35.7746923Z   "Description": "XXX",
2024-03-14T04:24:35.7772077Z   "ManifestId": "D37FEEF2D7DC1CED7489963291C749A2ED2F7041FA3F8C148DC6A9AFCBE8D7D101",
2024-03-14T04:24:35.7799532Z   "PackageSize": 103682,
2024-03-14T04:24:35.7857077Z   "SuperRootId": "BBFD43FF1C6CB037724727464F3194CC816B101CE01484C0C0DFBAD6FD33191302",
2024-03-14T04:24:35.7866851Z   "Version": "23.4.7144"
2024-03-14T04:24:35.7921196Z }
2024-03-14T04:24:35.7930298Z         Downloaded completed.
2024-03-14T04:24:35.7934552Z         Copied to D:\a\1\s\XXX\app\.alpackages
2024-03-14T04:24:35.7938401Z 
2024-03-14T04:24:36.1970835Z          XXX
2024-03-14T04:24:36.1977753Z            No more dependencies.
2024-03-14T04:24:36.2449864Z      Name: XXX
2024-03-14T04:24:36.2468002Z      Publisher: akquinet NEXT GmbH
2024-03-14T04:24:36.2472382Z      Checking artifact feed XXX...
2024-03-14T04:24:36.2731390Z      Package Artifact URL: https://dev.azure.com/
2024-03-14T04:24:36.2928292Z      Version 23.0.7068 (requested: 23.0.0, latest: 23.0.7068) has been found for Package with name c2ad61cb-213e-4644-8e11-4f28dc893e82 in project XXX and feed XXXN.
2024-03-14T04:24:39.9696772Z {
2024-03-14T04:24:39.9712061Z   "Description": "XXX",
2024-03-14T04:24:39.9729658Z   "ManifestId": "A2D99F3CC42FEFC66C5993C85FC3BAD9990F65D0F4ED9E399277D9F13957785B01",
2024-03-14T04:24:39.9739132Z   "PackageSize": 28821,
2024-03-14T04:24:39.9868647Z   "SuperRootId": "A83D862C4D7C9CD25A9CFF4CEC773858F0DF75745F556DB32B480399A64B137B02",
2024-03-14T04:24:39.9996309Z   "Version": "23.0.7068"
2024-03-14T04:24:40.1225323Z }
2024-03-14T04:24:40.1758334Z      Downloaded completed.
2024-03-14T04:24:40.1803628Z      Copied to D:\a\1\s\XXX\app\.alpackages
2024-03-14T04:24:40.1804505Z 
2024-03-14T04:24:40.1805014Z       XXX
2024-03-14T04:24:40.1805459Z         Checking dependencies...
2024-03-14T04:24:40.1828517Z         Name: XXX.XXX
2024-03-14T04:24:40.1844402Z         Publisher: XXX
2024-03-14T04:24:40.1848036Z         Checking artifact feed XXX...
2024-03-14T04:24:40.1984177Z         Package Artifact URL: https://dev.azure.com/
2024-03-14T04:24:40.3622021Z         Version 23.0.6798 (requested: 23.0.0, latest: 23.4.7144) has been found for Package with name 233f62ec-6dab-44e2-8b2b-5987aa809028 in project XXX and feed XXX.
2024-03-14T04:24:44.1900010Z {
2024-03-14T04:24:44.1942889Z   "Description": "XXX",
2024-03-14T04:24:44.2006852Z   "ManifestId": "D37FEEF2D7DC1CED7489963291C749A2ED2F7041FA3F8C148DC6A9AFCBE8D7D101",
2024-03-14T04:24:44.2018242Z   "PackageSize": 103682,
2024-03-14T04:24:44.2143041Z   "SuperRootId": "BBFD43FF1C6CB037724727464F3194CC816B101CE01484C0C0DFBAD6FD33191302",
2024-03-14T04:24:44.2154857Z   "Version": "23.4.7144"
2024-03-14T04:24:44.2159211Z }
2024-03-14T04:24:44.2168384Z         Downloaded completed.
2024-03-14T04:24:44.2171581Z         XXX.CORE_23.4.7144.0.app already exists in output folder
2024-03-14T04:24:46.3810502Z Has Symbol only dependencies: False
2024-03-14T04:24:49.2042559Z No fob files folder specified. Go ahead as usual...
2024-03-14T04:24:49.2054752Z Transcript started, output file is D:\a\1\s\scripts\transcript.txt
2024-03-14T04:24:49.7381906Z Determining artifacts to use
2024-03-14T04:25:02.6118738Z   _____                               _
2024-03-14T04:25:02.6131267Z  |  __ \                             | |
2024-03-14T04:25:02.6135393Z  | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
2024-03-14T04:25:02.6149841Z  |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
2024-03-14T04:25:02.6156453Z  | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
2024-03-14T04:25:02.6165416Z  |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/
2024-03-14T04:25:02.6170631Z 
2024-03-14T04:25:02.6178638Z Pipeline name                   MyApp-ci
2024-03-14T04:25:02.6187559Z Container name                  hostedagent-myapp-ci
2024-03-14T04:25:02.6198040Z Image name                      
2024-03-14T04:25:02.6201705Z ArtifactUrl                     https://bcartifacts.azureedge.net/sandbox/23.5.16502.17362/de
2024-03-14T04:25:02.6226794Z SasToken                        Not Specified
2024-03-14T04:25:02.6242710Z BcAuthContext                   Not Specified
2024-03-14T04:25:02.6252096Z Environment                     
2024-03-14T04:25:02.6270632Z ReUseContainer                  False
2024-03-14T04:25:02.6282135Z KeepContainer                   False
2024-03-14T04:25:02.6300954Z useCompilerFolder               False
2024-03-14T04:25:02.6312108Z artifactCachePath               
2024-03-14T04:25:02.6327452Z useDevEndpoint                  False
2024-03-14T04:25:02.6342013Z Auth                            UserPassword
2024-03-14T04:25:02.6354175Z CompanyName                     
2024-03-14T04:25:02.6365921Z MemoryLimit                     6G
2024-03-14T04:25:02.6383587Z FailOn                          none
2024-03-14T04:25:02.6398629Z TreatTestFailuresAsWarnings     False
2024-03-14T04:25:02.6413726Z Enable Task Scheduler           False
2024-03-14T04:25:02.6428716Z Assign Premium Plan             False
2024-03-14T04:25:02.6444065Z Install Test Runner             False
2024-03-14T04:25:02.6458354Z Install Test Framework          False
2024-03-14T04:25:02.6475517Z Install Test Libraries          False
2024-03-14T04:25:02.6489292Z Install Perf. Toolkit           False
2024-03-14T04:25:02.6506336Z InstallOnlyReferencedApps       False
2024-03-14T04:25:02.6521370Z generateDependencyArtifact      False
2024-03-14T04:25:02.6537396Z CopySymbolsFromContainer        False
2024-03-14T04:25:02.6550428Z enableCodeCop                   True
2024-03-14T04:25:02.6565747Z enableAppSourceCop              True
2024-03-14T04:25:02.6581156Z enableUICop                     True
2024-03-14T04:25:02.6596599Z enablePerTenantExtensionCop     True
2024-03-14T04:25:02.6610790Z enableCodeAnalyzersOnTestApps   False
2024-03-14T04:25:02.6626210Z doNotPerformUpgrade             False
2024-03-14T04:25:02.6641066Z doNotPublishApps                False
2024-03-14T04:25:02.6656429Z uninstallRemovedApps            False
2024-03-14T04:25:02.6669486Z escapeFromCops                  True
2024-03-14T04:25:02.6684232Z doNotBuildTests                 False
2024-03-14T04:25:02.6700983Z doNotRunTests                   False
2024-03-14T04:25:02.6716471Z doNotRunBcptTests               False
2024-03-14T04:25:02.6730499Z useDefaultAppSourceRuleSet      False
2024-03-14T04:25:02.6742341Z rulesetFile                     
2024-03-14T04:25:02.6757114Z generateErrorLog                False
2024-03-14T04:25:02.6772591Z enableExternalRulesets          False
2024-03-14T04:25:02.6788223Z azureDevOps                     False
2024-03-14T04:25:02.6803703Z gitLab                          False
2024-03-14T04:25:02.6815529Z gitHubActions                   False
2024-03-14T04:25:02.6829098Z vsixFile                        
2024-03-14T04:25:02.6843289Z License file                    Specified
2024-03-14T04:25:02.6855449Z CodeSignCertPfxFile             Not specified
2024-03-14T04:25:02.6878787Z CodeSignCertPfxPassword         Not specified
2024-03-14T04:25:02.6913201Z CodeSignCertIsSelfSigned        False
2024-03-14T04:25:02.6922881Z KeyVaultCertPfxFile             Not specified
2024-03-14T04:25:02.6931991Z KeyVaultCertPfxPassword         Not specified
2024-03-14T04:25:02.6944227Z KeyVaultClientId                
2024-03-14T04:25:02.6956330Z BuildOutputFile                 
2024-03-14T04:25:02.6965081Z ContainerEventLogFile           
2024-03-14T04:25:02.6981353Z TestResultsFile                 D:\a\1\s\XXX\TestResults.xml
2024-03-14T04:25:02.7008269Z BcptTestResultsFile             D:\a\1\s\XXX\bcptTestResults.json
2024-03-14T04:25:02.7025891Z TestResultsFormat               JUnit
2024-03-14T04:25:02.7063174Z AdditionalCountries             
2024-03-14T04:25:02.7076449Z PackagesFolder                  D:\a\1\s\XXX\.packages
2024-03-14T04:25:02.7092665Z OutputFolder                    D:\a\1\s\XXX\.output
2024-03-14T04:25:02.7107284Z BuildArtifactFolder             D:\a\1\a
2024-03-14T04:25:02.7125442Z CreateRuntimePackages           True
2024-03-14T04:25:02.7138208Z AppVersion                      
2024-03-14T04:25:02.7155645Z AppBuild                        7163
2024-03-14T04:25:02.7172990Z AppRevision                     0
2024-03-14T04:25:02.7185451Z SourceRepositoryUrl             
2024-03-14T04:25:02.7199961Z SourceCommit                    
2024-03-14T04:25:02.7215245Z BuildBy                         BcContainerHelper,6.0.9
2024-03-14T04:25:02.7227899Z BuildUrl                        
2024-03-14T04:25:02.7238810Z Mandatory Affixes               
2024-03-14T04:25:02.7251815Z Supported Countries             
2024-03-14T04:25:02.7264320Z ObsoleteTagMinAllowedMajorMinor 
2024-03-14T04:25:02.7271794Z Install Apps
2024-03-14T04:25:02.7284133Z - D:\a\1\s\XXX.CORE_23.4.7144.0.app
2024-03-14T04:25:02.7293864Z - D:\a\1\s\XXX2_23.0.7068.0.app
2024-03-14T04:25:02.7303886Z - D:\a\1\s\XXX3_23.0.7162.0.app
2024-03-14T04:25:02.7308259Z Install Test Apps
2024-03-14T04:25:02.7324361Z - None
2024-03-14T04:25:02.7331061Z Previous Apps
2024-03-14T04:25:02.7337603Z - None
2024-03-14T04:25:02.7344352Z Application folders
2024-03-14T04:25:02.7355577Z - D:\a\1\s\XXX\app
2024-03-14T04:25:02.7359629Z Test application folders
2024-03-14T04:25:02.7367580Z - None
2024-03-14T04:25:02.7375487Z BCPT Test application folders
2024-03-14T04:25:02.7383540Z - None
2024-03-14T04:25:02.7397016Z BCPT Test suites
2024-03-14T04:25:02.7407925Z - None
2024-03-14T04:25:02.7412432Z Custom CodeCops
2024-03-14T04:25:02.7418449Z - None
2024-03-14T04:25:02.7454998Z DockerPull override
2024-03-14T04:25:02.7489090Z  Param($imageName) docker pull $imageName 
2024-03-14T04:25:02.7516999Z Custom pre-compilation script defined.
2024-03-14T04:25:02.7523122Z 
2024-03-14T04:25:02.7530580Z         Param([string] $appType,[ref] $compilationParams)
2024-03-14T04:25:02.7539917Z         $appFolder = $compilationParams.value.appProjectFolder
2024-03-14T04:25:02.7545696Z         $appSourceCopJsonFile = Join-Path $appFolder "AppSourceCop.json"
2024-03-14T04:25:02.7561732Z         $appSourceCopJsonFileBackup = "${appSourceCopJsonFile}.bak"
2024-03-14T04:25:02.7566331Z         if (Test-Path -Path $appSourceCopJsonFileBackup -PathType leaf) {
2024-03-14T04:25:02.7575882Z             if (Test-Path -Path $appSourceCopJsonFile -PathType leaf) {
2024-03-14T04:25:02.7585699Z                 Remove-Item -Path $appSourceCopJsonFile
2024-03-14T04:25:02.7595385Z             }
2024-03-14T04:25:02.7604681Z             Rename-Item -Path $appSourceCopJsonFileBackup -NewName "AppSourceCop.json"
2024-03-14T04:25:02.7609096Z         }
2024-03-14T04:25:02.7619376Z     
2024-03-14T04:25:02.7620083Z 
2024-03-14T04:25:02.7628668Z   _____       _ _ _                                          _        _
2024-03-14T04:25:02.7633117Z  |  __ \     | | (_)                                        (_)      (_)
2024-03-14T04:25:02.7642061Z  | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___
2024-03-14T04:25:02.7646700Z  |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
2024-03-14T04:25:02.7655852Z  | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
2024-03-14T04:25:02.7660207Z  |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
2024-03-14T04:25:02.7674608Z                            __/ |   __/ |                                                 __/ |
2024-03-14T04:25:02.7675162Z                           |___/   |___/                                                 |___/
2024-03-14T04:25:02.7675435Z 
2024-03-14T04:25:03.4729853Z Pulling mcr.microsoft.com/businesscentral:ltsc2022
2024-03-14T04:34:54.8128016Z 
2024-03-14T04:34:54.8374133Z Pulling generic image took 592 seconds
2024-03-14T04:34:54.8651610Z 
2024-03-14T04:34:54.8660607Z    _____                _   _                               _        _
2024-03-14T04:34:54.8675201Z   / ____|              | | (_)                             | |      (_)
2024-03-14T04:34:54.8686280Z  | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __
2024-03-14T04:34:54.8788134Z  | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
2024-03-14T04:34:54.8789184Z  | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |
2024-03-14T04:34:54.8789955Z   \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
2024-03-14T04:34:54.8790656Z                                      __/ |
2024-03-14T04:34:54.8794301Z                                     |___/
2024-03-14T04:34:54.8794453Z 
2024-03-14T04:34:55.2269279Z Creaing docker container
2024-03-14T04:34:55.4240386Z WARNING: Container name should not exceed 15 characters
2024-03-14T04:34:55.6897649Z BcContainerHelper is version 6.0.9
2024-03-14T04:34:55.6903613Z BcContainerHelper is running as administrator
2024-03-14T04:35:03.0085581Z HyperV is Enabled
2024-03-14T04:35:03.0110066Z UsePsSession is True
2024-03-14T04:35:03.0144850Z Host is Microsoft Windows Server 2022 Datacenter - 10.0.20348.2322
2024-03-14T04:35:03.2030213Z Docker Client Version is 24.0.7
2024-03-14T04:35:03.2036521Z Docker Server Version is 24.0.7
2024-03-14T04:35:03.3832954Z Removing Desktop shortcuts
2024-03-14T04:35:03.4985875Z Downloading artifact /sandbox/23.5.16502.17362/de
2024-03-14T04:35:03.5519277Z Downloading C:\Users\VssAdministrator\AppData\Local\Temp\b1eb21c6-78ba-4138-a564-dbeca70b9a72.zip
2024-03-14T04:35:03.5651435Z Downloading using WebClient
2024-03-14T04:35:21.6933630Z Unpacking artifact to tmp folder using 7zip
2024-03-14T04:35:30.7185915Z Downloading platform artifact /sandbox/23.5.16502.17362/platform
2024-03-14T04:35:30.7216248Z Downloading C:\Users\VssAdministrator\AppData\Local\Temp\6eeae2c7-d088-4423-bbb2-fe9519a52603.zip
2024-03-14T04:35:30.7228720Z Downloading using WebClient
2024-03-14T04:35:54.4076155Z Unpacking artifact to tmp folder using 7zip
2024-03-14T04:36:12.6006584Z Downloading Prerequisite Components
2024-03-14T04:36:12.6172062Z Downloading c:\bcartifacts.cache\sandbox\23.5.16502.17362\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
2024-03-14T04:36:12.6183534Z Downloading using WebClient
2024-03-14T04:36:12.7647392Z Downloading c:\bcartifacts.cache\sandbox\23.5.16502.17362\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
2024-03-14T04:36:12.7654520Z Downloading using WebClient
2024-03-14T04:36:15.7076094Z Fetching all docker images
2024-03-14T04:36:15.8692884Z Fetching all docker volumes
2024-03-14T04:36:15.9795053Z Using image mcr.microsoft.com/businesscentral:ltsc2022
2024-03-14T04:36:16.4404098Z Creating Container hostedagent-myapp-ci
2024-03-14T04:36:16.4409688Z Style: sandbox
2024-03-14T04:36:16.4417701Z Multitenant: Yes
2024-03-14T04:36:16.4426385Z Version: 23.5.16502.17362
2024-03-14T04:36:16.4433019Z Platform: 23.0.17294.0
2024-03-14T04:36:16.4451292Z Generic Tag: 1.0.2.17
2024-03-14T04:36:16.4474806Z Container OS Version: 10.0.20348.2340 (ltsc2022)
2024-03-14T04:36:16.4485093Z Host OS Version: 10.0.20348.2322 (ltsc2022)
2024-03-14T04:36:16.4584463Z Using hyperv isolation
2024-03-14T04:36:16.4654353Z Using locale de-DE
2024-03-14T04:36:16.4712826Z Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
2024-03-14T04:36:16.4801689Z Using license file https://xxx.blob.core.windows.net/licensefiles/xxx.bclicense
2024-03-14T04:36:16.4822964Z Downloading C:\ProgramData\BcContainerHelper\Extensions\hostedagent-myapp-ci\my\license.bclicense
2024-03-14T04:36:16.4832809Z Downloading using WebClient
2024-03-14T04:36:16.5834857Z Additional Parameters:
2024-03-14T04:36:16.5847508Z --volume "D:\a\1\s\XXX:c:\sources"
2024-03-14T04:36:16.5855938Z --env customNavSettings=EnableTaskScheduler=False
2024-03-14T04:36:16.5863593Z Files in C:\ProgramData\BcContainerHelper\Extensions\hostedagent-myapp-ci\my:
2024-03-14T04:36:16.5891534Z - AdditionalOutput.ps1
2024-03-14T04:36:16.5905038Z - HelperFunctions.ps1
2024-03-14T04:36:16.5909734Z - license.bclicense
2024-03-14T04:36:16.5920466Z - MainLoop.ps1
2024-03-14T04:36:16.5931001Z - SetupVariables.ps1
2024-03-14T04:36:16.5941251Z - updatehosts.ps1
2024-03-14T04:36:16.5946568Z Creating container hostedagent-myapp-ci from image mcr.microsoft.com/businesscentral:ltsc2022
2024-03-14T04:36:18.1093312Z 20a2d6b76d69c179ca2b39b2969833e015b9f6aa998cac334ea47601cae371dd
2024-03-14T04:36:18.9807174Z New-BcContainer Telemetry Correlation Id: 3e71969a-1317-458a-8607-e5830b7a5792
2024-03-14T04:36:19.2178926Z Removing entries from hosts
2024-03-14T04:36:19.2541115Z Removing hostedagent-myapp-ci from container hosts file
2024-03-14T04:36:19.3598336Z Removing hostedagent-myapp-ci-* from container hosts file
2024-03-14T04:36:19.3708406Z Removing Desktop shortcuts
2024-03-14T04:36:19.3718388Z Removing C:\ProgramData\BcContainerHelper\Extensions\hostedagent-myapp-ci
2024-03-14T04:36:19.7927385Z Run-AlPipeline Telemetry Correlation Id: 20378514-3845-49a9-a186-d652ab2b1ce3
2024-03-14T04:36:20.5347997Z ##[error]DockerDo : docker: Error response from daemon: hcs::CreateComputeSystem 
20a2d6b76d69c179ca2b39b2969833e015b9f6aa998cac334ea47601cae371dd: The virtual machine could not be started because a 
required feature is not installed.
ExitCode: 125
Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label 
version=23.5.16502.17362 --label platform=23.0.17294.0 --label country=DE --env 
artifactUrl=https://bcartifacts.azureedge.net/sandbox/23.5.16502.17362/de --env multitenant=Y --env 
licenseFile="c:\run\my\license.bclicense" --name hostedagent-myapp-ci --hostname hostedagent-myapp-ci --env 
auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=de-DE --env databaseServer="" --env 
databaseInstance="" --volume "C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume 
"C:\ProgramData\BcContainerHelper\Extensions\hostedagent-myapp-ci\my:C:\Run\my" --isolation hyperv --restart 
unless-stopped --env filesOnly=False --memory 6G --env enableApiServices=Y --env useSSL=N --volume 
"c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=XXX= --env 
passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --volume 
"D:\a\1\s\XXX:c:\sources" --env customNavSettings=EnableTaskScheduler=False 
--env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:ltsc2022
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.9\ContainerHandling\New-NavContainer.ps1:1970 
char:15
+ ...       if (!(DockerDo -accept_eula -accept_outdated:$accept_outdated - ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo
2024-03-14T04:36:20.5541741Z ##[error]PowerShell exited with code '1'.
2024-03-14T04:36:20.7996210Z ##[section]Async Command Start: Update Build Number
2024-03-14T04:36:20.8005745Z Update build number to 23.0.7163.0 for build 7163
2024-03-14T04:36:20.8006000Z ##[section]Async Command End: Update Build Number
2024-03-14T04:36:20.8024102Z ##[section]Finishing: Run Pipeline

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

Additional context

  • does it happen all the time? - since today
  • did it use to work? - yesterday it worked
@freddydk
Copy link
Contributor

freddydk commented Mar 14, 2024

It tries to use HyperV isolation, because it states that HyperV is enabled - but it looks like HyperV is not working.
If you update your host machine with the latest windows update, then it should work.
I will investigate if I can default to process isolation in this case (for the next version).

@sauerkreut
Copy link
Author

We are using vmImage: 'Windows-Latest' ( https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software ). So I am very limited with windows updates.

@freddydk
Copy link
Contributor

Got it - try to insert this line after loading BcContainerHelper:

$bcContainerHelperConfig.defaultNewContainerParameters = @{ "isolation" = "Process" }

@MartinFellow
Copy link

Hey @freddydk
We are experiencing the same issues in our AL-go for github this morning.
Can we add the same parameter there is a way or what to do there?
Thanks

@freddydk
Copy link
Contributor

I will ship a fix for this in containerhelper asap.

@freddydk freddydk mentioned this issue Mar 14, 2024
freddydk added a commit that referenced this issue Mar 14, 2024
Fixes #3415

Co-authored-by: freddydk <[email protected]>
@freddydk
Copy link
Contributor

Should be working again in approx. 1 hour

@rdebath
Copy link

rdebath commented Mar 14, 2024

PS: Oops, you closed it.

Ltsc2019 is also being chosen for Windows 10, HyperV not installed.

2024-03-14T07:25:04.1226600Z Generic Tag: 1.0.2.17
2024-03-14T07:25:04.1630572Z Container OS Version: 10.0.17763.5576 (ltsc2019)
2024-03-14T07:25:04.1645309Z Host OS Version: 10.0.19045.4170 (22H2)
2024-03-14T07:25:04.1701450Z WARNING: Host OS and Base Image Container OS doesn't match and process isolation is specified. If you encounter issues, you could try to specify -isolation hyperv
2024-03-14T07:25:04.1709749Z Using process isolation
2024-03-14T07:26:37.1143303Z Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant -includeTestToolkit -includeTestLibrariesOnly
2024-03-14T07:26:37.3328832Z  ---> Running in 82225614aff6
2024-03-14T07:26:40.4013128Z DockerDo : hcs::CreateComputeSystem 82225614aff6b80974637bd17d8556a3a9486501ceba3d3735105199e0600956: The container 
2024-03-14T07:26:40.4014374Z operating system does not match the host operating system.
2024-03-14T07:26:40.4014716Z ExitCode: 1
2024-03-14T07:26:40.4016360Z Commandline: docker build --isolation=process --memory 8G --no-cache --tag navimage:daily-gb.4 
2024-03-14T07:26:40.4017087Z c:\bcartifacts.cache\yzxzhwh5.yym
2024-03-14T07:26:40.4018958Z At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.9\ContainerHandling\New-NavImage.ps1:715 char:27
2024-03-14T07:26:40.4020790Z + ...       if (!(DockerDo -command build -parameters @("--isolation=$isola ...
2024-03-14T07:26:40.4021305Z +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-03-14T07:26:40.4021925Z     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
2024-03-14T07:26:40.4022526Z     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo
2024-03-14T07:26:40.4023071Z  
2024-03-14T07:26:40.4984930Z ##[error]PowerShell exited with code '1'.

@freddydk
Copy link
Contributor

@rdebath - it was closed with the checkin (even though the version isn't shipped yet)
On Windows 10 - there are no supported Container OS' for Windows 10 - we will have to use Windows Server 2019 with HyperV isolation. Sorry, but there is nothing I can do about that.
Today, you can still point out the generic image (version 1.0.2.15) which still exists - but after March 25th - they will be gone.

@freddydk
Copy link
Contributor

I might document how people can build the generic image themselves if they are running in a configuration like this - I am just not sure whether the old "hack" of running the 20H2 container will work much longer - that will likely be removed as well.

@mjegob
Copy link

mjegob commented Mar 14, 2024

Hi @freddydk thanks for the quick fix!

Will you be creating an official release today or will the fix only be available in the preview for now?

@mjegob
Copy link

mjegob commented Mar 14, 2024

@freddydk ah i see that you created the release.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants