1

I created a setup of a guest virtual machine High Sierra which runs by VirtualBox.

I KDP on both guest and host. I copied the development version of XNU from the KDP directory into the kernel directory on both guest and host.

I read that VirtualBox does not have the implementation for NVRAM so I had to use the following command to setup the kernel boot arguments for kernel debugging.

VBoxManage setextradata “your virtual machine name>" "VBoxInternal2/EfiBootArgs" [here go the kernel boot arguments]

However, I tried the combination of Command+Option+Control+Shift+Esc however it does not work.

Michael Foukarakis
  • 39,737
  • 6
  • 87
  • 123
user1341970
  • 449
  • 2
  • 7
  • 15

2 Answers2

0

As far as I'm aware, Command+Option+Control+Shift+Esc has a special meaning in hardware on Mac laptops. For a VM, you probably want to set the 0x8000 bit in the debug kernel argument and just send an ACPI power event to trigger the debugger instead.

I can't say if this will work in VirtualBox though as I haven't used that to do kernel debugging for a number of years.

pmdj
  • 22,018
  • 3
  • 52
  • 103
0

My preferred method for attaching to a VM is using DTrace:

sudo dtrace -w -n "BEGIN { breakpoint(); }"

Then from the host you can:

kdp-remote <vm-ip>

Jlegend
  • 531
  • 1
  • 6
  • 19