Xen, virt-manager and USB drives

Posted: February 11th, 2007 | Filed under: libvirt, Virt Tools | 1 Comment »

Sam writes

Per a limitation in Xen, Xen guests have no support for USB at all. Many people wondered how guest domains would handle a USB thumbdrive. Short answer: they wont.

This isn’t the entire truth. For paravirtualized guests it is possible to do device hot plug with virtual disks. So a USB thumbdrive plugged into the host could be mapped into the guest as a virtual disk. If run locally on Dom0, I could imagine virt-manager listening in to DBus events from HAL about newly inserted USB storage devices. The user could be prompted to map the device through to a particular guest – if we remember the device’s UUID (universal unique identifier) we could automatically map it through to the same guest on subsequent insertion. The tricky aspect to all of this though is of course the removal process. The user would have to remember to umount the device in the guest before virt-manager in Dom0 unmapped it from the guest, finally enabling the user to physically remove it. Oh, we’d also have to figure out how to block GNOME volume manager from automatically mounting it in the host. So while there’s no direct USB support, it could be fun to hack up some form of integration between HAL, virt-manaager and Xen paravirt guests to deal with USB storage hotplug.

On the other hand if someone did want to write a virtual USB split front/back device driver for Xen, that’d be excellant too. Although far from trivial…

One Response to “Xen, virt-manager and USB drives”

  1. This is a challenge, right?

Leave a Reply





Spam protection: Sum of thr33 plus t3n ?: