VMware Cloud Community
BobSimon
Contributor
Contributor

USB Drive

Here are a couple dozen lines from the log right after I plugged a USB thumb drive into my ESXi 4.1 host.  I can't follow all of this but the thumb drive was apparently rejected.  I'd like to understand why and if there's anything I can do to keep this device available.


Feb  2 14:21:11 vmkernel: 0:01:34:25.990 cpu0:4391)<6>usb 2-1.6: new high speed USB device using ehci_hcd and address 5
Feb  2 14:21:11 vmkernel: 0:01:34:26.105 cpu0:4391)<6>usb 2-1.6: configuration #1 chosen from 1 choice
Feb  2 14:21:11 vmkernel: 0:01:34:26.105 cpu0:4391)<6>usb 2-1.6: Vendor: 0x0781, Product: 0x554f, Revision: 0x0200
Feb  2 14:21:11 vmkernel: 0:01:34:26.105 cpu0:4391)<6>usb 2-1.6: Interface Subclass: 0x06, Protocol: 0x50
Feb  2 14:21:11 vmkernel: 0:01:34:26.106 cpu0:4391)<6>usb-storage 2-1.6:1.0: interface is claimed by usb-storage
Feb  2 14:21:11 vmkernel: 0:01:34:26.106 cpu2:17145)<7>usb-storage: device found at 5
Feb  2 14:21:11 vmkernel: 0:01:34:26.106 cpu0:4391)<6>usb 2-1.6: device is not available for passthrough
Feb  2 14:21:11 vmkernel: 0:01:34:26.106 cpu2:17145)<7>usb-storage: waiting for device to settle before scanning
Feb  2 14:21:11 vmkernel: 0:01:34:26.106 cpu0:4391)<6>usb 2-1.6: New USB device found, idVendor=0781, idProduct=554f
Feb  2 14:21:11 vmkernel: 0:01:34:26.106 cpu0:4391)<6>usb 2-1.6: new device strings: Mfr=1, Product=2, SerialNumber=3
Feb  2 14:21:11 vmkernel: 0:01:34:26.117 cpu1:4122)ScsiNpiv: 1474: GetInfo for adapter vmhba39, [0x410008038080], max_vports=0, vports_inuse=0, linktype=0, state=0, failreason=0, rv=-1, sts=bad0020
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu2:17144)usb-storage: detected SCSI revision number 0 on vmhba39
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu2:17144)usb-storage: patching inquiry data to change SCSI revision number from 0 to 2 on vmhba39
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu2:17144)usb-storage: setting peripheral qualifier to 'not connected' on vmhba39
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu0:4372)<6>usb-storage 2-1.6:1.0: unclaiming vmhba39
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu3:17145)ScsiScan: 1059: Path 'vmhba39:C0:T0:L0': Vendor: 'Best Buy'  Model: 'Geek Squad      '  Rev: '7.01'
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu3:17145)ScsiScan: 1062: Path 'vmhba39:C0:T0:L0': Type: 0x0, ANSI rev: 2, TPGS: 0 (none)
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu3:17145)ScsiScan: 110: Path 'vmhba39:C0:T0:L0': Peripheral qualifier 0x1 not supported
Feb  2 14:21:13 vmkernel: 0:01:34:28.108 cpu3:17145)<7>usb-storage: device scan complete
Feb  2 14:21:13 vmkernel: 0:01:34:28.120 cpu1:4372)usb storage warning (0 throttled) on unknown (SCSI cmd unknown): usb_stor_stop_transport called
Feb  2 14:21:13 vmkernel: 0:01:34:28.120 cpu1:4372)WARNING: LinScsiLLD: scsi_remove_host: Removing Host Adapter vmhba39
Feb  2 14:21:13 vmkernel: 0:01:34:28.120 cpu1:4372)<6>usb 2-1.6: device is available for passthrough
Feb  2 14:21:13 vmkernel: 0:01:34:28.120 cpu1:4372)ScsiAdapter: 1972: Unregistering adapter vmhba39
Feb  2 14:21:16 Hostd: [2011-02-02 14:21:16.744 FFF40B90 info 'USBDeviceManager'] USBLibGlueDeviceChange

Tags (2)
Reply
0 Kudos
21 Replies
DSTAVERT
Immortal
Immortal

USB devices are not available to the ESXi host. Some devices can be passed through to a guest.  http://www.vm-help.com/esx40i/VMDirectPath/USB_Setup.php

-- David -- VMware Communities Moderator
Reply
0 Kudos
BobSimon
Contributor
Contributor

Thanks for the reply but this article suggests otherwise:

http://www.experts-exchange.com/Software/VMWare/A_2094-Copy-files-to-USB-drive-under-VMware-ESX4-ESX...

The writer has instructions for both ESX4 and ESXi4, which may mean 4.0.  Did something change in 4.1 to prevent USB drives from being recognized?  If not, do you see anything obviously incorrect in this article?

Reply
0 Kudos
idle-jam
Immortal
Immortal

i do not have any access to the site, anyway can you follow the below guide and see if it works? if works for many whom i've issue with USB here before.

http://kb.vmware.com/kb/1022290

Josh26
Virtuoso
Virtuoso

Hi,

The second line in the mentioned experts-exchange article is:

As most people know, this is an unsupported method and undocumented by vmware

I would suggest you're better off sticking to a supported process and copying data using some of the other methods available.

Reply
0 Kudos
BobSimon
Contributor
Contributor

I've done that.  That's exactly why I'm looking for a faster approach.

Reply
0 Kudos
BobSimon
Contributor
Contributor

idle-jam,

Did you reference the kb article that you intended?  This one is titled, "Block size limitations of a VMFS datastore", which really doesn't have anything to do with my USB issue.

Reply
0 Kudos
idle-jam
Immortal
Immortal

my apology something went wrong on my clipboard. i have edited my post and hopefully you find it useful.

Reply
0 Kudos
BobSimon
Contributor
Contributor

Idle-jam,

Thank you for updating your pointer.  This article was interesting, however my current interest is in using a USB drive to move files to the host rather than into a VM.

I found vSphere Client's datastore browser to be excruciatingly slow.  While Veeam FastSCP is better, I am seeking a more efficient means to transfer large files directly onto host local storage.

The second half of the log I copied in my initial post probably contains guidance on how to proceed to someone who is UNIX savvy.  I suspect that solving this problem involves tweeking the usb-storage or ScsiScan processes.

Reply
0 Kudos
DSTAVERT
Immortal
Immortal

The article you mentioned will probably be your best bet. SInce this is unsupported and not recommended you probably aren't going to get many takers. Even if something can be made to work doesn't mean that it would be a reliable method or that it wouldn't make the system unstable. As mentioned you would be further ahead finding a solution that has been proven to work well.

What is it you are trying to accomplish?

-- David -- VMware Communities Moderator
Reply
0 Kudos
BobSimon
Contributor
Contributor

My primary or immediate goal is to quickly move large .iso and .vmdk files to local storage on the host.  But I also want to learn more about vmware and linux, which is why I haven't already given up trying an unsupported approach and used one of the slow file transfer methods that work.

Reply
0 Kudos
dbartlow
Contributor
Contributor

Is there a solution for this problem?  I am looking at adding a dongle to use for a security system here at my workplace and the software has a dongle that it needs to use for this purpose.  Do you have any suggestionsthat you would recommed trying?

Reply
0 Kudos
RaymondG
Enthusiast
Enthusiast

I dont use 4.1i, but I was always under the impression that there was no 'os' in the 'i' versions to even mount a USB.  I mount with no issues using the non installable version.    If you are referring to the local storage vmdk that is created during the install, couldnt you just go in VC to the datacenters section and upload to that datastore directly from your desktop?

Raymond Golden VCP3, VCP4, MCSA, A+, Net+, SEC+
Reply
0 Kudos
DSTAVERT
Immortal
Immortal

@dbartlow

I would start here http://www.vm-help.com/esx40i/VMDirectPath/USB_Setup.php and http://kb.vmware.com/kb/1021345

-- David -- VMware Communities Moderator
Reply
0 Kudos
dbartlow
Contributor
Contributor

Does this also work if you were still on 4.0?

Reply
0 Kudos
RaymondG
Enthusiast
Enthusiast

USB pass through is available in 4.0 in advance setting in the configuration tab

Raymond Golden VCP3, VCP4, MCSA, A+, Net+, SEC+
Reply
0 Kudos
DSTAVERT
Immortal
Immortal

This is a 4.1 capability. You might try a USB over IP hub. Silex, Belkin, Digi make such devices. There are probably others. I have used Silex devices and they work extremely well for many different connected devices although not all.

Edited to add

VMdirectpath is a 4.1 capability. USB passthrough is available in 4.0. There are limitations with passthrough and things like vMotion will not be possible

-- David -- VMware Communities Moderator
Reply
0 Kudos
RaymondG
Enthusiast
Enthusiast

I am using 4.0 and Passthrough is available via the tabs i mentioned.

Raymond Golden VCP3, VCP4, MCSA, A+, Net+, SEC+
Reply
0 Kudos
BobSimon
Contributor
Contributor

I was more interested in using a USB thumb drive to move files to my ESXi host than in passthrough to a VM.  Here is what I've learned so far in my unsuccessful attempts.

I installed ESXi 4.1 on an 8GB USB stick then booted from it.

The list command: ls /dev/disks shows that my USB drive is referred to as mpx.vmhba32:C0:T0:L0

I was able to add a new 7GB primary partition (#2) on the thumb drive; type c = Win95 FAT32 (LBA)
~ # fdisk /dev/disks/mpx.vmhba32:C0:T0:L0
The new partition shows up as /dev/disks/mpx.vmhba32:C0:T0:L0:2

The system does not have mkfs so I used a standalone linux machine to format the new partition:
[root@Fedora5 /]# mkfs.vfat /dev/sda2

I can successfully mount the partition on the standalone linux machine and on my Vista laptop, but not on ESXi.  After adding
"/dev/disks/mpx.vmhba32:C0:T0:L0:2  /usbstick  vfat  defaults  0  0"
to /etc/fstab and entering the mount command, I get the following message:
mount: mounting /dev/disks/mpx.vmhba32:C0:T0:L0:2 on /usbstick failed: No such device

I suspect that usbarbitrator makes the kernel ignore the USB drive because I found the following in /var/log/messages:

Feb  9 11:58:30 root: usbarbitrator Evicting objects on USB devices from the object cache
Feb  9 11:58:30 root: usbarbitrator Unclaiming USB devices
Feb  9 11:58:31 root: usbarbitrator Rescanning to complete removal of USB devices
Feb  9 11:58:31 vmkernel: 0:00:00:37.192 cpu1:5533)<6>usb passthrough enabled; all eligible devices will be unclaimed by kernel drivers except for ESXi boot device vmhba32
Feb  9 11:58:31 root: usbarbitrator Rescanning to complete removal of USB devices

I don't believe I will be able to make additional progress on this project but will post here if I find out anything else of interest.

Bob Simon

Reply
0 Kudos
DSTAVERT
Immortal
Immortal

Although I would not use this in production why not use an estata disk rather than USB. On a supported controller this could be added as a datastore. Faster by far than USB as well. I would shut down the host to add or remove the drive to preserve stability.

-- David -- VMware Communities Moderator