Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Version 2.8
http://virtualkd.sysprogs.org/
-===============QUICKSTART===============-
1. Run VirtualKDSetup.exe on host (only needed if VirtualBox is used)
2. Run target\vminstall.exe on every virtual machine.
3. Run vmmon.exe (or vmmon64.exe) to start.
-========================================-
OVERVIEW
VirtualKD allows debugging your Windows kernel running on VirtualBox and VMWare
using very fast custom transport.
It seamlessly integrates with WinDBG and VisualDDK providing a much faster
debugging experience.
COMPATIBILITY
VirtualKD supports both x86 and x64 guest operating systems and was tested with the
following OSes:
* Windows Vista 32bit
* Windows XP 32bit
* Windows XP 64bit
* Windows 7 32bit
* Windows 7 64bit
* Windows 8 64bit
VMWare: all modern versions are supported. The following versions were tested:
* VMWare Server 1.0.5
* VMWare Server 2.0.0
* VMWare Workstation 6.5.1
* VMWare Workstation 8.0.4
INSTALLATION
When you normally debug Windows kernel inside a VM (without VirtualKD), a virtual
COM port is created and mapped to a named pipe.
Windows kernel interacts with the COM port via the KDCOM.DLL library and WinDbg
connects to it using a named pipe
specified in VirtualBox settings.
Installing VirtualKD requires installing both guest part (KDBAZIS.DLL) and host
part (KDCLIENT64.DLL):
If you are using VMWare, not special host-part installation is required. Just
launch VMMON64.EXE or VMMON.EXE once the guest part is installed.
If you are using VirtualBox, you need to register VBoxKD.DLL within VirtualBox by
running the following command:
regsvr32 VBoxKD64.DLL (or VBoxKD.DLL for 32-bit VirtualBox).
Note that you might need to close all instances of VirtualBox and VBoxSVC before
doing it, otherwise VirtualBox.xml will be rolled back.
Installing guest part is simple: just copy target\vminstall.exe to your VM and run
it from there. If anything goes wrong, you can try installing it manually:
This method is useful if you want to play with the VirtualKD sources and to load
different
versions of KDBAZIS.DLL without rebooting the virtual machine. Just start the
patcher
service, and the KDBAZIS.DLL is used instead of KDCOM.DLL. Stop it and KDCOM.DLL
gains
control back.
TWEAKING
You can modify some parameters in registry under
SOFTWARE\BazisSoft\VirtualKD\Patcher
1) AllowPatchingAtTableStart. Set it to 0 if your VMWare crashes when being
patched.
2) AllowReplacingFirstCommand. Set it to 1 if patching fails (and debug output
indicates
something like "0 free entries").
3) DefaultPatchingAtTableStart. You can try setting this to increase the
performance
(just a bit), but in can make VMWare crash on patching. Feel free to try ;)
Additionally, you can set the WaitForOS to 0 in VirtualKD\Monitor to let the
debugger
be started immediately when a VM is detected (without waiting for OS to load).
SOURCE STRUCTURE
The information about source code structure and some hints for experimenting will
be soon
published at http://VirtualKD.sysprogs.org/.
CHANGE LOG
v1.0
Initial version
v1.1
Fixed handler loss after Virtual Machine reset
Fixed bug with VMWare hanging when no debugger is connected
Added patcher/packet level log displaying in VMMON
Added support for KDCLIENT.DLL unloading from VMMON
Added advanced statistics reporting to VMMON
Added permissive SECURITY_ATTRIBUTES to statistics-related objects to support
non-admin VMWare instances
Added debugger command line customization
Added proxy mode support for debug VMMON builds
Added TraceAssist feature
Implemented buffered VMWare GuestRPC resulting in ~1.7x communication speedup
v2.4 Fixed compatibility with UAC (.vmpatch files are now saved to Application
Data)
v2.5 Added "instant break" feature, reducing debugger break-in time to zero when
using VisualDDK
Added support for restoring VM (VirtualBox/VMWare) to last snapshot from
VMMON/VisualDDK
THANKS
I would like to thank the following people for making the creation of this tool
possible:
* Ken Johnson [http://www.nynaeve.net] for the idea (VMKD project).
* OpenVMTools team [http://sourceforge.net/projects/open-vm-tools]
* Tomasz Nowak [http://undocumented.ntinternals.net/]
* MS and VMWare for creating scalable and flexible architectures