+Tue Aug 12 09:27:03 CEST 2008 Daniel Veillard <veillard@redhat.com>
+
+ * docs/formatdomain.html docs/formatdomain.html.in: documentation
+ for the USB format option by Guido Günther
+
Fri Aug 11 14:29:02 CEST 2008 Jim Meyering <meyering@redhat.com>
tests: append a newline to expected-output files lacking NL-at-EOF
<a href="#elementsDevices">Devices</a>
<ul><li>
<a href="#elementsDisks">Hard drives, floppy disks, CDROMs</a>
+ </li><li>
+ <a href="#elementsUSB">USB devices</a>
</li><li>
<a href="#elementsNICS">Network interfaces</a>
<ul><li>
the device name in the guest OS. Treat it as a device ordering hint.
The optional <code>bus</code> attribute specifies the type of disk device
to emulate; possible values are driver specific, with typical values being
- "ide", "scsi", "virtio", "xen". If omitted, the bus type is inferred from
- the style of the device name. eg, a device named 'sda' will typically be
- exported using a SCSI bus.
- <span class="since">Since 0.0.3; <code>bus</code> attribute since 0.4.3</span></dd><dt><code>driver</code></dt><dd>If the hypervisor supports multiple backend drivers, then the optional
+ "ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is
+ inferred from the style of the device name. eg, a device named 'sda'
+ will typically be exported using a SCSI bus.
+ <span class="since">Since 0.0.3; <code>bus</code> attribute since 0.4.3;
+ "usb" attribute value since after 0.4.4</span></dd><dt><code>driver</code></dt><dd>If the hypervisor supports multiple backend drivers, then the optional
<code>driver</code> element allows them to be selected. The <code>name</code>
attribute is the primary backend driver name, while the optional <code>type</code>
attribute provides the sub-type. <span class="since">Since 0.1.8</span>
</dd></dl>
+ <h4>
+ <a name="elementsUSB" id="elementsUSB">USB devices</a>
+ </h4>
+ <p>
+ USB devices attached to the host can be passed through to the guest using
+ the <code>hostdev</code> element. <span class="since">since after 0.4.4</span>
+ </p>
+ <pre>
+ ...
+ <hostdev mode='subsystem' type='usb'>
+ <source>
+ <vendor id='0x1234'/>
+ <product id='0xbeef'/>
+ </source>
+ </disk>
+ ...</pre>
+ <dl><dt><code>hostdev</code></dt><dd>The <code>hostdev</code> element is the main container for describing
+ host devices. For usb device passthrough <code>mode</code> is always
+ "subsystem" and <code>type</code> is "usb".
+ </dd><dt><code>source</code></dt><dd>The source element describes the device as seen from the host.
+ The USB device can either be addressed by vendor / product id using the
+ <code>vendor</code> and <code>product</code> elements or by the device's
+ address on the hosts using the <code>address</code> element.</dd><dt><code>vendor</code>, <code>product</code></dt><dd>The <code>vendor</code> and <code>product</code> elements each have an
+ <code>id</code> attribute that specifies the USB vendor and product id.
+ The ids can be given in decimal, hexadecimal (starting with 0x) or
+ octal (starting with 0) form.</dd><dt><code>address</code></dt><dd>The <code>address</code> element has a <code>bus</code> and
+ <code>device</code> attribute to specify the USB bus and device number
+ the device appears at on the host. The values of these attributes can
+ be given in decimal, hexadecimal (starting with 0x) or octal (starting
+ with 0) form.</dd></dl>
<h4>
<a name="elementsNICS" id="elementsNICS">Network interfaces</a>
</h4>
the device name in the guest OS. Treat it as a device ordering hint.
The optional <code>bus</code> attribute specifies the type of disk device
to emulate; possible values are driver specific, with typical values being
- "ide", "scsi", "virtio", "xen". If omitted, the bus type is inferred from
- the style of the device name. eg, a device named 'sda' will typically be
- exported using a SCSI bus.
- <span class="since">Since 0.0.3; <code>bus</code> attribute since 0.4.3</span></dd>
+ "ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is
+ inferred from the style of the device name. eg, a device named 'sda'
+ will typically be exported using a SCSI bus.
+ <span class="since">Since 0.0.3; <code>bus</code> attribute since 0.4.3;
+ "usb" attribute value since after 0.4.4</span></dd>
<dt><code>driver</code></dt>
<dd>If the hypervisor supports multiple backend drivers, then the optional
<code>driver</code> element allows them to be selected. The <code>name</code>
</dd>
</dl>
+ <h4><a name="elementsUSB">USB devices</a></h4>
+
+ <p>
+ USB devices attached to the host can be passed through to the guest using
+ the <code>hostdev</code> element. <span class="since">since after 0.4.4</span>
+ </p>
+
+ <pre>
+ ...
+ <hostdev mode='subsystem' type='usb'>
+ <source>
+ <vendor id='0x1234'/>
+ <product id='0xbeef'/>
+ </source>
+ </disk>
+ ...</pre>
+
+ <dl>
+ <dt><code>hostdev</code></dt>
+ <dd>The <code>hostdev</code> element is the main container for describing
+ host devices. For usb device passthrough <code>mode</code> is always
+ "subsystem" and <code>type</code> is "usb".
+ <dt><code>source</code></dt>
+ <dd>The source element describes the device as seen from the host.
+ The USB device can either be addressed by vendor / product id using the
+ <code>vendor</code> and <code>product</code> elements or by the device's
+ address on the hosts using the <code>address</code> element.</dd>
+ <dt><code>vendor</code>, <code>product</code></dt>
+ <dd>The <code>vendor</code> and <code>product</code> elements each have an
+ <code>id</code> attribute that specifies the USB vendor and product id.
+ The ids can be given in decimal, hexadecimal (starting with 0x) or
+ octal (starting with 0) form.</dd>
+ <dt><code>address</code></dt>
+ <dd>The <code>address</code> element has a <code>bus</code> and
+ <code>device</code> attribute to specify the USB bus and device number
+ the device appears at on the host. The values of these attributes can
+ be given in decimal, hexadecimal (starting with 0x) or octal (starting
+ with 0) form.</dd>
+ </dl>
+
<h4><a name="elementsNICS">Network interfaces</a></h4>
<pre>