Below are the steps to debug the kernel of a Windows XP guest running through a VitualBox hypervisor.
In order to get the guest kernel to listen for a debugger connecting to it, C:\boot.ini on the guest Windows XP VM has to be edited. The boot.ini file now looks like this:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /debugport=COM1 /baudrate=115200
In order to debug the guest, start windbg and select “File->Kernel Debug…”, hit OK, and then start the VM in Virtual Box. The output in windbg shows that that there is a kernel attached.
By: Neil Sikka