Open PierreV23 opened 1 month ago
@KernelGhost this seems like a bug with the waflavors?
I had to run docker compose with sudo because otherwise i was getting errors about kvm: https://github.com/dockur/windows/issues/667 maybe this has something to do with it?
The Docker
virtual machine fails to boot due to KVM acceleration being unavailable (as per the Docker
log you shared here). Consequently, the command docker ps --filter name="WinApps" --format '{{.Status}}'
returns nothing, causing the script to incorrectly fall back to checking for a Podman
virtual machine. I will update the script to prevent this unintended fallback behaviour.
In the meantime, we should focus on resolving the KVM issue.
Given that docker compose
proceeded without error when running with root privileges, it is also worth checking whether your user is part of the kvm
group by running groups $(whoami)
. If absent, you can add your user to the group using sudo usermod -aG kvm $(whoami)
. Ensure you reboot your system after adding your user to the group before re-attempting the Windows installation. If this works for you, please let me know so that I can update the documentation to ensure other users perform this step.
If the above fails, you can also try deleting the .docker
directory in your home folder with the command sudo rm -r ~/.docker
. I experienced a similar issue in the past, and vaguely recall this resolving the issue. It is unclear why this seemed to work for me, and I did not bother to investigate this further. Please ensure there is nothing important in that directory prior to deletion.
Please keep us updated on your progress.
Thanks for the quick response,
My user seems to be part of the kvm group:
pierrev@pierrevd:~/Downloads/winapps$ groups $(whoami)
pierrev : pierrev cdrom floppy sudo audio dip video plugdev users kvm netdev bluetooth lpadmin scanner
I deleted the ~/.docker folder but now when i try to run the compose up command it just lags infinitely. Going to restart my laptop now.
Maybe something went wrong with my docker installation? I got kinda confused in the installation guide (https://docs.docker.com/engine/install/debian/) and first installed via apt, but then also the .deb file from https://docs.docker.com/desktop/install/debian/
Alright so i restarted my laptop, deleted the .docker folder again because last time i forgot to shotdown docker desktop before doing so.
I had to set the memory limit in Docker Desktop > settings > Resources to 6GB by the way, otherwise docker compose would complain about:
pierrev@pierrevd:~$ docker compose --file ~/.config/winapps/compose.yaml up
[+] Running 7/7
✔ windows Pulled 12.7s
✔ 28b9a042b2f1 Pull complete 6.7s
✔ 607a8c080628 Pull complete 8.4s
✔ 7da360374e0b Pull complete 8.6s
✔ 75e784666a3f Pull complete 8.9s
✔ 45217bed6de1 Pull complete 9.2s
✔ e0d2bf59cee9 Pull complete 9.5s
[+] Running 3/3
✔ Network winapps_default Created 0.1s
✔ Volume "winapps_data" Created 0.0s
✔ Container WinApps Created 1.0s
Attaching to WinApps
WinApps | ❯ Starting Windows for Docker v3.12...
WinApps | ❯ For support visit https://github.com/dockur/windows
WinApps | ❯ ERROR: Your configured RAM_SIZE of 4 GB is too high for the 1 GB of memory available, please set a lower value.
WinApps | ❯ CPU: Intel Core TM i5 4300M CPU | RAM: 1/3 GB | DISK: 59 GB (ext4) | HOST: 6.6.32-linuxkit...
WinApps |
WinApps exited with code 0
I tried compose up again now but it still complains about kvm, even tho im in the kvm group.
pierrev@pierrevd:~$ docker compose --file ~/.config/winapps/compose.yaml up
[+] Running 2/2
✔ Network winapps_default Created 0.1s
✔ Container WinApps Created 0.2s
Attaching to WinApps
WinApps | ❯ Starting Windows for Docker v3.12...
WinApps | ❯ For support visit https://github.com/dockur/windows
WinApps | ❯ CPU: Intel Core TM i5 4300M CPU | RAM: 5/6 GB | DISK: 54 GB (ext4) | HOST: 6.6.32-linuxkit...
WinApps |
WinApps | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance.
WinApps | ❯ ERROR: See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended).
WinApps exited with code 0
Thanks for trying the suggested changes. Unfortunately, this issue is outside my area of expertise, and may be best suited for the dockur/windows repository issue list.
root:kvm
ownership and, at minimum, 660
permissions)?Docker
including deletion of ~/.docker
and /var/lib/docker
?Docker
from accessing /dev/kvm
?Podman
or libvert
?Thanks for trying the suggested changes. Unfortunately, this issue is outside my area of expertise, and may be best suited for the dockur/windows repository issue list.
1. Is virtualisation enabled in your BIOS/UEFI? 2. Does /dev/kvm have the correct permissions (`root:kvm` ownership and, at minimum, `660` permissions)? 3. Have you attempted a complete uninstallation of `Docker` including deletion of `~/.docker` and `/var/lib/docker`? 4. Is it possible that a security policy (e.g. SELinux/AppArmor) is preventing `Docker` from accessing `/dev/kvm`? 5. Would you be open to attempting to use an alternative backend for WinApps such as `Podman` or `libvert`?
pierrev@pierrevd:~/Downloads$ ls -la /dev/kvm
crw-rw----+ 1 root kvm 10, 232 Jul 23 23:20 /dev/kvm
pierrev@pierrevd:~/Downloads$ stat -c "%a" /dev/kvm
660
pierrev@pierrevd:~/Downloads$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
Thanks for getting back to me so quickly.
For the time being, I would recommend switching to the libvirt
backend and awaiting further assistance from the dockur/windows team (should you wish to use Docker
in the future).
Although the libvirt
instructions seem long and daunting, I've done my best to be as descriptive as possible. You are more likely to have a more performant and optimised experience by using libvirt
anyway.
Please let me know if you have any other thoughts or questions.
Alright, thanks for your time and quick response, I'll try out libvirt!
Not sure if this issue should be closed or not, so I'll let that up to you.
Since we didn't solve the root issue, it's probably best to leave this open in case anyone else encounters a similar issue in the future.
I also have this issue. What is strange is, I have been using QEMU with KVM and without the need for sudo thanks to simple group permissions. Using sudo and no -d, I can see the following errors after the disk image is created.
ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance. ERROR: See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended). exited with code 88
I found that this problem only exists when using docker-compose or docker desktop. Docker CLI with Sudo works but it shouldn't need sudo with permissions to KVM granted
@BADatCOMPUTER Would you mind experimenting to see if the same issues are encountered when using podman-compose
instead of docker compose
?
I'm having the same problem.
I use linux mint with docker desktop. Everything was checked several times, incluind a complete remove and install of docker desktop.
Even tried the docker-compose as well and had the same results.
Some updates, it really seems that is the Docker Desktop.
I completely removed Docker Desktop and installed docker engine only. I had to change the docker context to use the right Docker Endpoint.
But using the docker compose command I managed to install windows and there was no KVM error message this time.
Now, in the Browser there is the VNC the is the windows with the "error conecting to the server", but I guess is not related with the KVM issue.
@aoceano You make an excellent point, and I tend to agree with your assessment. I experienced a similar issue when I first installed Docker Desktop. The problem was only resolved after I removed Docker Desktop and deleted the ~/.docker
directory.
Some more updates.
After making the windows docker work with docker engine only, I installed Docker Desktop, because I need for work. The docker endpoint context is set to Docker Desktop.
I tried to run the Windows trought WinApps and said the Docker is not running. I started Docker Desktop and windows is working.
The funny thing is that in Docker Desktop and the docker ps -a cli does not show the windows container, but is running and working.
Accidentally I managed to make the winapps work with Docker Desktop installed. hahaha
I was able to get Podman-rootless working with the suggested methods in: https://www.reddit.com/r/chimeralinux/comments/1ews3rt/podman_rootless_devkvm_and_kernel_modules_load/
I had the same issue, after using sudo
for docker compose --file ./compose.yaml up
it works.
even thought:
$ groups $(whoami)
familia : familia cdrom floppy audio dip video plugdev users kvm netdev bluetooth lpadmin scanner libvirt
$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
Note: In Docker Desktop i don't see the container itself. When i don't use sudo it appears but dont work. so i guess if enough for now.
Of course i want to help to figure out the problem and solutions.
Was too good to be true. When trying to install Winapps by the setup.sh
i got this:
$ ./setup.sh
################################################################################
# #
# WinApps Install Wizard #
# #
################################################################################
Q) Install or uninstall WinApps? --> Install
Q) Configure WinApps for the current user 'familia' or the whole system? --> Current User
Q) Automatically install supported applications or choose manually? --> Automatic
WinApps installation already present at /home/familia/.local/bin/winapps-src. Updating...
Ya está actualizado.
Installing WinApps.
Checking for existing conflicting WinApps installations... Done!
Attempting to load WinApps configuration file... Done!
Checking whether dependencies are installed... Done!
Checking container status... Failed!
ERROR: CONTAINER NOT RUNNING.
Windows is not running.
--------------------------------------------------------------------------------
Please ensure Windows is powered on:
docker compose --file ~/.config/winapps/compose.yaml start
--------------------------------------------------------------------------------
Exiting with status '11'.
But my docker windows container is running:
$ sudo docker compose --file ~/.config/winapps/compose.yaml up
[sudo] contraseña para familia:
[+] Running 1/1
✔ Container WinApps Recreated 0.1s
Attaching to WinApps
WinApps | ❯ Starting Windows for Docker v3.15...
WinApps | ❯ For support visit https://github.com/dockur/windows
WinApps | ❯ CPU: Intel Core TM i5 7200U CPU | RAM: 9/16 GB | DISK: 73 GB (ext4) | HOST: 6.1.0-25-amd64...
WinApps |
WinApps | ❯ Booting Windows using QEMU v9.0.2...
WinApps |
BdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,47E5942C-AAEB-4F02-BBC7-ED557FD39FEB,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
WinApps | BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,47E5942C-AAEB-4F02-BBC7-ED557FD39FEB,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
WinApps | ❯ Windows started succesfully, visit http://localhost:8006/ to view the screen...
Also here is my winapps config file and my compose.yaml WINAPPS CONFIG FILE & COMPOSE.txt
Also, the container is already initialized when login in and needs to sudo
all these commands to use them:
docker compose --file ~/.config/winapps/compose.yaml start # Power on the Windows VM
docker compose --file ~/.config/winapps/compose.yaml pause # Pause the Windows VM
docker compose --file ~/.config/winapps/compose.yaml unpause # Resume the Windows VM
docker compose --file ~/.config/winapps/compose.yaml restart # Restart the Windows VM
docker compose --file ~/.config/winapps/compose.yaml stop # Gracefully shut down the Windows VM
docker compose --file ~/.config/winapps/compose.yaml kill # Force shut down the Windows VM
Can you try adding this to your compose.yaml? This worked for me. After a few other changes I had to enable for Podman to work.
image: dockur/windows
group_add:
- keep-groups
What am i supposed to do?