Page 1 of 1

Using USB with VMWare

Posted: Wed Mar 10, 2010 7:53 pm
by osdnlo
My answer to a locked thread. If you want to develop a USB driver using VMWare, then there are two things to do first:

01. Add the following lines to your .vmx file
monitor = "debug"
usb.analyzer.enable = TRUE
usb.analyzer.maxLine = 8192
mouse.vusb.enable = FALSE
02. Remove the following lines from your .vmx file
usb:0.present = "TRUE"
usb:0.deviceType = "hub"
usb:1.present = "TRUE"
usb:1.deviceType = "Mouse"
Now, restart the VM. You should now be able to attach a device to the VM and the connection will be detected as if you were testing on real hardware. Otherwise, if you did not remove those lines (each time you connect and suspend your VM), then the VM will think that a device is already connected when you restart the VM, so remove those lines each time before you restart and only after you have connected a device successfully; this may take a few tries. ;)

Re: Using USB with VMWare

Posted: Thu Mar 11, 2010 3:51 am
by osdnlo
CORRECTION: After you have successfully connected a USB device to VMWare at least once, you do not have to edit the .vmx file as long as you leave the device as it was when you first successfully connected the device to VMWare. You will only need to edit the .vmx file after you reboot the system or change the device position. Even if you remove the device, as long as you reattach it back to the exact same port and controller, all will be fine. Finally, if you pay attention to the vmware.log file, and if you added the lines I specified above, then you will see USB debug information, packet dumps, etc. The output is human readable and extremely useful. This information applies to both the free player as well as the workstation.