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

is not a valid Win32 application #14086

Open
wlbragg opened this issue May 21, 2024 · 8 comments
Open

is not a valid Win32 application #14086

wlbragg opened this issue May 21, 2024 · 8 comments

Comments

@wlbragg
Copy link

wlbragg commented May 21, 2024

Description

deploying WSL2 distributions
provisioning docker WSL distros: ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "%1 is not a valid Win32 application. \r\nError code: Wsl/Service/RegisterDistro/CreateVm/HCS/0x800700c1\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop \AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: %1 is not a valid Win32 application.
Error code: Wsl/Service/RegisterDistro/CreateVm/HCS/0x800700c1
: exit status 0xffffffff
checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.

Reproduce

docker --run

Expected behavior

It should run and not close.

docker version

Docker version 26.1.1, build 4cf5afa

This is all I get with docker --version

docker info

Unable to generate

Diagnostics ID

726D93F8-984A-49B4-9D84-58D97BFF1128\20240521155702.zip.

Additional Info

I think a Windows update is responsible for breaking the Docker Desktop system. I've been using it for months and suddenly it breaks.

Unfortunately I have tried many of the fixes for various issue found here. I think this started as a WSL deploy error. I didn't understand what I was looking at until after making many attempted fixes. Even uninstalling WSL and Docker Desktop didn't fix, it left me here. I'm out of ideas. Docker --info says unknown flag. My system is Win 10/64. I'm out of ideas.

@jpbriend
Copy link

According to the diagnostic, it's an issue with WSL2.

I found the exact same error message as microsoft/WSL#8316.
Maybe have a look at the WslService (and don't forget to restart the computer after enabling it).

@wlbragg
Copy link
Author

wlbragg commented Jun 4, 2024

Thank you for the info. I checked the service and it was running. So I reset it and restarted the cpu. I don't know that it had anything to do with this, but now Docker Desktop isn't crashing, it is now hanging on startup. It just continues to say "Starting the Docker Engine". Then again I have had a few more windows updated since.

I guess that is an improvement?

@wlbragg
Copy link
Author

wlbragg commented Jun 4, 2024

Well it took about 15 minutes for this to pop up.

Virtual Machine Platform is not enabled. Enable it using the following PowerShell script (in an administrative PowerShell) and then restart your computer before using Docker Desktop:
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

querying the Win32OptionalFeature class over WMI: Exception occurred. (Call cancelled )

@wlbragg
Copy link
Author

wlbragg commented Jun 5, 2024

I'm back to...

deploying WSL2 distributions
provisioning docker WSL distros: ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "%1 is not a valid Win32 application. \r\nError code: Wsl/Service/RegisterDistro/CreateVm/HCS/0x800700c1\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop <HOME>\AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: %1 is not a valid Win32 application. 
Error code: Wsl/Service/RegisterDistro/CreateVm/HCS/0x800700c1
: exit status 0xffffffff
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.

@mohaned-omer
Copy link

mohaned-omer commented Jun 23, 2024

I had this error until I enabled the virtualization option in bios . try to restart and check in the bios for the virtualization option. Try to enable it.

@wlbragg
Copy link
Author

wlbragg commented Jun 24, 2024

I don't see a virtualization option in my bios? Also, this seems to have started with a Windows update, which I am fairly certain didn't touch my bios.

@sdwheeler
Copy link

sdwheeler commented Jul 13, 2024

I'm getting the following error when I try to start Docker Desktop for Windows.

Docker Desktop - Virtual Machine Platform not enabled
Virtual Machine Platform is not enabled. Enable it using the following PowerShell script (in an administrative PowerShell) and then restart your computer before using Docker Desktop:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

querying the Win32OptionalFeature class over WMI: Exception occurred. (Invalid class )

But that is not the correct class name. The name should be Win32_OptionalFeature.

I have tried installing Docker Desktop. I am running Docker Desktop v4.32.0 on Windows 11 23H2 on a Surface Book 3.

C:\Git❯ get-windowsoptionalfeature -online | where state -eq Enabled | select FeatureName

FeatureName
-----------
Printing-PrintToPDFServices-Features
Printing-XPSServices-Features
MSRDC-Infrastructure
MicrosoftWindowsPowerShellV2Root
MicrosoftWindowsPowerShellV2
WCF-Services45
WCF-TCP-PortSharing45
MediaPlayback
WindowsMediaPlayer
SmbDirect
NetFx3
NetFx4-AdvSrvs
SearchEngine-Client-Package
Microsoft-RemoteDesktopConnection
WorkFolders-Client
Printing-Foundation-Features
Printing-Foundation-InternetPrinting-Client
HypervisorPlatform
VirtualMachinePlatform
Microsoft-Windows-Subsystem-Linux
Microsoft-Hyper-V-All
Microsoft-Hyper-V
Microsoft-Hyper-V-Tools-All
Microsoft-Hyper-V-Management-PowerShell
Microsoft-Hyper-V-Hypervisor
Microsoft-Hyper-V-Services
Microsoft-Hyper-V-Management-Clients
Containers
Containers-HNS
Containers-SDN

@wlbragg
Copy link
Author

wlbragg commented Jul 15, 2024

My issue was finally resolved using the info in this thread.
#14030 (comment)

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

No branches or pull requests

5 participants