Little VMWare USB Tip
Don't know how many of you will find this relevant, but I seem to have finally figured out the easiest way to get USB passthrough working with VMWare. With some devices, like my Logitech Harmony remote, this is easy, as linux doesn't know what the hell to do with the thing. Once you plug it in, you just go to VMWare's menu and choose VM->Removable Devices->USB Devices->. Tada.
The problem occurs with things Linux does know how to use, like USB mass storage devices, aka keydrives. Linux can grab and attach these as SCSI disks, which makes grabbing them with VMWare more difficult. You can go through the usual steps, and your VM will see a plug event, but it never actually gets the device. My solution is to do the attach, wait for the plug event to fire, then, unplug and replug the keydrive. Now the device will actually show up in your VM. I think it's something about how VMWare does the attach; so that the drive is "claimed" already when you replug it, and Linux lets VMWare take it.
Now the warning: for all I know this won't work for anyone, or keep working as the Linux kernel and/or VMWare are updated, but if you are having trouble getting USB passthrough to work, this could work for you.
The problem occurs with things Linux does know how to use, like USB mass storage devices, aka keydrives. Linux can grab and attach these as SCSI disks, which makes grabbing them with VMWare more difficult. You can go through the usual steps, and your VM will see a plug event, but it never actually gets the device. My solution is to do the attach, wait for the plug event to fire, then, unplug and replug the keydrive. Now the device will actually show up in your VM. I think it's something about how VMWare does the attach; so that the drive is "claimed" already when you replug it, and Linux lets VMWare take it.
Now the warning: for all I know this won't work for anyone, or keep working as the Linux kernel and/or VMWare are updated, but if you are having trouble getting USB passthrough to work, this could work for you.


12 Comments:
Do you think people are stupid? Ofcourse they know that you need to go to the removable devices thing. Noob :S
Didn't really read the second paragraph there, did you, chief? But hey, thanks for stopping by.
P.S. I have virtually no publicity, so you obviously had to get here via a search. That search wouldn't happen to have been looking for help with VMWare and removable devices, would it?
I'd just like to add that I'm having this exact problem, and found this page from google.
Unfortunately, this sugguestion isn't working for me. No matter how I plug and unplug and replug, fast or slow, Linux always grabs the device and loads the driver and it NEVER shows up in the VM->Removable Devices->USB Devices menu (curiously, my flash card reader does show up in that menu while Linux is using it, but this modem won't)
That's linux 2.6.22, ubuntu 7.10, vmware 5.5.5.
Still searching for a solution. Back to google!
Ah, that's a new wrinkle, not having it show up in the menu at all. Sorry, I haven't encountered that yet, so I wouldn't be much use for guessing solutions. Some people have tried unloading the relevant usb modules before plugging in the device; that way Linux can't grab the device because it doesn't know how. Other than that, I've got nothing. If you find something (and still check this) please let me know.
I had the problem of the USB list showing up as empty on VMWare. The below solved this for me. I added the entry, rebooted Linux, then the VMWare session and my USB HDD was then recognised.
Add "usbfs /proc/bus/usb usbfs auto 0 0" to "/etc/fstab"
I found it on: http://www.linuxforums.org/forum
/other-distributions/
107168-vmware-cannot-read-usb-device.html
Hey, good tip. Much appreciated! I haven't personally tested but it seems sane enough, and if I can't trust an anonymous person on the internet then who can I trust?
I think I'm having a similar problem to what you've been discussing. I was using VMware Server on my old laptop (running Windows XP Home) and never had any problem finding and grabbing USB devices for the virtual machine via the "VM->Removable Devices->USB Devices" route. I just started using a new laptop that runs (shudder) Windows Vista Home Premium, and while the USB devices all work fine in the OS, I can't get them to show up on the virtual machine. Usually, the "VM->Removable Devices->USB Devices" justs lists "Empty" no matter what I have physically connected to the USB ports. Rarely (and seemingly unpredictably), it lists the device -- but, try as I might to click it and grab it (which always used to work on the old laptop), nothing works now. I tried upgrading from VMware Server Ver. 1.0.3 to Ver 1.0.5, but that didn't solve anything either. Any ideas?
Sorry, absolutely zero Vista experience here, and no experience running VMWare inside windows of any sort (I only ever use it for emergency Windows emulation), so I'm of little help here. I'd imagine the only reason that it shows up in the list at all is that the delay between Vista seeing the hardware and loading the corresponding driver is just long enough for VMWare to notice it.
Thanks! I really appreciate your taking the time to comment. You're probably right that Vista is to blame (yet another reason to avoid it).
A new development: I tried running my virtual machine under VMware Player (Ver. 2.0.4) -- instead of VMware Server -- and USB support works fine in the virtual machine even though the host OS is still Vista. I have no idea why this solved my problem, but it doesn't seem to impact negatively on any of the functionality of the virtual machine. So it seems that my best fix is simply to use VMware Player instead of VMware Server.
Interesting. What kind of functionality difference is there between Player and Server? I've only ever run Server.
With USB drives, i prefer ejecting them cleanly from linux before getting VMWare to open them. With external hard-disk based drives, Linux also powers down the drive before ejecting, so you'd end up with the VM unable to read from the device.
Ive found it works to unplug and replug in the drive after the removable drive is selected in VMWare.
Hope this helps.
Post a Comment
<< Home