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

Error QEMU #54

Open
SauloVR91 opened this issue Apr 6, 2024 · 17 comments
Open

Error QEMU #54

SauloVR91 opened this issue Apr 6, 2024 · 17 comments

Comments

@SauloVR91
Copy link

SauloVR91 commented Apr 6, 2024

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 | �[1;31m❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance.�[0m
windows | �[1;31m❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended).�[0m

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 | �[1;34m❯ �[1;36mDownloading product information from Microsoft...�[0m
windows | �[1;34m❯ �[1;36mDownloading Windows 11 for ARM...�[0m
windows |
windows | 0K ........ ........ ........ ........ 0% 22.7M 3m38s
windows | 5079040K ........ ........ ........ ........ 99% 31.9M 0s
windows | 5111808K ....... 100% 25.0M=3m2s
windows |
windows | �[1;34m❯ �[1;36mExtracting Windows 11 for ARM bootdisk...�[0m
windows | �[1;34m❯ �[1;36mExtracting Windows 11 for ARM environment...�[0m
windows | �[1;34m❯ �[1;36mExtracting Windows 11 for ARM setup...�[0m
windows | �[1;34m❯ �[1;36mExtracting Windows 11 for ARM image...�[0m
windows | �[1;34m❯ �[1;36mAdding XML file for automatic installation...�[0m
windows | �[1;34m❯ �[1;36mBuilding Windows 11 for ARM image...�[0m
windows | �[1;34m❯ �[1;36mCreating a 64G growable disk image in raw format...�[0m
windows | �[1;31m❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance.�[0m
windows | �[1;31m❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended).�[0m
windows | ❯ Starting Windows for Docker v1.10...
windows | ❯ For support visit https://github.com/dockur/windows-arm
windows |
windows | �[1;31m❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance.�[0m
windows | �[1;31m❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended).�[0m
windows | ❯ Starting Windows for Docker v1.10...
windows | ❯ For support visit https://github.com/dockur/windows-arm
windows |
windows | �[1;31m❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance.�[0m
windows | �[1;31m❯ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended).�[0m
windows | ❯ Starting Windows for Docker v1.10...
windows | ❯ For support visit https://github.com/dockur/windows-arm

@kroese
Copy link
Contributor

kroese commented Apr 6, 2024

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

@SauloVR91
Copy link
Author

I used the default installation.

version: "3"
services:
windows:
container_name: windows
image: dockurr/windows-arm
environment:
VERSION: "win11"
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
stop_grace_period: 2m
restart: on-failure

@kroese
Copy link
Contributor

kroese commented Apr 7, 2024

Strange.. Try adding privileged: true

@SauloVR91
Copy link
Author

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
Copy link
Contributor

kroese commented Apr 7, 2024

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
Copy link
Author

SauloVR91 commented Apr 8, 2024

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 ...

@SauloVR91 SauloVR91 changed the title Erro Error QEMU Apr 8, 2024
@kroese
Copy link
Contributor

kroese commented Apr 10, 2024

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

@SauloVR91
Copy link
Author

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
Copy link
Contributor

kroese commented Apr 11, 2024

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
Copy link
Author

Sorry @kroese.
But the result is the same:

image

Any idea ?

@kroese
Copy link
Contributor

kroese commented May 10, 2024

Can you try #37 (comment) ?

@SauloVR91
Copy link
Author

Can you try #37 (comment) ?

i will try.

@kroese
Copy link
Contributor

kroese commented Jun 2, 2024

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
Copy link
Author

SauloVR91 commented Jun 6, 2024

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
Copy link
Contributor

kroese commented Jun 6, 2024

@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
Copy link
Author

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
Copy link
Contributor

kroese commented Jun 9, 2024

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.

@dockur dockur deleted a comment from darkjuaggalo23 Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants