1

I can't find an answer dealing with this. I am trying to learn kmdf driver programming, but trying to do this on a virtual machine on the same machine. I have my VirtualBox setup so that I can attach to a process from Visual Studio and debug the the kernel using pipes. I can break and step into etc. However, I'm not really clear as to what the hello world driver is supposed to do. I can install the certificates created during the build process. But How do I go about deploying the driver, and testing it on the virtual machine. I did figure out that automatic deployment is not possible for a virtual machine.

Any help would be greatly appreciated.

Electromic
  • 21
  • 2
  • What specifically goes wrong when you follow the instructions on MSDN? https://msdn.microsoft.com/en-us/library/windows/hardware/hh439665(v=vs.85).aspx – Harry Johnston Dec 10 '16 at 06:12
  • So here is the error I'm getting... error : Kernel mode drivers cannot be deployed to the local machine; error : Could not connect to the remote computer for deployment.; and error : Object reference not set to an instance of an object. I believe I'm getting this error because automatic deployment of the driver is not supported to a virtual OS on the same machine. – Electromic Dec 17 '16 at 17:35
  • Because of this, I'm trying to figure out how to manually deploy the driver. But the problem is I don't know what the driver is supposed to do. I cannot find it in the device manager after install. When I try to install it, I have all the output files in one directory. .inf and .sys. I get an error message that says "cannot find specified path". – Electromic Dec 17 '16 at 17:42
  • There's no obvious reason why it would behave any differently for a virtual machine. Certainly "kernel mode drivers cannot be deployed to the local machine" shouldn't apply to a VM, even if it is on the same physical box, sounds like you're pointing it at the host rather than the VM somehow. Do you have network connectivity between the VM and the host? It isn't clear to me from the docs whether the automated driver deployment supports named pipes or not. – Harry Johnston Dec 18 '16 at 01:23
  • Thank you very much your thoughts on this. I really appreciate it. Yes, I am pointing it to the host, because I've tired pointing to the VM and it just simply wouldn't connect. Apparently that's how you have to set it up for pipes, but I figured out that pipes do not work for automatic deployment. However, what you said pointed me in the right direction. I was unable to ping the VM from the host machine, and that's why the deployment was not working. Changing the Network type from NAT to Bridged did the trick! It is now set up for deployment!! Thank you very much! – Electromic Dec 21 '16 at 05:31
  • I would appreciate insight on one more thing though. The documentation doesn't show what the driver is supposed to accomplish. After installation, what should I expect. The output windows says "Deployment may take a few minutes" and nothing else happens. The deployment starts, but I don't see any additions to the Device Manager. Thanks again for the help. – Electromic Dec 21 '16 at 05:35
  • Don't know about that. Perhaps devices created this way are counted as hidden devices? See [Viewing Hidden Devices](https://msdn.microsoft.com/en-us/windows/hardware/drivers/install/viewing-hidden-devices). Changing device manager to tree view might help too, according to the docs the device will be a child of the root node. – Harry Johnston Dec 21 '16 at 05:48
  • For some reason it ended up in Samples, so I finally have a successful deployment. Thanks so much for the help! – Electromic Dec 22 '16 at 07:17

0 Answers0