From 3703c3fed45613c5ee6b76677ab6cf9cfc9ebbb7 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 17 Jan 2011 14:33:00 -0700 Subject: [PATCH] docs: document element * docs/formatdomain.html.in: Talk about and
throughout. --- docs/formatdomain.html.in | 104 +++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 55e2cbd0bd..c9d8b726e0 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -722,6 +722,7 @@ </source> <target dev="hdb" bus="ide"/> <boot order='1'/> + <address type='drive' controller='0' bus='1' unit='0'/> </disk> </devices> ... @@ -824,8 +825,68 @@ +
address
+
If present, the address element ties the disk + to a given slot of a controller (the + actual <controller> device can often be + inferred by libvirt, although it can + be explicitly specified). + The type attribute is mandatory, and is typically + "pci" or "drive". For a "pci" controller, additional + attributes for bus, slot, + and function must be present, as well as an + optional domain. For a "drive" controller, + additional attributes controller, bus, + and unit are available, each defaulting to 0. +
+

Controllers

+ +

+ Many devices that have an <address> + sub-element are designed to work with a controller to manage + related devices. Normally, libvirt can automatically infer such + controllers without requiring explicit XML markup, but sometimes + it is necessary to provide an explicit controller element. +

+ +
+  ...
+  <devices>
+    <controller type='ide' index='0'/>
+    <controller type='virtio-serial' index='0' ports='16' vectors='4'/>
+    <controller type='virtio-serial' index='1'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+    </controller>
+    ...
+  </devices>
+  ...
+ +

+ Each controller has a mandatory attribute type, + which must be one of "ide", "fdc", "scsi", "sata", or + "virtio-serial", and a mandatory attribute index + which is the decimal integer describing in which order the bus + controller is encountered (for use in controller + attributes of <address> elements). The + "virtio-serial" controller has two additional optional + attributes ports and vectors, which + control how many devices can be connected through the + controller. A "scsi" controller has an optional + attribute model, which is one of "auto", + "buslogic", "lsilogic", "lsias1068", or "vmpvscsi". +

+ +

+ For controllers that are themselves devices on a PCI or USB bus, + an optional sub-element <address> can specify + the exact relationship of the controller to its master bus, with + semantics like any other device's address + sub-element. +

+ +

USB and PCI devices

@@ -908,6 +969,18 @@ </devices> ... +

+ There are several possibilities for specifying a network + interface visible to the guest. Each subsection below provides + more details about common setup options. Additionally, + each <interface> element has an + optional <address> sub-element that can tie + the interface to a particular pci slot, with + attribute type='pci' and additional + attributes domain, bus, slot, + and function as appropriate. +

+
Virtual network

@@ -1229,6 +1302,11 @@ qemu-kvm -net nic,model=? /dev/null It takes values "xen" (paravirtualized), "ps2" and "usb". +

+ The input element has an optional + sub-element <address> which can tie the + device to a particular PCI slot. +

Graphical framebuffers

@@ -1365,6 +1443,12 @@ qemu-kvm -net nic,model=? /dev/null accel3d and accel2d attributes in the acceleration element. + +
address
+
+ The optional address sub-element can be used to + tie the video device to a particular PCI slot. +

Consoles, serial, parallel & channel devices

@@ -1409,6 +1493,14 @@ qemu-kvm -net nic,model=? /dev/null configured by the source element.

+

+ Each character device element has an optional + sub-element <address> which can tie the + device to a + particular controller or PCI + slot. +

+
Guest interface

@@ -1528,9 +1620,11 @@ qemu-kvm -net nic,model=? /dev/null

virtio
Paravirtualized virtio channel. Channel is exposed in the guest under - /dev/vport*, and if the optional elementname is specified, + /dev/vport*, and if the optional element name is specified, /dev/virtio-ports/$name (for more info, please see - http://fedoraproject.org/wiki/Features/VirtioSerial) + http://fedoraproject.org/wiki/Features/VirtioSerial). The + optional element address can tie the channel to a + particular type='virtio-serial' controller. Since 0.7.7
@@ -1787,6 +1881,12 @@ qemu-kvm -net nic,model=? /dev/null +

+ Each sound element has an optional + sub-element <address> which can tie the + device to a particular PCI slot. +

+

Watchdog device