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
45.33k stars 2.4k forks source link

[Arch Linux] Running Catalina is OK, but when switching to Ventura it crashes on boot #593

Open easterneas opened 1 year ago

easterneas commented 1 year ago

Hi, love this project so far!

As of now, I'm recently having an issue when trying to build a container from a Docker command in README. Running Catalina was fine, but when switching to Ventura as I need Xcode (which requires OS version at least 12.5), it crashed on first boot (even it didn't successfully boot to the Recovery screen).

I'm testing on 2 laptops (Ryzen 5 4500U and Ryzen 7 5700U, both using Arch-based distro), and all of them crashed with this command below (I added also the parameter from this issue):

docker run -it \
    --device /dev/kvm \
    -p 50924:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
    -e RAM=12 \
    -e CPU='Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on' \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
    sickcodes/docker-osx:ventura

I've cleaned unused containers, images, and cache beforehand, but I'm not sure if this also frees used ports from deleted containers. I've also made sure the steps during the initial installation, but I might a step or two during the process.

For OS-related information

From this command:

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

Here's the output of both laptops:

Ryzen 5 4500U

Linux [username]-laptop 6.0.10-zen2-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 26 Nov 2022 16:51:24 +0000 x86_64 GNU/Linux

1
NAME="Garuda Linux"
PRETTY_NAME="Garuda Linux"
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p2  222G  136G   78G  64% /home
QEMU emulator version 7.1.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 8.10.0
               total        used        free      shared  buff/cache   available
Mem:            22Gi       5,5Gi       9,1Gi       6,0Mi       8,3Gi        17Gi
Swap:           39Gi       2,3Gi        37Gi
6
egrep: warning: egrep is obsolescent; using grep -E
6
crw-rw-rw- 1 root kvm 10, 232 Des 15 10:46 /dev/kvm
total 0
drwxrwxrwt  2 root root 120 Des 14 23:02 .
drwxrwxrwt 22 root root 720 Des 15 11:52 ..
srwxrwxrwx  1 [username] [username]   0 Des 14 23:02 X0
srwxrwxrwx  1 [username] [username]   0 Des 14 23:02 X1001
srwxr-xr-x  1 gdm  gdm    0 Des 14 23:02 X1024
srwxr-xr-x  1 gdm  gdm    0 Des 14 23:02 X1025
root        2601  1.4  0.2 1968776 57216 ?       Ssl  Des14  11:00 /usr/bin/dockerd -H fd://
[username]      262459  0.0  0.0   6572  2560 pts/11   S+   11:52   0:00 grep dockerd
kvm:x:992:libvirt-qemu,qemu
libvirt:x:964:
docker:x:963:[username]
libvirt-qemu:x:960:

Ryzen 7 5700U

Linux [username]-82kc 6.0.12-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:40 +0000 x86_64 GNU/Linux
:1
1
NAME="Garuda Linux"
PRETTY_NAME="Garuda Linux"
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p5  348G   86G  261G  25% /home
QEMU emulator version 7.1.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
libvirtd (libvirt) 8.10.0
               total        used        free      shared  buff/cache   available
Mem:            22Gi        17Gi       1,1Gi       158Mi       4,6Gi       5,2Gi
Swap:           22Gi        11Gi        11Gi
16
egrep: warning: egrep is obsolescent; using grep -E
16
crw-rw-rw- 1 root kvm 10, 232 Des 15 11:54 /dev/kvm
total 0
drwxrwxrwt  2 root   root     80 Des 14 13:06 .
drwxrwxrwt 24 root   root   2,8K Des 15 11:46 ..
srwxrwxrwx  1 [username] [username]    0 Des 14 13:05 X1
srwxrwxrwx  1 [username] [username]    0 Des 14 13:06 X1001
root      187949  0.3  0.1 2635056 41428 ?       Ssl  Des14   4:31 /usr/bin/dockerd -H fd://
[username]    444740  0.0  0.0   6572  2536 pts/16   S+   11:55   0:00 grep dockerd
kvm:x:992:[username],libvirt-qemu,qemu
libvirt:x:963:[username]
libvirt-qemu:x:956:
libvirtdbus:x:955:
docker:x:950:[username]

Some notes

Hope this will give an insight! :)

Kibi1984 commented 1 year ago

Hello, i have the same Problem!

Looks like Ventura on a Ryzen is not working. Or have someone a running Ventura on a Ryzen CPU?