Below are the steps to debug the kernel of a Windows XP guest running through a VitualBox hypervisor.
|Windbg configuration(File->Kernel Debug...)|
|VirtualBox VM settings|
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:
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.