winapps icon indicating copy to clipboard operation
winapps copied to clipboard

Failling to start Windows container of a previously successful setup

Open abhishekmadhu-sv opened this issue 9 months ago • 1 comments

I have previously set up a windows container following the documentation in docker.md

The entire flow went successfully, and I was able to perform all steps and run the windows apps correctly.

To leave for the day, I stopped the container with command provided at the end of said document:

docker-compose --file ~/.config/winapps/compose.yaml stop # Gracefully shut down the Windows VM

Next, I closed the computer, and came back later next day.

Today, I am trying to start the container with docker-compose --file ~/.config/winapps/compose.yaml start

The terminal responds with success.

│> docker compose --file ~/.config/winapps/compose.yaml start  
│[+] Running 1/1 
│ ✔ Container WinApps  Started  

This does not fully start the container.

Upon investigation, I found that this puts the container in a restart loop, with the following errors (logs from lazydocker):

❯ Starting Windows for Docker v4.11...
❯ For support visit https://github.com/dockur/windows
❯ CPU: Intel Core Ultra 7 155H | RAM: 7/31 GB | DISK: 374 GB (ext4) | KERNEL: 6.11.0-14...

❯ ERROR: Your configured RAM_SIZE of 8 GB is too high for the 7 GB of memory available, please set a lower value.
❯ Starting Windows for Docker v4.11...
❯ For support visit https://github.com/dockur/windows
❯ CPU: Intel Core Ultra 7 155H | RAM: 7/31 GB | DISK: 374 GB (ext4) | KERNEL: 6.11.0-14...

❯ ERROR: Your configured RAM_SIZE of 8 GB is too high for the 7 GB of memory available, please set a lower value.
❯ Starting Windows for Docker v4.11...
❯ For support visit https://github.com/dockur/windows
❯ CPU: Intel Core Ultra 7 155H | RAM: 7/31 GB | DISK: 374 GB (ext4) | KERNEL: 6.11.0-14...

❯ ERROR: Your configured RAM_SIZE of 8 GB is too high for the 7 GB of memory available, please set a lower value.
❯ Starting Windows for Docker v4.11...

Image

And this keeps going.

I have a 32GB RAM setup, I would like to be able to use 8GB for this container anyway. Is there a way to force it to use 8GB?

What are the recommended steps? I understand that this may be a docker thing that I am supposed to know/learn - I will appreciate a URL to what to learn, and I can update the aforementioned documentation with this information.

Thank you very much!

abhishekmadhu-sv avatar Feb 17 '25 08:02 abhishekmadhu-sv

Observation: If I do close a bunch of apps on the host Ubuntu and free RAM around 50% (16GB of 32GB), then I am able to successfully start the container with docker-compose --file ~/.config/winapps/compose.yaml start

How to ensure that docker "takes" the require amount of RAM without me needing to free RAM first?

abhishekmadhu-sv avatar Feb 17 '25 10:02 abhishekmadhu-sv

@abhishekmadhu-sv I realise this is quite an old issue, but it might be best to raise it with @kroese, who maintains dockur/windows.

KernelGhost avatar Sep 11 '25 03:09 KernelGhost

There is no way for me to solve this without you manually freeing the RAM (or otherwise lowering the amount requested).

It would be a very bad idea if the container would just randomly kill other running processes on your system, and besides that the container does not even have enough permissions to terminate them. So no, there is no way the container can "take" 8 GB if you have only 7 GB of memory available.

kroese avatar Sep 12 '25 00:09 kroese