dockur / windows-arm

Windows for ARM in a Docker container.
MIT License
626 stars 60 forks source link

Error QEMU #54

Open SauloVR91 opened 2 months ago

SauloVR91 commented 2 months ago

Hello. I'm trying to install on the orange pi 3b. Running casaOs. But it is showing the following error:

windows | ❯ Starting Windows for Docker v1.10... windows | ❯ For support visit https://github.com/dockur/windows-arm windows | windows | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance. windows | ❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended).

This error occurs after unzipping the windows11 image. Previously, I tried to install the x64 version (I thought it was this version) and it just shows great slowness, but Windows actually goes to the installation part.

I ran sudo kvm-ok and it showed no errors.

windows | ❯ Starting Windows for Docker v1.10... windows | ❯ For support visit https://github.com/dockur/windows-arm windows | windows | ❯ Downloading product information from Microsoft... windows | ❯ Downloading Windows 11 for ARM... windows | windows | 0K ........ ........ ........ ........ 0% 22.7M 3m38s windows | 5079040K ........ ........ ........ ........ 99% 31.9M 0s windows | 5111808K ....... 100% 25.0M=3m2s windows | windows | ❯ Extracting Windows 11 for ARM bootdisk... windows | ❯ Extracting Windows 11 for ARM environment... windows | ❯ Extracting Windows 11 for ARM setup... windows | ❯ Extracting Windows 11 for ARM image... windows | ❯ Adding XML file for automatic installation... windows | ❯ Building Windows 11 for ARM image... windows | ❯ Creating a 64G growable disk image in raw format... windows | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance. windows | ❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended). windows | ❯ Starting Windows for Docker v1.10... windows | ❯ For support visit https://github.com/dockur/windows-arm windows | windows | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance. windows | ❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended). windows | ❯ Starting Windows for Docker v1.10... windows | ❯ For support visit https://github.com/dockur/windows-arm windows | windows | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance. windows | ❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended). windows | ❯ Starting Windows for Docker v1.10... windows | ❯ For support visit https://github.com/dockur/windows-arm

kroese commented 2 months ago

Seems like the device /dev/kvm is missing from your compose file. Can you show me your run command or compose file?

SauloVR91 commented 2 months ago

I used the default installation.

version: "3" services: windows: container_name: windows image: dockurr/windows-arm environment: VERSION: "win11" devices:

kroese commented 2 months ago

Strange.. Try adding privileged: true

SauloVR91 commented 2 months ago

I tried with administrator but it didn't work either. There is a difference in the location I am using, which is the storage, due to the storage space on the main unit. The drive I'm using is using ext4 format.

kroese commented 2 months ago

It says /dev/kvm is missing, so it cannot be related to storage. Can you try if it makes a difference if you run the CLI command (with sudo in front) instead of the compose file?

SauloVR91 commented 2 months ago

Same error, I ran the code below.

sudo docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 -v /media/Dados/Windows:/storage dockurr/windows-arm

It freezes at boot time with QEMU

❯ Starting Windows for Docker v1.10... ❯ For support visit https://github.com/dockur/windows-arm

❯ Booting Windows using QEMU emulator version 8.2.1 ...

kroese commented 2 months ago

What do you mean exactly by freezing? Do you see the TianoCore logo for example?

SauloVR91 commented 2 months ago

No, it's straight like that.

image image image

Today I updated the entire package again, running apt install qemu-system. But still the same situation persists.

kroese commented 2 months ago

From the screenshots it looks like your run kvm-ok inside the container. But you should run it on your host. So you might need to SSH into CasaOS for that.

SauloVR91 commented 2 months ago

Sorry @kroese. But the result is the same:

image

Any idea ?

kroese commented 1 month ago

Can you try https://github.com/dockur/windows-arm/issues/37#issuecomment-2099703987 ?

SauloVR91 commented 1 month ago

Can you try #37 (comment) ?

i will try.

kroese commented 4 weeks ago

I fixed this for the Orangi Pi 5 now in v2.10, by adding CPU pinning support to pin it to cores 4,5,6 and 7 when it detects a RK3588 CPU.

I would also like to fix it for the Orange Pi 3 and 4, so if you are still interested can you please show me how this CPU is named in the Docker log when you start the container (the line that shows CPU/RAM/kernel).

SauloVR91 commented 3 weeks ago

windows | ❯ Starting Windows for Docker v2.10... windows | ❯ For support visit https://github.com/dockur/windows-arm windows | ❯ CPU: Cortex A55 | RAM: 6/8 GB | DISK: 214 GB (ext4) | HOST: 5.10.160-rockchip-rk356x...

Sorry for the delay. Today I managed to carry out tests with the new version. Below is the requested information. In fact, my model's processor is quad core and not octacore.

kroese commented 3 weeks ago

@SauloVR91 Thanks.. The problem on the OrangePi 4 and 5 was that they had mixed cores (4x A55 and 4x A76 for example). After pinning it to one type it worked.

But I now see that the OrangePi 3B has 4x A55 and no mix of types at all. So your problem is totally unrelated, and after reading it better I see it was about KVM missing.

It will be useless to figure out why you have no display output with KVM disabled, because even when we fix that, Windows will run extremely slow and sluggish without the hardware acceleration KVM provides.

So our only option is to figure out why KVM doesnt work with the Docker on CasaOS.

Can you execute the example docker run command with sudo in front, so: sudo docker run .... and see if it fixes the permission error for KVM?

SauloVR91 commented 3 weeks ago

I ran docker directly from the ubuntu server, outside of CasaOS. This was the result, I'm starting to think that somehow, there isn't a KVM on the orangePi 3B

orangepi@sauloserver:~$ sudo docker run -it --rm -p 8006:8006 \ --device=/dev/kvm \ --cap-add NET_ADMIN \ --stop-timeout 120 \ -v /media/Dados/Windows:/storage \ -e VERSION="win10" \ dockurr/windows-arm [sudo] password for orangepi: Unable to find image 'dockurr/windows-arm:latest' locally latest: Pulling from dockurr/windows-arm 9e1029337ca3: Pull complete 36ae1603511d: Pull complete 4b8d967cfbfa: Pull complete c7e52c81c715: Pull complete 290f113f7e48: Pull complete 5eacd537b267: Pull complete Digest: sha256:2530dfeb4582b3ddd50e66ca17b6d6db0675ad255c0d62cd058d777ece35958a Status: Downloaded newer image for dockurr/windows-arm:latest ❯ Starting Windows for Docker v2.10... ❯ For support visit https://github.com/dockur/windows-arm ❯ CPU: Cortex A55 | RAM: 6/8 GB | DISK: 216 GB (ext4) | HOST: 5.10.160-rockchip-rk356x...

❯ Downloading product information from Microsoft server... ❯ Downloading Windows 10... /storage/tmp/win10arm64.esd 100%[=================================================>] 3.41G 26.1MB/s in 2m 10s ❯ Extracting Windows 10 bootdisk... ❯ Extracting Windows 10 environment... ❯ Extracting Windows 10 setup... ❯ Extracting Windows 10 image... ❯ Adding drivers to image... ❯ Adding win10arm64.xml for automatic installation... ❯ Building Windows 10 image... ❯ Creating a 64G growable disk image in raw format... ❯ Booting Windows using QEMU v8.2.4... ❯ ERROR: Timeout while waiting for QEMU to boot the machine! qemu-system-aarch64: terminating on signal 15 from pid 987 (bash) ❯ Shutdown completed!

kroese commented 3 weeks ago

Can you try if you can run the example compose from: https://github.com/qemus/qemu-arm

Because both projects share 90 percent of the same code. So if that other one runs without problems on your system, we know the issue is related specificly to Windows.