microsoft / navcontainerhelper

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

New-BcContainer with memoryLimit fails after Windows Update #3120

Closed dominicstarkl closed 1 year ago

dominicstarkl commented 1 year ago

After update to the latest Windows version, it is not possible any more to create Docker Containers using New-BcContainer and specifying memoryLimit.

BcContainerHelper version: https://www.powershellgallery.com/packages/BcContainerHelper/5.0.4 Also tried with preview: https://www.powershellgallery.com/packages/BcContainerHelper/5.0.5-preview1053

OS information

Docker info

C:\Windows\System32>docker version
Client:
 Cloud integration: v1.0.35
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:53:15 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.21.1 (114176)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.24)
  Go version:       go1.20.4
  Git commit:       659604f9
  Built:            Thu May 25 21:52:13 2023
  OS/Arch:          windows/amd64
  Experimental:     false

Scripts used to create container and cause the issue

$containerName = 'bc22-test'
$credential = Get-Credential -Message 'Using UserPassword authentication. Please enter credentials for the container.'
$auth = 'UserPassword'
$artifactUrl = Get-BcArtifactUrl -type 'OnPrem' -version '22.3.58346.58453' -country 'w1' -select 'Closest'
$licenseFile = '\\s10355-fs001.logico-solutions.local\devops\licences\fin22.bclicense'

New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -multitenant:$false `
    -assignPremiumPlan `
    -licenseFile $licenseFile `
    -memoryLimit 4G `
    -updateHosts `
    -doNotExportObjectsToText `
    -shortcuts DesktopFolder `
    -useTraefik:$false `
    -accept_outdated `
    -useBestContainerOS `
    -enableTaskScheduler

When I remove the memoryLimit switch, the container is successfully created.

Also, when I use the following script, there is no error, and the memoryLimit is set correctly:

$url = Get-BCArtifactUrl -select Latest -type OnPrem -country w1
$cred = Get-Credential
New-BcContainer -accept_eula -artifactUrl $url -Credential $cred -auth UserPassword -memoryLimit 8G

Full output of scripts

C:\WINDOWS\system32> C:\Temp\HandsOn-Testing\_CreateDockerEnv2.ps1
BcContainerHelper version 5.0.4
BC.HelperFunctions emits usage statistics telemetry to Microsoft
BcContainerHelper is version 5.0.4
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is True
Host is Microsoft Windows 11 Enterprise - 10.0.22621.1992
Docker Client Version is 24.0.2
Docker Server Version is 24.0.2
Removing Session bc22-test
Removing container bc22-test
Removing entries from hosts
Removing bc22-test from container hosts file
Removing bc22-test-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\bc22-test
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1850
Creating Container bc22-test
Style: onprem
Multitenant: No
Version: 22.3.58346.58453
Platform: 22.0.58423.0
Generic Tag: 1.0.2.14
Container OS Version: 10.0.20348.1850 (ltsc2022)
Host OS Version: 10.0.22621.1992 (22H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file \\s10355-fs001.logico-solutions.local\devops\licences\fin22.bclicense
Additional Parameters:
--env customNavSettings=EnableTaskScheduler=True
Files in C:\ProgramData\BcContainerHelper\Extensions\bc22-test\my:
- AdditionalOutput.ps1
- license.bclicense
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bc22-test from image mcr.microsoft.com/businesscentral:10.0.20348.1850
135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a
Waiting for container bc22-test to be ready
Using artifactUrl https://bcartifacts.azureedge.net/onprem/22.3.58346.58453/w1
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\onprem\22.3.58346.58453\platform\ServiceTier\Program Files
c:\dl\onprem\22.3.58346.58453\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\onprem\22.3.58346.58453\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\onprem\22.3.58346.58453\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\onprem\22.3.58346.58453\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\onprem\22.3.58346.58453\platform
c:\dl\onprem\22.3.58346.58453\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\onprem\22.3.58346.58453\platform\ConfigurationPackages
Copying Test Assemblies
C:\dl\onprem\22.3.58346.58453\platform\Test Assemblies
Copying Applications
C:\dl\onprem\22.3.58346.58453\platform\Applications
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Stopping Business Central Service Tier
Installation took 73 seconds
Installation complete
Initializing...
Setting host.docker.internal to 10.0.8.109 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 10.0.8.109 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.16.1.1 in container hosts file
Starting Container
Hostname is bc22-test
PublicDnsName is bc22-test
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 4C4064BB6BBB5B8C06A92948D6DF50C4B65CFAC3
DNS identity bc22-test
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to True
Starting Service Tier
Failed to start service 'Dynamics 365 Business Central Server [BC] (MicrosoftDynamicsNavServer$BC)'.
at <ScriptBlock>, C:\Run\navstart.ps1: line 172
at <ScriptBlock>, C:\Run\start.ps1: line 384
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/onprem/22.3.58346.58453/w1
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\onprem\22.3.58346.58453\platform\ServiceTier\Program Files
c:\dl\onprem\22.3.58346.58453\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\onprem\22.3.58346.58453\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\onprem\22.3.58346.58453\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\onprem\22.3.58346.58453\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\onprem\22.3.58346.58453\platform
c:\dl\onprem\22.3.58346.58453\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\onprem\22.3.58346.58453\platform\ConfigurationPackages
Copying Test Assemblies
C:\dl\onprem\22.3.58346.58453\platform\Test Assemblies
Copying Applications
C:\dl\onprem\22.3.58346.58453\platform\Applications
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Stopping Business Central Service Tier
Installation took 73 seconds
Installation complete
Initializing...
Setting host.docker.internal to 10.0.8.109 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 10.0.8.109 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.16.1.1 in container hosts file
Starting Container
Hostname is bc22-test
PublicDnsName is bc22-test
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 4C4064BB6BBB5B8C06A92948D6DF50C4B65CFAC3
DNS identity bc22-test
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to True
Starting Service Tier
Failed to start service 'Dynamics 365 Business Central Server [BC] (MicrosoftDynamicsNavServer$BC)'.
at <ScriptBlock>, C:\Run\navstart.ps1: line 172
at <ScriptBlock>, C:\Run\start.ps1: line 384
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 53834c29-2d5b-45d5-abee-9a13fb67ce83
Initialization of container bc22-test failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\5.0.4\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...c22-test failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container bc22-test failed

C:\WINDOWS\system32> 

I can not see any errors relating to this issue in my Event Log. BC server is stopped after creating the container. When I start the bc server instance, I do also not see any errors in the container event log.

When I open http://bc22-test/BC, the message appears:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

But the bc server is still running:

[BC22-TEST]: PS C:\Run> Get-NAVServerInstance bc

ServerInstance : MicrosoftDynamicsNavServer$BC
DisplayName    : Dynamics 365 Business Central Server [BC]
State          : Running
ServiceAccount : NT AUTHORITY\SYSTEM
Version        : 22.0.58423.0
Default        : True

[BC22-TEST]: PS C:\Run>

Docker inspect:

C:\Windows\System32>docker inspect bc22-test
[
    {
        "Id": "135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a",
        "Created": "2023-07-17T11:59:36.3695644Z",
        "Path": "powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; .\\Run\\start.ps1",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 400,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-07-17T11:59:37.7433784Z",
            "FinishedAt": "0001-01-01T00:00:00Z",
            "Health": {
                "Status": "unhealthy",
                "FailingStreak": 17,
                "Log": [
                    {
                        "Start": "2023-07-17T14:06:12.1621633+02:00",
                        "End": "2023-07-17T14:06:12.455053+02:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2023-07-17T14:06:42.4721036+02:00",
                        "End": "2023-07-17T14:06:42.8168678+02:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2023-07-17T14:07:12.8274169+02:00",
                        "End": "2023-07-17T14:07:13.1199759+02:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2023-07-17T14:07:43.1304875+02:00",
                        "End": "2023-07-17T14:07:43.4682819+02:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2023-07-17T14:08:13.4763696+02:00",
                        "End": "2023-07-17T14:08:13.8060782+02:00",
                        "ExitCode": 1,
                        "Output": ""
                    }
                ]
            }
        },
        "Image": "sha256:f5e63eeb5900f6b782d2f2818dac601b464ce9d6da37ff3cf2987b01bcab5bca",
        "ResolvConfPath": "",
        "HostnamePath": "",
        "HostsPath": "",
        "LogPath": "C:\\ProgramData\\Docker\\containers\\135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a\\135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a-json.log",
        "Name": "/bc22-test",
        "RestartCount": 0,
        "Driver": "windowsfilter",
        "Platform": "windows",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": [
            "4b35539cb907b8e363bf9b9f2ea9ab803da0c914cb772c2e4eb8d32867943d0a"
        ],
        "HostConfig": {
            "Binds": [
                "c:\\bcartifacts.cache:c:\\dl",
                "C:\\ProgramData\\BcContainerHelper:C:\\ProgramData\\BcContainerHelper",
                "C:\\ProgramData\\BcContainerHelper\\Extensions\\bc22-test\\my:C:\\Run\\my",
                "c:\\windows\\system32\\drivers\\etc:C:\\driversetc"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 0,
            "Isolation": "process",
            "CpuShares": 0,
            "Memory": 4294967296,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "dir": "C:\\ProgramData\\Docker\\windowsfilter\\135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a"
            },
            "Name": "windowsfilter"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "c:\\programdata\\bccontainerhelper",
                "Destination": "c:\\programdata\\bccontainerhelper",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\programdata\\bccontainerhelper\\extensions\\bc22-test\\my",
                "Destination": "c:\\run\\my",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\windows\\system32\\drivers\\etc",
                "Destination": "c:\\driversetc",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\bcartifacts.cache",
                "Destination": "c:\\dl",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "bc22-test",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "1433/tcp": {},
                "443/tcp": {},
                "7045/tcp": {},
                "7046/tcp": {},
                "7047/tcp": {},
                "7048/tcp": {},
                "7049/tcp": {},
                "7083/tcp": {},
                "80/tcp": {},
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "accept_outdated=Y",
                "artifactUrl=https://bcartifacts.azureedge.net/onprem/22.3.58346.58453/w1",
                "auth=NavUserPassword",
                "username=admin",
                "locale=en-US",
                "databaseServer=",
                "accept_eula=Y",
                "ExitOnError=N",
                "enableApiServices=Y",
                "passwordKeyFile=c:\\run\\my\\aes.key",
                "removePasswordKeyFile=Y",
                "licenseFile=c:\\run\\my\\license.bclicense",
                "databaseInstance=",
                "isBcSandbox=N",
                "filesOnly=False",
                "useSSL=N",
                "securePassword=76492d1116743f0423413b16050a5345MgB8AEgAWgA2AHIAVQA4ADMATgA5AEYAcgA3AG0AYwBWAGYAcQBuAEoAWABIAFEAPQA9AHwAYgBhAGIAYQA0ADEAYgBjAGMAZQBjADcAMAA0ADEANwBmAGIAYQAzAGMAMwBkADEANwBkADcAMQAyAGIANQA4AA==",
                "customNavSettings=EnableTaskScheduler=True",
                "DOTNET_RUNNING_IN_CONTAINER=true",
                "COMPLUS_RUNNING_IN_CONTAINER=1",
                "COMPLUS_NGenProtectedProcess_FeatureEnabled=0"
            ],
            "Cmd": [
                "powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; .\\Run\\start.ps1"
            ],
            "Healthcheck": {
                "Test": [
                    "CMD",
                    "powershell",
                    ".\\Run\\HealthCheck.ps1"
                ],
                "Interval": 30000000000,
                "Timeout": 10000000000
            },
            "ArgsEscaped": true,
            "Image": "mcr.microsoft.com/businesscentral:10.0.20348.1850",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "country": "w1",
                "created": "202307120537",
                "eula": "https://go.microsoft.com/fwlink/?linkid=861843",
                "maintainer": "Dynamics SMB",
                "nav": "",
                "osversion": "10.0.20348.1850",
                "platform": "22.0.58423.0",
                "tag": "1.0.2.14",
                "version": "22.3.58346.58453"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "1433/tcp": null,
                "443/tcp": null,
                "7045/tcp": null,
                "7046/tcp": null,
                "7047/tcp": null,
                "7048/tcp": null,
                "7049/tcp": null,
                "7083/tcp": null,
                "80/tcp": null,
                "8080/tcp": null
            },
            "SandboxKey": "135034f8c53266ae0727b1fb4d6b287f1b7d650d39fedbe9a94509c5becec81a",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "nat": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "3e3ecc269dc163d8c5a319237fbb2cade6fbae14bd1ed1ca56609eaaf14f7ee1",
                    "EndpointID": "e84291437bcbd0e1eb729af6bce21d9e7306f8f974709799f803c69d53520a32",
                    "Gateway": "172.16.1.1",
                    "IPAddress": "172.16.1.13",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "00:15:5d:4d:18:b3",
                    "DriverOpts": null
                }
            }
        }
    }
]

C:\Windows\System32>

What am I doing wrong? What memoryLimit will be taken into account by the docker container when I do not specify a memoryLimit?

freddydk commented 1 year ago

I don't think 4Gb is enough for BC 22 - these 4Gb is both for the container OS and for BC.

Default MemoryLimit is 8Gb if you are using HyperV and no limit if you are using process isolation (meaning that the container can use all available memory on the host.

dominicstarkl commented 1 year ago

Thank you Freddy!

But what do I have to change in my script above when I want to use process isolation and limit the memory to 8 GB ?

dominicstarkl commented 1 year ago

@freddydk Hi Freddy. Do you have any news about it? Is my script correct? Thanks in advance! Regards, Dominic

freddydk commented 1 year ago

Remove the line with -memoryLimit 4G - then you should be good to go. You are already running process isolation (which BcContainerHelper defaults to if it thinks that it works).

dominicstarkl commented 1 year ago

@freddydk Thanks Freddy, does that mean that we can not define a memory limit when using process isolation?

freddydk commented 1 year ago

You can, you were running process isolation and setting the memoryLimit to 4G - which is why you got the error in the first place.

You can just specify -memoryLimit 8G instead of 4G - to have 8G or remove it to have all host memory available.

or as already stated: Default MemoryLimit is 8Gb if you are using HyperV and no limit if you are using process isolation (meaning that the container can use all available memory on the host.

dominicstarkl commented 1 year ago

@freddydk Sorry Freddy, it is not clear for me yet. You said that I can using process isolation AND specifying a memory limit to e.g. 8 GB. But that's exactly what I did in my script I sent to you and what always used to work until the mentioned Widows update. So my question again: What do I have to change in my script in order to get this to work? I don't want my Docker containers taking as much memory as they like to take. TIA

dominicstarkl commented 1 year ago

@freddydk Sorry Freddy, it is not clear for me yet. You said that I can using process isolation AND specifying a memory limit to e.g. 8 GB. But that's exactly what I did in my script I sent to you and what always used to work until the mentioned Widows update. So my question again: What do I have to change in my script in order to get this to work? I don't want my Docker containers taking as much memory as they like to take. TIA

UPDATE Ok I see, maybe my problem is that I cannot use 4 GB any more, just 8 GB or unlimited. But this used to work before the Windows update, but it didn't make sense any way to use just less memory.

freddydk commented 1 year ago

Exactly - my very first comment was that 4G was not enough - you need more - 8G, 9G, 12G, 32G or unlimited (I was under the assumption that you knew how to set the memoryLimit since you used it in your script).

dominicstarkl commented 1 year ago

Thanks Freddy. As I said - this used to work until the last Widows update. I wonder how this could work though

Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg


From: Freddy Kristiansen @.> Sent: Tuesday, July 18, 2023 7:14:50 PM To: microsoft/navcontainerhelper @.> Cc: dominicstarkl @.>; Author @.> Subject: Re: [microsoft/navcontainerhelper] New-BcContainer with memoryLimit fails after Windows Update (Issue #3120)

Exactly - my very first comment was that 4G was not enough - you need more - 8G, 9G, 12G, 32G or unlimited (I was under the assumption that you knew how to set the memoryLimit since you used it in your script).

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/navcontainerhelper/issues/3120#issuecomment-1640640548, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMDUBIAALP7FCUBOBXSLGLDXQ3AAVANCNFSM6AAAAAA2M3EYQA. You are receiving this because you authored the thread.Message ID: @.***>

freddydk commented 1 year ago

Probably because the latest version uses more memory:-) For your usage - 5G might be enough - for other things 16G is not enough.

dominicstarkl commented 1 year ago

Ok I get, thanks

Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg


From: Freddy Kristiansen @.> Sent: Tuesday, July 18, 2023 8:30:34 PM To: microsoft/navcontainerhelper @.> Cc: dominicstarkl @.>; Author @.> Subject: Re: [microsoft/navcontainerhelper] New-BcContainer with memoryLimit fails after Windows Update (Issue #3120)

Probably because the latest version uses more memory:-) For your usage - 5G might be enough - for other things 16G is not enough.

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/navcontainerhelper/issues/3120#issuecomment-1640741656, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMDUBIHBL6EXSA5FMRGT7VDXQ3I4VANCNFSM6AAAAAA2M3EYQA. You are receiving this because you authored the thread.Message ID: @.***>