Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My VM crash and reboot when apple logo appears #24

Closed
Raphitpt opened this issue Feb 2, 2022 · 34 comments
Closed

My VM crash and reboot when apple logo appears #24

Raphitpt opened this issue Feb 2, 2022 · 34 comments

Comments

@Raphitpt
Copy link

Raphitpt commented Feb 2, 2022

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

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

I checked and everything is correct

@thenickdude
Copy link
Owner

Share your VM config

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

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

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

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

@thenickdude
Copy link
Owner

What model is your host's CPU?

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

i'm on amd ryzen 7 5800h

@thenickdude
Copy link
Owner

thenickdude commented Feb 2, 2022

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.

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

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

@thenickdude
Copy link
Owner

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.

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

verbose mode don't work
and it crashes again

@thenickdude
Copy link
Owner

It crashes again after changing what?

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

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

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

i don't have opencore screen

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 2, 2022

ok thanks, i'll look again tomorrow

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

2022-02-03.10-14-52.mp4

Verbose mode don't work

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

Is there a place to find the machine logs?

@thenickdude
Copy link
Owner

You pressed ctrl+v instead of win+v.

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

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

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

ok is good, i'm just a noob

2022-02-03.11-58-06.mp4

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

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

@thenickdude
Copy link
Owner

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.

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

log.txt

@thenickdude
Copy link
Owner

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"

@thenickdude
Copy link
Owner

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.

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

I have nothing output

@thenickdude
Copy link
Owner

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

@Raphitpt
Copy link
Author

Raphitpt commented Feb 3, 2022

/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

@thenickdude
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants