[fedora-virt] Hostdev XML Not Working (Libvirt)

Robert L Cochran cochranb at speakeasy.net
Tue May 26 01:14:25 UTC 2009

Why doesn't the hostdev xml shown below for a USB device work? I've 
shown the entire <devices> block for context.

<disk type='file' device='cdrom'>
<target dev='hdc' bus='ide'/>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/Ubuntu9.img'/>
<target dev='vda' bus='virtio'/>
<interface type='network'>
<mac address='54:52:00:74:32:2f'/>
<source network='default'/>
<model type='virtio'/>
<serial type='pty'>
<target port='0'/>
<console type='pty'>
<target port='0'/>
<hostdev mode='subsystem' type='usb'>
<vendor id='0403'/>
<product id='6001'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='es1370'/>

The USB device of interest to me is an FTDI FT232RL chip. When I plug 
the board into a USB port on the host, I want it to be passed through to 
my Ubuntu guest so that it can be seen as /dev/ttyUSB0. The guest 
doesn't see it. I took the product and vendor id numbers from the 
/var/log/messages output, and these might be in hexadecimal (and I 
should be writing e.g. <vendorid=0x0403'/>. I might also be getting the 
physical handling of the device wrong: maybe it needs to be already 
plugged in at the time the Ubuntu guest is started up, or maybe I should 
start the guest first and then plug in the device?

Advice appreciated.

Bob Cochran

More information about the Fedora-virt mailing list