I have a Windows kernel driver mydriver, which is involved in the Windows boot sequence. I run windbg on a host machine to debug the target machine. My target machine, which runs the driver, is a Windows 11 virtual machine. I can control it using a virtual manager.
The driver doesn't control anything critical about the boot process; it's somewhere in the boot sequence just because that's how we do it (I am not an expert). I don't have bootdebug ON.
I use windbg with the following workflow:
- Compile my driver; the result is
mydriver.sys - Copy
mydriver.systoc:\temp - In windbg, run the command
.kdfiles mydriver.sys c:\temp\mydriver.sys - Reboot the Windows virtual machine which I am debugging
- Windbg sends the updated compiled driver, printing
.....for progress - Observe how the new driver behaves
Sometimes (that is to say, 75% of the time), the progress at step 5 stops for no apparent reason. Windbg waits several minutes and reports that the target VM crashed.
................................KDTARGET: Refreshing KD connection
Break instruction exception - code 80000003 (first chance)
A fatal system error has occurred.
It looks like the process of sending the compiled driver is too delicate and not tolerant to network variability. I'd like to eliminate it.
How else can I copy the compiled driver's sys-file to my target computer, so it would be loaded at Windows boot time?