dockur / windows

Windows inside a Docker container.
MIT License
27.66k stars 1.92k forks source link

[Bug]: winxp broken in `latest` / `4.00` #858

Closed dblock closed 1 day ago

dblock commented 3 days ago

Operating system

MacOSX

Description

With latest.

windows  | ❯ Starting Windows for Docker v2.20...
windows  | ❯ For support visit https://github.com/dockur/windows-arm
windows  | ❯ CPU: 0 | RAM: 6/8 GB | DISK: 48 GB (ext4) | HOST: 6.10.11-linuxkit...
windows  | 
windows  | ❯ ERROR: Invalid VERSION specified, value "winxp" is not recognized!

With 3.23.

windows  | ❯ Starting Windows for Docker v3.23...
windows  | ❯ For support visit https://github.com/dockur/windows
windows  | ❯ CPU:   | RAM: 6/8 GB | DISK: 47 GB (ext4) | HOST: 6.10.11-linuxkit...
windows  | 
windows  | ❯ Downloading Windows XP from bobpony.com...
windows  | ❯ ERROR: Failed to download https://dl.bobpony.com/windows/xp/professional/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso , server issued an error response!
windows  | ❯ Failed to download Windows XP, will try another mirror now...
windows  | ❯ Downloading Windows XP from files.dog...
windows  | ❯ ERROR: Failed to download https://files.dog/MSDN/Windows%20XP/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso , server issued an error response!
windows  | ❯ Failed to download Windows XP, will try another mirror now...
windows  | ❯ Downloading Windows XP from archive.org...
windows  | 
windows  |      0K ........ ........ ........ ........  5% 10.2M 54s
windows  |  32768K ........ ........ ........ ........ 10% 3.75M 96s
windows  |  65536K ........ ........ ........ ........ 16% 2.75M 2m0s
...

Docker compose

services: windows: image: dockurr/windows container_name: windows environment: KVM: "N" VERSION: "winxp" cap_add:

Docker log

See above.

Screenshots (optional)

No response

kroese commented 3 days ago

This is because in version 4.0 it automaticly uses the https://github.com/dockur/windows-arm image when the host CPU is ARM. And there never was a Windows XP version that was compiled for ARM.

Can you try adding: platform: linux/amd64 to your compose file, to force Docker to use the AMD64 image on your Mac?

dblock commented 3 days ago

Can you try adding: platform: linux/amd64 to your compose file, to force Docker to use the AMD64 image on your Mac?

That seems to work around it, thanks. Maybe some automatic fallback could help others...

(XP runs ok, but it's definitely slower than with UTM for lack of acceleration).

kroese commented 1 day ago

@dblock UTM uses HVF (Apple Hypervisor Framework) instead of KVM, so thats why XP runs faster in UTM. But to support HVF in this container is too much work for me, and I don't even have any Apple hardware to test with even if I wanted to add support for HVF.

dblock commented 1 day ago

Thanks for your excellent work @kroese! This is an awesome project.

Someone motivated (more motivated than me :)) will hopefully pickup AHF support here. You might consider pinning an issue for OSX acceleration support on top in the project so that people can easily find it before bothering the maintainer(s) and opening new ones.