microsoft / navcontainerhelper

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

The virtual machine could not be started because a required fe ature is not installed. #3501

Open Sarerd opened 4 months ago

Sarerd commented 4 months ago

Hi, im trying to create a new docker environment but get the error: "The virtual machine could not be started because a required feature is not installed". What am I doing wrong?

Scripts used to create container and cause the issue

$containerName = 'name'
$password = 'zzz'
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
$credential = New-Object pscredential 'xxx', $securePassword
$auth = 'UserPassword'
$artifactUrl = Get-BcArtifactUrl -type 'OnPrem' -country 'se' -select 'Latest' -version '23.2'

New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -updateHosts

Full output of scripts $containerName = 'name' $password = 'zzz' $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $credential = New-Object pscredential 'xxx', $securePassword $auth = 'UserPassword' $artifactUrl = Get-BcArtifactUrl -type 'OnPrem' -country 'se' -select 'Latest' -version '23.2'

New-BcContainer -accept_eula -containerName $containerName -credential $credential -auth $auth -artifactUrl $artifactUrl -updateHosts BcContainerHelper is version 6.0.15 BcContainerHelper is running as administrator HyperV is Enabled UsePsSession is True UsePwshForBc24 is True Host is Microsoft Windows 10 Business - 10.0.19045.4291 Docker Client Version is 26.0.0 Docker Server Version is 26.0.0 Removing Desktop shortcuts Fetching all docker images Fetching all docker volumes Using image mcr.microsoft.com/businesscentral:ltsc2019 Creating Container name Style: onprem Multitenant: No Version: 23.2.14098.14562 Platform: 23.0.14532.0 Generic Tag: 1.0.2.19 Container OS Version: 10.0.17763.5696 (ltsc2019) Host OS Version: 10.0.19045.4291 (22H2) Using hyperv isolation Using locale sv-SE Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in C:\ProgramData\BcContainerHelper\Extensions\name\my:

freddydk commented 4 months ago

You need HyperV in order to run Business Central containers on Windows 10.

Sarerd commented 4 months ago

I have HyperV, It says "HyperV is Enabled" in the Output of the script and HyperV is checked in Enable or disable windows functions

freddydk commented 4 months ago

OK, I can see that - that error is usually because of hyperv. Maybe a restart of the host? can you run a windows servercore image using hyperv isolation?

Sarerd commented 4 months ago

I did restart it and upgrade docker to the latest version but this did not make any difference sadly

freddydk commented 4 months ago

Are you able to run a normal windows servercore image using hyperv?

Sarerd commented 4 months ago

When i try that it only sais, Failed to run image. (HTTP code 500) server error - hcs::CreateComputeSystem 506118e023663355bd7bf4b8c2caa720dfa2b03661ce9708cba7adddecaa31c5: The virtual machine could not be started because a required feature is not installed.

freddydk commented 4 months ago

Which is the same as when trying to run Business Central using hyperv. I don't know what you are missing or how you can fix it - but it is something local to your machine, not something I can troubleshoot from here.