When you run VMware on a Windows XP host, and a WindowsXP virtual
machine runs in
the VMware, now you plugin a new usb device to the host, the found new
device wizard of
the host machine will say that the host found a new device named VMware
USB Device
whose Hardware ID is USB\Vid_0E0F&Pid_0001. Then the host will load the
VMware USB
Device driver, which is a USB client driver. And the VMware virtual
machine will detect the
real usb device type and install the correct device USB client driver.
When you unplug the
usb device from the virtual machine, the host machine will replace the
VMware USB Device
driver with the correct device driver.

I want to know how the whole process happens. Why the host pnp manager
load the VMware
usb client driver other than the correct device driver when detecting
any usb device with the
running of VMware? And how it replaces the VMware usb client driver
with the correct device
driver when you unplug the usb device from the virtual machine?

The process likes a magic to me. I want to know how. The more detailed,
the better.

Thank you all!

RE: how the vmware windows virtual machine connect the usb device from by pavel_a

pavel_a
Mon Apr 10 06:33:02 CDT 2006

Vmware installs a filter over USB bus driver that modifies device
IDs reported by USB driver.

--PA

"kaka" wrote:
> When you run VMware on a Windows XP host, and a WindowsXP virtual
> machine runs in
> the VMware, now you plugin a new usb device to the host, the found new
> device wizard of
> the host machine will say that the host found a new device named VMware
> USB Device
> whose Hardware ID is USB\Vid_0E0F&Pid_0001. Then the host will load the
> VMware USB
> Device driver, which is a USB client driver. And the VMware virtual
> machine will detect the
> real usb device type and install the correct device USB client driver.
> When you unplug the
> usb device from the virtual machine, the host machine will replace the
> VMware USB Device
> driver with the correct device driver.
>
> I want to know how the whole process happens. Why the host pnp manager
> load the VMware
> usb client driver other than the correct device driver when detecting
> any usb device with the
> running of VMware? And how it replaces the VMware usb client driver
> with the correct device
> driver when you unplug the usb device from the virtual machine?
>
> The process likes a magic to me. I want to know how. The more detailed,
> the better.
>
> Thank you all!
>
>

Re: how the vmware windows virtual machine connect the usb device from by kaka

kaka
Mon Apr 10 08:58:48 CDT 2006

Well, this is also my idea in the beginning. But when I look for the
USB filter information from the registry, I can't find anything. This
is why I feel so surprise about the phenomenon.


Re: how the vmware windows virtual machine connect the usb device from by kaka

kaka
Tue Apr 11 21:44:50 CDT 2006

OK, I know a USB bus filter driver can modify the device IDs reported
to PnP Manager, and then a appointed driver will be loaded. If we do
such a thing in this way, it can work, I think.
Let us move our eyes to the virtual machine side. The Windows virtual
machine running in the VMware uses the Windows original usb bus driver
: usbuchi.sys, usbport.sys, and usbhub.sys. Now there's another
question comming out : how does the virtual machine direct the USB
request to the host machine? I mean, with the Microsoft usb bus driver
stack, how does the virtual machine make it?
In my opinion, the Microsoft usb host controller driver does the actual
USB request dealing work by using the HAL, so VMware must be emulate
the HAL interface and direct the corresponding function call to the
driver residing in the host. How do you guys think about it?


Re: how the vmware windows virtual machine connect the usb device from by Doron

Doron
Tue Apr 11 23:41:12 CDT 2006

the USB HC doesn't use the HAL, it just accesses the registers assigned to
it. The VM traps those reads and writes and emluates the USB device at the
HC layer.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"kaka" <thinker.coder.painter@gmail.com> wrote in message
news:1144809890.506123.67350@g10g2000cwb.googlegroups.com...
> OK, I know a USB bus filter driver can modify the device IDs reported
> to PnP Manager, and then a appointed driver will be loaded. If we do
> such a thing in this way, it can work, I think.
> Let us move our eyes to the virtual machine side. The Windows virtual
> machine running in the VMware uses the Windows original usb bus driver
> : usbuchi.sys, usbport.sys, and usbhub.sys. Now there's another
> question comming out : how does the virtual machine direct the USB
> request to the host machine? I mean, with the Microsoft usb bus driver
> stack, how does the virtual machine make it?
> In my opinion, the Microsoft usb host controller driver does the actual
> USB request dealing work by using the HAL, so VMware must be emulate
> the HAL interface and direct the corresponding function call to the
> driver residing in the host. How do you guys think about it?
>



Re: how the vmware windows virtual machine connect the usb device from by Pavel

Pavel
Wed Apr 12 11:41:01 CDT 2006

"kaka" <thinker.coder.painter@gmail.com> wrote in message news:1144677528.436847.200870@u72g2000cwu.googlegroups.com...
> Well, this is also my idea in the beginning. But when I look for the
> USB filter information from the registry, I can't find anything. This
> is why I feel so surprise about the phenomenon.

I don't have Vmware handy. Maybe it hooks or patches the host controller driver.

--PA



Re: how the vmware windows virtual machine connect the usb device from by Pavel

Pavel
Thu Apr 13 12:38:24 CDT 2006

Btw, there is another product that VMware recently started advertising
as their companion - AnywhereUSB by Digi
http://vmware.rsc02.net/servlet/cc5?NuOpQSRTDQAVHjhgksPkxnuHptQJhuVaVTC

--PA


"Pavel A." <pavel_a@NOwritemeNO.com> wrote in message news:e9xYEfkXGHA.4432@TK2MSFTNGP04.phx.gbl...
> "kaka" <thinker.coder.painter@gmail.com> wrote in message news:1144677528.436847.200870@u72g2000cwu.googlegroups.com...
>> Well, this is also my idea in the beginning. But when I look for the
>> USB filter information from the registry, I can't find anything. This
>> is why I feel so surprise about the phenomenon.
>
> I don't have Vmware handy. Maybe it hooks or patches the host controller driver.
>
> --PA
>