Hello Community -
There are quite few threads relating to ESX 3.0/3.5 and the Service Console support for USB devices so I do not want to re-collect info here. Since SC is really version of Red Hat Linux, USB support is in-built.
(Although not for individual Virtual Machine guests granted.)
My question relates to USB support and connectivity options for ESXi.
Since ESXi does not have a linux-based Service Console but BusyBox OS implementation to help with any management tasks of the hyper-visor, how is USB support integrated. Surely support must be there since bootable via USB and also most rack KVMs now have USB Keyboards.
Just asking how to get at the USB support options? If SC, then I could resort to #mount and #cp commands....but no SC as noted above, also no space available in most instances on local storage.
Thank you and I will be rewarding points promptly. Just looking for ideas around how to utliise the USB connectiivty options of ESXi.
If you want the contents of the drive to be visible from within the VI Client, yes, you'll need to use VMFS3 as the filesystem. If you just want console-level access to the contents of the device (e.g. from the "unsupported" or "SSH unsupported" logins), you can use VFAT. The easiest way to create a VMFS3 filesystem on it is to use the Storage management in the VI Client. I've actually not tried adding additional USB drives, so I'm not 100% certain that this will work.
From the CLI, you should be able to look in /dev/disks and see all of the available disks on the system. You can use fdisk -l /dev/disks/vmhba32\:0\:0\:0 to see the current partition map of a disk (in this case, disk0 on vmhba32, which is actually the USB stick on my ESXi machine). You should also be able to use fdisk to create a partition (type should be fb) for a new VMFS store. You can then use vmkfstools to create a filesystem on the partition you create - for example: vmkfstools -C vmfs3 /dev/disks/vmhba32\:0\:0\:1. Be careful with this command - that you get the correct HBA, disk, and partition number, as getting it wrong could wipe out something important.
If you dig into the thin service console in ESXi, you'll see several USB-related things. First, at boot time, you can see ESXi load different USB modules. If you log in to the console and look at the /mod directory, you'll see ehci-hcd, ohci, uhci, and storage USB drives. There's also a hid module, which is probably for USB HID support (keyboard & mouse).
I have a Raritan KVM that use USB for keyboard and mouse support, and it seems to work fine with ESXi. I'm not sure, however, if ESXi has built-in USB HID support or if it uses the BIOS emulation on my machines for that, but either way it seems t work fine.
I'm not sure exactly what your question is driving at, though - what kind of USB device are you trying to use with ESXi, and what are you trying to do with it?
What am a looking at is trying to access USB drives attached to ESX host. E.g., if I want to access a usb drive on a ESX host, that is just with the mount command via SC, but what about for ESXi? Since no SC, how would one mount and view a drive or dongle, etc... attached to host.
Thank you for your input. Very appreciated. How would one go about digging into the thin SC?
Are you trying to view it inside of ESXi, or inside of one of the guests running on ESXi? If you have the USB storage device attached at boot time, it may already show up in ESXi. However, ESXi has fairly limited filesystem support - probably just VFAT (FAT16/FAT32) and VMFS2/3 - so if your storage device has any other filesystem on it, ESXi will probably not read it.
Yes, I am trying to view and control the USB Drive from within ESXi.
Not concerned with pass-through to VM guest machine--will use USB over TCP/IP commercial solution for this.
Yes, it is attached at boot time, I built the server with USB drive, so I know that ESXi can see the USB drive.
My question:
How to access the USB drive from within ESXi.
>If ESX Service Console, I could just issue a DSEMG command to show all the hardware devices the kernel has detected. Find the drive and then mount it. However, not sure how to SSH to ESXi or if possible?
>If formatting the USB drive as VMFS3 is required, how would this be done in the first instance?
At Vmworld 2007 i was in a meeting with vmware engineers because i was part of the 3.5 beta. I asked them this question. Their quick answer was "it's not supported and we don't have plans to support it". Here's what i was asking about. I wanted the USB storage connected to a host to show up in Virtual Center just like it was local storage. I wanted to be able to format it as VMFS and to put VMs on it. Specifically, i wanted to have scheduled P2V's of our domain controllers on USB drives. For our yearly DR test, I just grab the USB drive and bring it with us to our DR location ....... Instant domain controllers.
If you want the contents of the drive to be visible from within the VI Client, yes, you'll need to use VMFS3 as the filesystem. If you just want console-level access to the contents of the device (e.g. from the "unsupported" or "SSH unsupported" logins), you can use VFAT. The easiest way to create a VMFS3 filesystem on it is to use the Storage management in the VI Client. I've actually not tried adding additional USB drives, so I'm not 100% certain that this will work.
From the CLI, you should be able to look in /dev/disks and see all of the available disks on the system. You can use fdisk -l /dev/disks/vmhba32\:0\:0\:0 to see the current partition map of a disk (in this case, disk0 on vmhba32, which is actually the USB stick on my ESXi machine). You should also be able to use fdisk to create a partition (type should be fb) for a new VMFS store. You can then use vmkfstools to create a filesystem on the partition you create - for example: vmkfstools -C vmfs3 /dev/disks/vmhba32\:0\:0\:1. Be careful with this command - that you get the correct HBA, disk, and partition number, as getting it wrong could wipe out something important.
Not too surprising - one of the main advantages of virtualization and one of the things VMware pushes is making sure that your VMs are portable. Disconnecting an O/S from a specific piece of hardware allows more flexibility with the underlying hardware. Any time you add anything from a local machine that ties a VM to that machine - a serial port, a parallel port, a USB device, or files on a USB storage device - you lose the portability of that machine. If you want to start the VM up elsewhere, you have to move one of those components manually, which means you need physical access to the box, etc. So, VMware's answer doesn't surprise me.
That said, I'm a fan of flexibility in terms of "use cases" for users, and I see your point about wanting to be able to do that with your domain controllers, plus many other scenarios that people can come up with for why it's useful to have access to local peripherals on a piece of hardware in the VMs.
I know that, when I boot a machine off a USB thumb drive for ESXi, I can create a datastore on that thumb drive that occupies the space not consumed by the ESXi install. This means, at some level, there is support for creating VMFS filesystems on a USB drive. As far as mapping that USB drive through to a VM - that isn't supported, and I don't think it's possible to use RDM to map any local drives through to a VM. A shame - I'd like to have that flexibility, but see Paragraph 1 :-).
I attended a MUG in halifax Nova Scotia for VMWare and asked the questions about usb support on ESXI and this is what I was told bu a software engineer for VMWare.
ESXi was going to have usb support the same as ESX has however they broke the code in ESXi so it is being looked at and there should be something working in the new year. I have an installation of ESX 3.5 and also ESXi 3.5 u3 and the ESX is great. Put in thin client as a wall adapter with 4 usb ports and video. Just plug in any usb device and it is part of the VM machine.. Great for backing up files to a usb drive and using any usb device like printers and so on. So hopefully in the short future there will be the same functionality in ESXi.
Perry Skipton
