cyberspicecai / OSX-KVM_issue_me

Run macOS on QEMU/KVM. With OpenCore + Big Sur + Monterey + Ventura support now! Check your issues.
0 stars 0 forks source link

I clone for one issue. My macos 13 will stuck after about 1 hour on operation. #1

Open cyberspicecai opened 1 year ago

cyberspicecai commented 1 year ago

echo 1 > /sys/module/kvm/parameters/ignore_msrs

(this is required)

############################################################################

NOTE: Tweak the "MY_OPTIONS" line in case you are having booting problems!

############################################################################

MY_OPTIONS="+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+xsave,+xsaveopt,check"

This script works for Big Sur, Catalina, Mojave, and High Sierra. Tested with

macOS 10.15.6, macOS 10.14.6, and macOS 10.13.6.

ALLOCATED_RAM="16384" # MiB CPU_SOCKETS="1" CPU_CORES="4" CPU_THREADS="8"

REPO_PATH="." OVMF_DIR="."

shellcheck disable=SC2054

args=( -enable-kvm -m "$ALLOCATED_RAM" -cpu host,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,"$MY_OPTIONS" -k en-us -display vnc=0.0.0.0:1 -machine q35 -usb -device usb-kbd -device usb-tablet -smp "$CPU_THREADS",cores="$CPU_CORES",sockets="$CPU_SOCKETS" -device usb-ehci,id=ehci -boot order=a -device nec-usb-xhci,id=xhci -global nec-usb-xhci.msi=off -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -drive if=pflash,format=raw,readonly=on,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd" -drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1024x768.fd" -smbios type=2 -device ich9-intel-hda -device hda-duplex -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file="$REPO_PATH/OpenCore/OpenCore.qcow2" -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw -drive id=MacHDD,if=none,file="$REPO_PATH/macos13.qcow2",format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27 -monitor stdio -device VGA,vgamem_mb=1024 )

/home/root/OSX-KVM/qemu-7.0.0/build/qemu-system-x86_64 "${args[@]}"

I put the running script above. If you have the same issue now or before, pls give the solution or discuss it. Thanks. Cybersice.

cyberspicecai commented 1 year ago

update, when I remove vnc option in bash script. the gui will popup. No surprise, after about 10 minuties, the gui stuck too. but a good direction is that remote ssh shell is alive. I check some time to see if the kernel is always ok.

cyberspicecai commented 1 year ago

huge, the gui is alive again.

cyberspicecai commented 1 year ago

I doubt that the vnc in qemu conflicts with the internal vnc server of macos.

cyberspicecai commented 1 year ago

remove vnc setting in running script, the issue still there: the desktop will stuck after some operations. buit it will be ok , if you has no login, your moving on the logout screen is ok. Strange ! I change the device vga to vmware-sga ,the issue still there. and one thing is good, you can use no-gui evironment if you like.