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:
-
Download the latest version of VirtualKD and unpack the self-extracting atchive.
-
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.
-
Start your virtual machine. Copy target/vminstall.exe to it (e.g. via a shared folder)
-
Run vminstall.exe on your VM:If you are using Windows 10 or later, ensure that "Replace kdcom.dll" checkbox is checked.
-
Restart the Virtual Machine. If your VM is running Windows 8 or later, disable driver signature enforcement in the OS selection menu.
-
Start vmmon64.exe on the host machine (use vmmon.exe if you are running 32-bit Windows).
-
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:
-
Switch back to the vmmon window you should see your VM in the list and the "OS" column should indicate "yes":
-
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.
-
Press the "Run debugger" button. WinDbg will start (if not, press "Debugger path" and specify location of WinDbg):
-
To debug an actual driver, press F5 in WinDbg and wait until the OS starts up.
-
When OS finishes booting, create a snapshot before you install your driver.
-
Then install the driver, set the breakpoints and launch it.
-
If your driver crashes the system, simply close WinDbg, restore the snapshot, go to VMMon window and press "Run debugger" again.