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
46.74k stars 2.53k forks source link

guestfish: /tmp/.guestfish-1000: Permission denied #433

Closed calvin2021y closed 2 years ago

calvin2021y commented 2 years ago

My os is Debian11, default gnome wayland desktop:

try start with (already download the image)

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    --privileged \
    -v "${PWD}/mac_hdd_ng_auto.img:/image" \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e GENERATE_UNIQUE=true \
    -e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
-e XDG_RUNTIME_DIR=/tmp \
-e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
-e QT_QPA_PLATFORM=wayland \
-e GDK_BACKEND=wayland \
-e CLUTTER_BACKEND=wayland \
-e DISPLAY=:0 \
-v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \
    sickcodes/docker-osx:naked

and with this

docker run -it \
    --device /dev/kvm \
   --privileged \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e GENERATE_UNIQUE=true \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
-e XDG_RUNTIME_DIR=/tmp \
-e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
-e QT_QPA_PLATFORM=wayland \
-e GDK_BACKEND=wayland \
-e CLUTTER_BACKEND=wayland \
-e DISPLAY=:1 \
-v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \
    sickcodes/docker-osx:monterey

both run into this problem:

/var/tmp/opencore-image-ng.sh-102/EFI/BOOT/BOOTx64.efi
/var/tmp/opencore-image-ng.sh-102/EFI/BOOT/.contentFlavour
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_backend "direct"
libguestfs: trace: set_backend = 0
libguestfs: create: flags = 0, handle = 0x5556426e2b90, program = guestfish
guestfish: /tmp/.guestfish-1000: Permission denied
libguestfs: trace: close
libguestfs: closing guestfs handle 0x5556426e2b90 (state 0)
ERROR: starting guestfish failed
### cleaning up ...
calvin2021y commented 2 years ago

I try run with sudo, without sudo I get this:

docker: unknown server OS: .
See 'docker run --help'.
calvin2021y commented 2 years ago

Try reinstall docker-ce and add user into docker group, no need to run docker as root:

id
uid=1001(calvin) gid=1001(calvin) groups=1001(calvin),27(sudo),106(kvm),112(libvirt),998(docker)

boot into this problem:

QEMU 6.2.0 monitor - type 'help' for more information
(qemu) gtk initialization failed
calvin2021y commented 2 years ago

After remove docker.io, install docker-ce, I can start it with vnc.

not able to find way to made wayland work.