[libvirt] [PATCH/RFC]: file backed usb massstorage

Guido Günther agx at sigxcpu.org
Mon Jul 28 15:02:45 UTC 2008


On Fri, Jul 25, 2008 at 04:17:30PM -0400, Guido Günther wrote:
> attached is some basic support for host device passthrough. It enables
> you to passthrough usb devices in qemu/kvm via:
On top of the hostdev passthrough (but it's actually totally
independent) I added usb massstorage backed by a file. Very handy for
installer testing where the preseed data is on the USB stick and the
CD/DVD is the installation medium.
At the moment I'm using a dummy target "usbdisk" so we don't have to
check for target == NULL in that many places. Once qemu handles it we
can fill in bus and device address for unplugging. To add a file as usb
massstorage to the guest you can use:

<disk type='file' device='disk'>
     <source file='/foo/bar/usbmass.img'/>
     <target bus='usb'/>
</disk>

Does this make sense?
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-usbdisk-file-support.patch
Type: text/x-diff
Size: 8164 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080728/65141be5/attachment-0001.bin>


More information about the libvir-list mailing list