thenickdude / KVM-Opencore

OpenCore disk image for running macOS VMs on Proxmox/QEMU

Home Page:https://www.nicksherlock.com/2021/10/installing-macos-12-monterey-on-proxmox-7/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My VM crash and reboot when apple logo appears

Raphitpt opened this issue · comments

Hi I hope you're doing well. I have a problem, I followed your tutorial to the letter for proxmox. My machine launches fine, but when I press mac os base system, the apple logo appears, then my machine reboots and so on. I'm on amd. Can you help me please

Check your core count is a power of two and your OSK is correct

I checked and everything is correct

Share your VM config

agent: 1
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-us>
balloon: 0
bios: ovmf
boot: order=ide2;virtio0;net0;ide0
cores: 2
cpu: Penryn
efidisk0: local:1200/vm-1200-disk-1.raw,efitype=4m,size=528K
ide0: local:iso/Monterey-Full.img,cache=unsafe,size=16G
ide2: local:iso/OpenCore-v16.iso,cache=unsafe
machine: q35
memory: 16384
meta: creation-qemu=6.1.0,ctime=1643831034
name: monterey
net0: vmxnet3=CA:FE:A0:F6:34:DE,bridge=vmbr0,firewall=1
numa: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=cce77d0a-d028-47af-8e11-5f3d4473a4dd
sockets: 2
vga: vmware
virtio0: local:1200/vm-1200-disk-0.raw,cache=unsafe,size=100G
vmgenid: 25751687-1fb0-4e8f-adf8-a941f6618042

Can you grab the whole args line? It was cut off

ah sorry:
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+fma4,+bmi1,+bmi2,+xsave,+xsaveopt,+rdrand,check

What model is your host's CPU?

i'm on amd ryzen 7 5800h

Hmm config looks good so far. I'm not sure that I've seen a test of the NUMA config for AMD, so you can try setting numa: 0 sockets: 0 and dropping the RAM allocation as needed to stick to one node. (It works on Intel but I haven't tested it with AMD)

At the macOS boot menu hit cmd/win + V once before selecting the boot option to enable Verbose mode, there may be a useful error printed during boot.

numa=0 socket=0 mermory=0, it doesn't crash

Whoops I meant sockets 1, if it launched with 0 that's amazing, lol.

I don't have AMD here for testing so I'm not sure why it doesn't like NUMA being enabled, sorry.

verbose mode don't work
and it crashes again

It crashes again after changing what?

Verbose mode definitely works, make sure you're just pressing the keys once and not holding them down.

for verbose mode, press windows + v ?
and when ?

At the OpenCore screen before you press enter to select the boot option.

i don't have opencore screen

Yes you do, because you said you "pressed macos base system" in your first post, that menu is OpenCore

ok thanks, i'll look again tomorrow

2022-02-03.10-14-52.mp4

Verbose mode don't work

Is there a place to find the machine logs?

You pressed ctrl+v instead of win+v.

I just thought, wouldn't it come that I don't have IOMMU to activate?

Activate what? No, IOMMU is not required for anything except good graphics performance.

ok is good, i'm just a noob

2022-02-03.11-58-06.mp4

So wait, did it boot successfully with numa: 0 before? If so just use that.

no it was a false hope, it crashed afterwards, there it is in numa 0

Okay, grab this serial-debug version of my OpenCore and set the VM to use that instead:

https://github.com/thenickdude/KVM-Opencore/releases/download/v16/OpenCore-v16-serial-debug.iso.gz

On the "Hardware" tab of the VM, add a new serial port with number "0". Start the VM and then while it is sitting at the OpenCore screen, run "qm terminal <VM_ID_HERE>" on your Proxmox commandline to monitor the serial port output. Then press enter in OpenCore to boot.

The log gets heavily scrambled by macOS but there could still be something useful in there.

Oh it's actually crashing due to a deadline timer running out in the kernel, is your host heavily loaded? I've seen this on a system where host load=100.

Another option is that the guest's clock is running at the wrong speed so the timeout happens too quickly.

You can adjust the kernel timeouts to fix this. Follow the instructions labelled "If you prefer, you can edit config.plist from the comfort of your Proxmox host instead" to edit your config.plist:

https://www.nicksherlock.com/2021/10/installing-macos-12-monterey-on-proxmox-7/

In your config.plist find the bit that says "keepsyms=1" (this is the macOS kernel arguments) and add this next to it: "tlbto_us=0 vti=9"

Also on Proxmox run this and let me know the output:

dmesg | grep -i -e tsc -e clocksource

This is to check if your system has a usable TSC time source available. Without one I think you're in trouble.

I have nothing output

If Proxmox has been online for a long time dmesg misses the early boot messages, try this instead:

grep -i -e tsc -e clocksource /var/log/kern.log /var/log/kern.log.1

/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.000000] tsc: Fast TSC calibration using PIT
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.000000] tsc: Detected 3193.905 MHz processor
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.010119] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.042073] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484873504 ns
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.062096] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2e09cc5255e, max_idle_ns: 440795261586 ns
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.182097] TSC synchronization [CPU#0 -> CPU#1]:
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.182097] Measured 5179578676 cycles TSC warp between CPUs, turning off TSC clock.
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.182097] tsc: Marking TSC unstable due to check_tsc_sync_source failed
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.218974] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.362151] clocksource: Switched to clocksource hpet
/var/log/kern.log:Feb 2 17:33:32 proxmox kernel: [ 0.373485] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns

Yeah that's causing the problem, please see issue #15 for possible solutions.