VMware vSphere

 View Only
Expand all | Collapse all

USB Passthrough problems

  • 1.  USB Passthrough problems

    Posted Oct 08, 2010 12:39 PM

    I’m having some difficulty accessing directly attached USB devices through ESXi. I wonder if anyone can offer any advice?

    I’ve updated my ESXi installation (just a single Dell T605, managed with vSphere Client) from 4.0 to 4.1 specifically so I can use USB passthrough – I’ve got an APC SmartUPS which connects through USB.

    When I connect a USB device to the server (and once the usbarbitrator service is manually started), the message log shows several entries, including one that says “device is available for passthrough”. However, the vSphere Client “add USB device” option is greyed out and “there are no USB devices available on the host” is displayed in the info pane. The guest is in a version 7 VM with a USB controller already installed.

    The support console offers a couple of extra clues. Firstly, the devices I’ve tried to connect (it’s not just the UPS: I’ve tried a USB HD and a USB flash drive too) show up fine if I do “lsusb”. Secondly, I’ve tried using “vim-cmd vmsvc/device.connusbdev” (although I don’t understand how to properly get the path info for any given device) but whatever I try, I always end up with the command itself returning without error, but a message in both the host and VM event logs that says, “Error message from VMWareHost: Unable to connect the USB device "(null)" to the virtual machine (error code 13).” If the VM is powered off, the device is added, but described as “not present” and disappears when the machine is powered on.

    Full disclosure: I accidentally installed the two bulletins that make up the 4.0 -> 4.1 upgrade in the opposite order to that suggested. This doesn’t appear to have caused problems in any other respect.

    So… can anyone help? Does anyone recognise the problem? Can anyone suggest where I should look next or what I might be able to try? Should I have to start the usbarbitrator service manually – this doesn’t seem to be a feature of most of the walkthroughs? Should the error message always be for device “null” in the event log – surely a real device ID should be shown here?

    Any help is very much appreciated!



  • 2.  RE: USB Passthrough problems

    Posted Oct 08, 2010 01:21 PM

    What was the bit about starting the service manually?

    My thoughts on it in general: http://blog.peacon.co.uk/usb-passthrough-with-esxi-4-1/

    http://blog.peacon.co.uk

    Please award points to any useful answer.



  • 3.  RE: USB Passthrough problems

    Posted Oct 08, 2010 02:26 PM

    Service starting: as I understand it, USB passthrough relies on the usbarbitrator service which directs communication between the physical device and the VM to which it is attached. I found that this service was not running on the hypervisor but it can be started, as you might expect, with the command "/etc/init.d/usbarbitrator start" at the hypervisor console. I wondered if it would make any difference after reading a blog post on general console commands.

    I don't know whether the fact it wasn't starting automatically is a symptom of my problem or whether the problem is further back in the chain and this service would start once a device was successfully connected to a VM. However, I think the "available for passthrough" messages only appear in the message log when this service is running.

    Blog post: I read your post, J1mbo (I found it when looking up this problem earlier), and it makes interesting reading (especially the performance limitations for data transfer - directly connecting a backup drive was something I would have considered doing). Unfortunately (for me), everything seems to have worked first time when you tried it!



  • 4.  RE: USB Passthrough problems

    Posted Oct 08, 2010 03:00 PM

    I've not needed to start the service manually with any of the hosts I've run 4.1 on (yet!) so perhaps this is the root of your problem. Are the ports configured in the BIOS for USB 2 mode? Would a re-install from scratch of ESXi be out of the question?

    http://blog.peacon.co.uk

    Please award points to any useful answer.



  • 5.  RE: USB Passthrough problems

    Posted Oct 08, 2010 03:29 PM

    I'm wondering if their is some other service that needs to be running that I don't know about that might not be starting for similar reasons, assumign that this one should be running,

    It has ocurred to me that a reinstall might be on the cards. I've never done this. My VMs are all stored locally - I assume I'll need to backup the configuration for the various VMs, but is it easy to reinstall ESXi without disturbing the datastore?



  • 6.  RE: USB Passthrough problems

    Posted Oct 08, 2010 05:12 PM

    When I've used USB passthrough I haven't needed to start the service either. What sort of USB device are you using?

    When you boot the install media for ESXi you'll see the repair option. That will replace the ESXi system partitions but preserve VMFS as long as

    1) the vmfs is beyond the first 900 MB of disk space

    2) you select the original install disk

    You'll want to first backup your config with vicfg-cfgbackup from the vCLI or Set-VMHostFirmware from PowerCLI. While the repair is a safe operation, I would still have a backup of all VMs.




    Dave

    VMware Communities User Moderator

    Now available - vSphere Quick Start Guide

    Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.



  • 7.  RE: USB Passthrough problems

    Posted Oct 08, 2010 06:26 PM

    Thanks for your help Dave.

    I've tried several USB devices: an APC SmartUPS, a random USB flash drive and an IcyBox SATA drive housing - same results with all three.

    I've got the config backup sorted but as to your other points:

    1) How can I tell if the VMFS is beyond the first 900 MB of disk space?

    2) My original install disk was the Custom Dell version of ESXi 4.0 installable. I want to use 4.1 (I've downloaded the Dell version again). Are you saying this is not a safe thing to do?



  • 8.  RE: USB Passthrough problems

    Posted Oct 08, 2010 06:37 PM

    1) fdisk -l at the console will confirm that. It's a 99.9% chance that it'll be fine, but I wouldn't want someone to be the .1 %.

    2) I was meaning the HD that gets installed to. Let's say your system had 2 disks, one of which was just a datastore. If you were to select that disk by accident ESXi would just wipe the disk and put down a fresh copy of ESXi. You get prompted to confirm your disk choice, but the repair process doesn't prevent you from making a mistake.




    Dave

    VMware Communities User Moderator

    Now available - vSphere Quick Start Guide

    Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.



  • 9.  RE: USB Passthrough problems

    Posted Oct 08, 2010 08:50 PM

    Well, I've repaired the installation from the 4.1 CD (thanks for expanding on your points, Dave). Unfortunately, things are behaving much as before.

    This time I haven't manually started the usbarbitrator service (and it seems not to be running), but I am getting at least one USB device in the message log descibed as "available for passthrough". I'm wondering if this may have been happening all along. But regardless, there are no devices available in the client "Add Hardware" dialogues, even though the device appears to have been picked up and selected as a candidate for passthrough.

    Can anybody suggest a possible next course of action?



  • 10.  RE: USB Passthrough problems

    Posted Oct 08, 2010 10:44 PM

    If you access the console, run lsusb, plug in some devices, and run lsusb again do you see any difference in the output?




    Dave

    VMware Communities User Moderator

    Now available - vSphere Quick Start Guide

    Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.



  • 11.  RE: USB Passthrough problems

    Posted Oct 09, 2010 08:12 AM

    I'd update the BIOS, confirm it's not configured to USB 1.1 only, and do a completely fresh install to a USB drive and compare that.






    http://blog.peacon.co.uk

    Please award points to any useful answer.

    Unofficial List of USB Passthrough Working Devices



  • 12.  RE: USB Passthrough problems

    Posted Oct 09, 2010 09:43 AM

    Dave, the devices are showing up fine in lsusb output - they're correctly described and the -t option shows the hubs and connection path to each device as I'd expect to see it.

    J1mbo, there's nothing in the BIOS that looks like a 1.1 / 2.0 selection option (no "legacy" or anything like that). The devices get described in the message log as "fast" or "slow", so I'm guessing this is working on some level. I hadn't thought of checking for BIOS updates, so thanks for that suggestion: I'll see if there's an update available. Likewise, a clean install to USB sounds like a good plan. I'll look into that too.



  • 13.  RE: USB Passthrough problems

    Posted Oct 11, 2010 10:32 AM

    Well, the BIOS is already the latest version, so I can't update it. Unfortunately, I've spent rather too long on this problem over the last few days and (reluctantly) I'm going to have to park it for a while. The only thing I haven't tried is the clean install to USB drive, (and a USB 2.0 PCI card I have, which I think will go in the server's PCI-X slot) but as the server is currently physically inaccessible, both will have to wait.

    Thanks very much to the people who've offered assistance so far.

    Of course, if anyone can suggest a config setting that might be having a bearing on this, I'd love to know!



  • 14.  RE: USB Passthrough problems

    Posted Mar 28, 2011 06:40 PM

    Hi there!  I hate to resurrect a zombie thread, but I had an issue with USB passthrough and was able to correct it by updating the VMware Tools on the virtual machine.  I got the same message, "There are no USB devices available on the host".  After pulling my hair out trying to figure out why I couldn't see the darn USB device (a card reader, in my case), I updated the VMware Tools on a whim and the device was instantly visible.

    Hopefully, this will be of some assistance to the other folks that find themselves facing this dilemma.



  • 15.  RE: USB Passthrough problems

    Posted Mar 29, 2011 08:08 AM

    thanks for sharing it here Meta, I am now trying to install my USB wireless Network card into my Linux OS in ESXi 4.1 hopefully it works fine.