VirtualKD - Installation

VirtualKD improves kernel debugging performance with VirtualBox and VMWare virtual machines. To use VirtualKD with your VM, you will need to install 3 components:

  • Install debug transport DLL inside your VM

  • Prepare VirtualBox to work with VirtualKD (this step is not required if you are using VMWare only)

  • Start the VM monitor to be able to debug.

This tutorial provides step-by-step instructions on doing it:

  1. Download the latest version of VirtualKD and unpack the self-extracting atchive.

  2. If want to use VirtualBox, install VirtualBox 5.0 or later, close all VirtualBox instances and run VirtualBoxIntegration.exe. Then click the "Enable" button for your VM: If this does not work, read here about configuring a VirtualBox VM manually.

  3. Start your virtual machine. Copy target/vminstall.exe to it (e.g. via a shared folder)

  4. Run vminstall.exe on your VM:If you are using Windows 10 or later, ensure that "Replace kdcom.dll" checkbox is checked.

  5. Restart the Virtual Machine. If your VM is running Windows 8 or later, disable driver signature enforcement in the OS selection menu.

  6. Start vmmon64.exe on the host machine (use vmmon.exe if you are running 32-bit Windows).

  7. Start booting your VM. If VirtualKD has installed correctly, Windows will halt in the beginning of the boot process waiting for a debugger to connect:

  8. Switch back to the vmmon window you should see your VM in the list and the "OS" column should indicate "yes":

  9. Ensure that "OS" column actually mentions "yes". If not, the VirtualKD debug transport has not been loaded (not properly installed?) and the debugging wont't work.

  10. Press the "Run debugger" button. WinDbg will start (if not, press "Debugger path" and specify location of WinDbg):

  11. To debug an actual driver, press F5 in WinDbg and wait until the OS starts up.

  12. When OS finishes booting, create a snapshot before you install your driver.

  13. Then install the driver, set the breakpoints and launch it.

  14. If your driver crashes the system, simply close WinDbg, restore the snapshot, go to VMMon window and press "Run debugger" again.