USB and Virtual Machines

I’m trying to make a USB mass storage device work in a VM in way that
all USB communication will happen over a network. Since there is no USB
stack in a Windows XP VM, I have a bus driver (KMDF based) that can
create PDOs for the device. My goal is also to use the native
USBStor.sys driver. I ran into 2 problems. Firstly the USBStor.sys
wouldn’t load because of absence of USBD.sys. I have solved it by
providing the USBD.sys file into the drivers folder. (I already saw the
discussion about not being able to redistribute it etc…am aware of how
to manage that…maybe).

Problem is that now USBStor.sys loads and its Driver Entry is called
(which is what you’d expect). Next I expect to get an URB down the stack
and its usually for Reading Descriptor for the device. I’m getting that
too (IOCTL_INTERNAL_USB_SUBMIT_URB)…except that in my Bus driver
Device_EvtIoInternalDeviceControl, the InputBufferLength is 0 and
OutputBufferLength is like 0x81234567 (a big hex no that looks like a
pointer in fact).

If I do the same experiment on a regular XP machine the results are
different and I get a well formatted URB with right size etc…

Can someone tell me why I’m seeing what I’m seeing? Is the absence of
USB stack and the way USBD is being provided a problem?

Thanks

PG

Please disregard. I found my answer.