I’m running Docker Desktop v4.50.0 on Windows 11 25H2 (26200.6899).
Every now and then I will start my computer and notice my containers are not running in Docker Desktop, with the message:
“Virtualization support not detected
Docker Desktop couldn’t start as virtualization support is not enabled on your machine. We’re piloting a new cloud-based solution…”
Etc etc.
Hyper-V is enabled. Hardware virtualization is enabled in my BIOS. WSL Works. VirtualBox works.
If I quit and restart Docker, suddenly virtualization support is detected and all my containers start running.
I did a clean install of Docker and Windows 11 when first setting it up, and have reinstalled Docker once since I started having this issue.
The problem is that my use-case requires my containers to start running as soon as Windows 11 starts.
I can imagine some features/components might not be active by the time Docker Desktop starts running, leading to the assumption that virtualization support is not enabled, but this issue happens at least twice a week and requires remote desktop intervention to fix the issue every time.
Is this a Docker thing or a Windows 11 thing? Would it be possible to delay it or configure Docker to retry automatically if it does not detect virtualization?
Does Docker Desktop start even before logging in with an interactive user? Normally Docker Desktop is started after logging in as it is for development not for hosting services. I’m not sure about how features are activated when Windows starts or if any feature is activated after logging in. How you would delay starting Docker Desktop depends on how you start it now. So do you have anything to start it before logging in or does it start only when you log in?
If you can start Docker Desktop with docker desktop start, you can run scripts before that to make sure features are enabled or just add a delay in a powershell script or any way Windows supports it.
Right now I have Docker Desktop autostart through Windows Startup Apps and run all containers as soon as Windows starts.
In Windows 10 and 11 if a user was last logged in when the computer was restarted or shut down, it will pre-load all the startup apps before he logs in, as if he was already logged in. Since I have remote access and a VPN client which autostart as well, I can tell if this was the case based on if those other services are running as well. If the following conditions were not met (power failure, force restart, PC not shut down correctly due to programs preventing shutdown), then none of the other services will autostart if the user does not manually log in.
There is also an option for Windows to automatically log in with a certain user without requiring the login information (until you get an admin prompt). Since this issue is sometimes unpredictable, I would have to try this for a couple weeks, but I just assumed that the behaviour would be the same.
Doesn’t it work only when fast boot is enabled? I always disabled fast boot when I had Linux and Windows on the same machine in dual boot, but recently I had a Windows machine where I had to use a VPN that started even before I logged in. Since I also had to accept the connection on my phone, that meant the VPN often timed out while also sent multiple tokens to my phone that I had to accept one by one. So I disabled fast boot again and since then I can turn on the VPN after logging in.
In any case, some applications relying on virtualization or any other feature could (I guess) wait until the required featurs are enabled after booting. I can’t tell if this new behavior is normal on Windows or not, but if Docker Desktop is responsible for it, since it was not among the supported use cases I know of, I would not say it is a Docker Desktop bug, but you can still try to ask for supporting this use case:
Alternatively, you can use the command I mentioned in my prveious post. If I remember correctly, it was introduced after people wanted a way to start and stop Docker Desktop remotely and we had multiple autostart questions related to Docker Desktop. If you can automatically start any powershell script, you can use the command line to add some delay and start Docker Desktop.
This would also be faster even if Docker decides to support automatically starting the desktop before logging in.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.