sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
36.01k stars 1.78k forks source link

No mouse control when trying to run preinstalled catalina #766

Open Niedzwiedzw opened 1 month ago

Niedzwiedzw commented 1 month ago

❯ uname -a \ ; echo "${DISPLAY}" \ ; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \ ; grep NAME /etc/os-release \ ; df -h . \ ; qemu-system-x86_64 --version \ ; libvirtd --version \ ; free -mh \ ; nproc \ ; egrep -c '(svm|vmx)' /proc/cpuinfo \ ; ls -lha /dev/kvm \ ; ls -lha /tmp/.X11-unix/ \ ; ps aux | grep dockerd \ ; docker ps | grep osx \ ; grep "docker|kvm|virt" /etc/group

Linux manjaro 6.1.85-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 10 20:05:44 UTC 2024 x86_64 GNU/Linux :1 1 NAME="Manjaro Linux" PRETTY_NAME="Manjaro Linux" Filesystem Size Used Avail Use% Mounted on /dev/mapper/luks-c63ed8cc-789d-4a83-bae1-a63c1254d646 1,8T 1,3T 396G 78% / QEMU emulator version 8.2.2 Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers libvirtd (libvirt) 10.1.0 total used free shared buff/cache available Mem: 125Gi 43Gi 4,9Gi 1,8Gi 80Gi 82Gi Swap: 17Gi 1,2Mi 17Gi 24 egrep: warning: egrep is obsolescent; using grep -E 24 Permissions Size User Date Modified Name crw-rw-rw- 10,232 root 7 maj 18:43 /dev/kvm Permissions Size User Date Modified Name srwxrwxrwx 0 root 3 maj 14:14 X0 srwxr-xr-x 0 niedzwiedz 5 maj 11:22 X1 root 5487 0.1 0.0 3992344 94400 ? Ssl maj03 6:31 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock niedzwi+ 728779 0.0 0.0 9112 2560 pts/20 S+ 19:02 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox dockerd 1d55b7d69195 sickcodes/docker-osx:auto "/bin/bash -c 'echo …" 45 seconds ago Up 45 seconds 0.0.0.0:50922->10022/tcp, :::50922->10022/tcp upbeat_williamson kvm:x:992:libvirt-qemu,qemu,niedzwiedz docker:x:973:niedzwiedz libvirt:x:959:niedzwiedz libvirt-qemu:x:956:

Niedzwiedzw commented 1 month ago

the mouse cursor is displayed but I'm unable to move it... keyboard seems to work

Niedzwiedzw commented 1 month ago

image

samuelzurowski commented 1 month ago

I'm noticing this as well.

Niedzwiedzw commented 1 month ago

@samuelzurowski have you found any solution? are you on wayland by any chance?

bgola commented 1 month ago

same here, archlinux on wayland + sway.

bgola commented 1 month ago

I just tried with Xorg as well and same issue.

% uname -a
Linux brioche 6.8.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000 x86_64 GNU/Linux
samuelzurowski commented 1 month ago

@samuelzurowski have you found any solution? are you on wayland by any chance?

I ended up just using the vnc version of the container and preinstalled it. I do not use wayland.

wgetgoose commented 3 weeks ago

Same issue. Happened to me when I swapped from the :latest tag to the :naked tag after extracting my image. Changing the RAM env variable did not help. Keyboard works during the boot selection screen, but not on the login screen. Possibly the same issue as #765 ?

Edit: Over VNC for my case. The machine running the container is headless.

gilelias commented 2 weeks ago

I had the same issue. I found a solution:

  1. Make sure you have terminal access to your container. docker exec -it [container id] bash
  2. edit Launch.sh vim Launch.sh
  3. replace the lines: -device qemu-xhci,id=xhci \ -device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 \ with: -usb -device usb-kbd -device usb-tablet \
  4. restart your container.

basically reverting this commit: https://github.com/sickcodes/Docker-OSX/commit/756a1c03b928989f7841f1276ce7bd70e8772834#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L200

erickne commented 2 weeks ago

Thanks @gilelias ! The solution worked for me.