diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 11b3330cee..4e40aa1484 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -99,18 +99,18 @@

-  ...
-  <os>
-    <type>hvm</type>
-    <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader>
-    <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram>
-    <boot dev='hd'/>
-    <boot dev='cdrom'/>
-    <bootmenu enable='yes' timeout='3000'/>
-    <smbios mode='sysinfo'/>
-    <bios useserial='yes' rebootTimeout='0'/>
-  </os>
-  ...
+... +<os> + <type>hvm</type> + <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader> + <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram> + <boot dev='hd'/> + <boot dev='cdrom'/> + <bootmenu enable='yes' timeout='3000'/> + <smbios mode='sysinfo'/> + <bios useserial='yes' rebootTimeout='0'/> +</os> +...
type
@@ -242,10 +242,10 @@

-  ...
-  <bootloader>/usr/bin/pygrub</bootloader>
-  <bootloader_args>--append single</bootloader_args>
-  ...
+... +<bootloader>/usr/bin/pygrub</bootloader> +<bootloader_args>--append single</bootloader_args> +...
bootloader
@@ -272,19 +272,19 @@

-  ...
-  <os>
-    <type>hvm</type>
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
-    <kernel>/root/f8-i386-vmlinuz</kernel>
-    <initrd>/root/f8-i386-initrd</initrd>
-    <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
-    <dtb>/root/ppc.dtb</dtb>
-    <acpi>
-      <table type='slic'>/path/to/slic.dat</table>
-    </acpi>
-  </os>
-  ...
+... +<os> + <type>hvm</type> + <loader>/usr/lib/xen/boot/hvmloader</loader> + <kernel>/root/f8-i386-vmlinuz</kernel> + <initrd>/root/f8-i386-initrd</initrd> + <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline> + <dtb>/root/ppc.dtb</dtb> + <acpi> + <table type='slic'>/path/to/slic.dat</table> + </acpi> +</os> +...
type
@@ -328,12 +328,12 @@

-  <os>
-    <type arch='x86_64'>exe</type>
-    <init>/bin/systemd</init>
-    <initarg>--unit</initarg>
-    <initarg>emergency.service</initarg>
-  </os>
+<os>
+  <type arch='x86_64'>exe</type>
+  <init>/bin/systemd</init>
+  <initarg>--unit</initarg>
+  <initarg>emergency.service</initarg>
+</os>
     
@@ -353,10 +353,10 @@
-  <idmap>
-    <uid start='0' target='1000' count='10'/>
-    <gid start='0' target='1000' count='10'/>
-  </idmap>
+<idmap>
+  <uid start='0' target='1000' count='10'/>
+  <gid start='0' target='1000' count='10'/>
+</idmap>
     
@@ -372,28 +372,28 @@

+...
+<os>
+  <smbios mode='sysinfo'/>
   ...
-  <os>
-    <smbios mode='sysinfo'/>
-    ...
-  </os>
-  <sysinfo type='smbios'>
-    <bios>
-      <entry name='vendor'>LENOVO</entry>
-    </bios>
-    <system>
-      <entry name='manufacturer'>Fedora</entry>
-      <entry name='product'>Virt-Manager</entry>
-      <entry name='version'>0.9.4</entry>
-    </system>
-    <baseBoard>
-      <entry name='manufacturer'>LENOVO</entry>
-      <entry name='product'>20BE0061MC</entry>
-      <entry name='version'>0B98401 Pro</entry>
-      <entry name='serial'>W1KS427111E</entry>
-    </baseBoard>
-  </sysinfo>
-  ...
+</os> +<sysinfo type='smbios'> + <bios> + <entry name='vendor'>LENOVO</entry> + </bios> + <system> + <entry name='manufacturer'>Fedora</entry> + <entry name='product'>Virt-Manager</entry> + <entry name='version'>0.9.4</entry> + </system> + <baseBoard> + <entry name='manufacturer'>LENOVO</entry> + <entry name='product'>20BE0061MC</entry> + <entry name='version'>0B98401 Pro</entry> + <entry name='serial'>W1KS427111E</entry> + </baseBoard> +</sysinfo> +...

The sysinfo element has a mandatory @@ -1149,11 +1149,11 @@ by default.

-  ...
-  <resource>
-    <partition>/virtualmachines/production</partition>
-  </resource>
-  ...
+...
+<resource>
+  <partition>/virtualmachines/production</partition>
+</resource>
+...
 

@@ -1171,26 +1171,26 @@

-  ...
-  <cpu match='exact'>
-    <model fallback='allow'>core2duo</model>
-    <vendor>Intel</vendor>
-    <topology sockets='1' cores='2' threads='1'/>
-    <feature policy='disable' name='lahf_lm'/>
-  </cpu>
-  ...
+... +<cpu match='exact'> + <model fallback='allow'>core2duo</model> + <vendor>Intel</vendor> + <topology sockets='1' cores='2' threads='1'/> + <feature policy='disable' name='lahf_lm'/> +</cpu> +...
-  <cpu mode='host-model'>
-    <model fallback='forbid'/>
-    <topology sockets='1' cores='2' threads='1'/>
-  </cpu>
-  ...
+<cpu mode='host-model'> + <model fallback='forbid'/> + <topology sockets='1' cores='2' threads='1'/> +</cpu> +...
-  <cpu mode='host-passthrough'>
-    <feature policy='disable' name='lahf_lm'/>
-  ...
+<cpu mode='host-passthrough'> + <feature policy='disable' name='lahf_lm'/> +...

In case no restrictions need to be put on CPU model and its features, a @@ -1199,11 +1199,11 @@

-  ...
-  <cpu>
-    <topology sockets='1' cores='2' threads='1'/>
-  </cpu>
-  ...
+... +<cpu> + <topology sockets='1' cores='2' threads='1'/> +</cpu> +...
cpu
@@ -1281,10 +1281,10 @@ When a user needs a power7 VM to run in compatibility mode on a Power8 host, this can be described in XML as follows :
-  <cpu mode='host-model'>
-    <model>power7</model>
-  </cpu>
-  ...
+<cpu mode='host-model'> + <model>power7</model> +</cpu> +...
host-passthrough
With this mode, the CPU visible to the guest should be exactly @@ -1374,16 +1374,16 @@

+...
+<cpu>
   ...
-  <cpu>
-    ...
-    <numa>
-      <cell id='0' cpus='0-3' memory='512000' unit='KiB'/>
-      <cell id='1' cpus='4-7' memory='512000' unit='KiB' memAccess='shared'/>
-    </numa>
-    ...
-  </cpu>
-  ...
+ <numa> + <cell id='0' cpus='0-3' memory='512000' unit='KiB'/> + <cell id='1' cpus='4-7' memory='512000' unit='KiB' memAccess='shared'/> + </numa> + ... +</cpu> +...

Each cell element specifies a NUMA cell or a NUMA node. @@ -1431,12 +1431,12 @@

-  ...
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <on_lockfailure>poweroff</on_lockfailure>
-  ...
+... +<on_poweroff>destroy</on_poweroff> +<on_reboot>restart</on_reboot> +<on_crash>restart</on_crash> +<on_lockfailure>poweroff</on_lockfailure> +...

The following collections of elements allow the actions to be @@ -1530,12 +1530,12 @@

-  ...
-  <pm>
-    <suspend-to-disk enabled='no'/>
-    <suspend-to-mem enabled='yes'/>
-  </pm>
-  ...
+... +<pm> + <suspend-to-disk enabled='no'/> + <suspend-to-mem enabled='yes'/> +</pm> +...
pm
@@ -1553,31 +1553,31 @@

-  ...
-  <features>
-    <pae/>
-    <acpi/>
-    <apic/>
-    <hap/>
-    <privnet/>
-    <hyperv>
-      <relaxed state='on'/>
-      <vapic state='on'/>
-      <spinlocks state='on' retries='4096'/>
-      <vpindex state='on'/>
-      <runtime state='on'/>
-      <synic state='on'/>
-      <reset state='on'/>
-      <vendor_id state='on' value='KVM Hv'/>
-    </hyperv>
-    <kvm>
-      <hidden state='on'/>
-    </kvm>
-    <pvspinlock state='on'/>
-    <gic version='2'/>
+...
+<features>
+  <pae/>
+  <acpi/>
+  <apic/>
+  <hap/>
+  <privnet/>
+  <hyperv>
+    <relaxed state='on'/>
+    <vapic state='on'/>
+    <spinlocks state='on' retries='4096'/>
+    <vpindex state='on'/>
+    <runtime state='on'/>
+    <synic state='on'/>
+    <reset state='on'/>
+    <vendor_id state='on' value='KVM Hv'/>
+  </hyperv>
+  <kvm>
+    <hidden state='on'/>
+  </kvm>
+  <pvspinlock state='on'/>
+  <gic version='2'/>
 
-  </features>
-  ...
+</features> +...

All features are listed within the features @@ -1748,14 +1748,14 @@

-  ...
-  <clock offset='localtime'>
-    <timer name='rtc' tickpolicy='catchup' track='guest'>
-      <catchup threshold='123' slew='120' limit='10000'/>
-    </timer>
-    <timer name='pit' tickpolicy='delay'/>
-  </clock>
-  ...
+... +<clock offset='localtime'> + <timer name='rtc' tickpolicy='catchup' track='guest'> + <catchup threshold='123' slew='120' limit='10000'/> + </timer> + <timer name='pit' tickpolicy='delay'/> +</clock> +...
clock
@@ -1918,17 +1918,17 @@

-  ...
-  <perf>
-    <event name='cmt' enabled='yes'/>
-    <event name='mbmt' enabled='no'/>
-    <event name='mbml' enabled='yes'/>
-    <event name='cpu_cycles' enabled='no'/>
-    <event name='instructions' enabled='yes'/>
-    <event name='cache_references' enabled='no'/>
-    <event name='cache_misses' enabled='no'/>
-  </perf>
-  ...
+...
+<perf>
+  <event name='cmt' enabled='yes'/>
+  <event name='mbmt' enabled='no'/>
+  <event name='mbml' enabled='yes'/>
+  <event name='cpu_cycles' enabled='no'/>
+  <event name='instructions' enabled='yes'/>
+  <event name='cache_references' enabled='no'/>
+  <event name='cache_misses' enabled='no'/>
+</perf>
+...
 
@@ -1984,11 +1984,11 @@

-  ...
-  <devices>
-    <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-  </devices>
-  ...
+... +<devices> + <emulator>/usr/lib/xen/bin/qemu-dm</emulator> +</devices> +...
emulator
@@ -2010,166 +2010,166 @@

-  ...
-  <devices>
-    <disk type='file' snapshot='external'>
-      <driver name="tap" type="aio" cache="default"/>
-      <source file='/var/lib/xen/images/fv0' startupPolicy='optional'>
-        <seclabel relabel='no'/>
-      </source>
-      <target dev='hda' bus='ide'/>
-      <iotune>
-        <total_bytes_sec>10000000</total_bytes_sec>
-        <read_iops_sec>400000</read_iops_sec>
-        <write_iops_sec>100000</write_iops_sec>
-      </iotune>
-      <boot order='2'/>
-      <encryption type='...'>
-        ...
-      </encryption>
-      <shareable/>
-      <serial>
-        ...
-      </serial>
-    </disk>
+...
+<devices>
+  <disk type='file' snapshot='external'>
+    <driver name="tap" type="aio" cache="default"/>
+    <source file='/var/lib/xen/images/fv0' startupPolicy='optional'>
+      <seclabel relabel='no'/>
+    </source>
+    <target dev='hda' bus='ide'/>
+    <iotune>
+      <total_bytes_sec>10000000</total_bytes_sec>
+      <read_iops_sec>400000</read_iops_sec>
+      <write_iops_sec>100000</write_iops_sec>
+    </iotune>
+    <boot order='2'/>
+    <encryption type='...'>
       ...
-    <disk type='network'>
-      <driver name="qemu" type="raw" io="threads" ioeventfd="on" event_idx="off"/>
-      <source protocol="sheepdog" name="image_name">
-        <host name="hostname" port="7000"/>
-      </source>
-      <target dev="hdb" bus="ide"/>
-      <boot order='1'/>
-      <transient/>
-      <address type='drive' controller='0' bus='1' unit='0'/>
-    </disk>
-    <disk type='network'>
-      <driver name="qemu" type="raw"/>
-      <source protocol="rbd" name="image_name2">
-        <host name="hostname" port="7000"/>
-        <snapshot name="snapname"/>
-        <config file="/path/to/file"/>
-      </source>
-      <target dev="hdc" bus="ide"/>
-      <auth username='myuser'>
-        <secret type='ceph' usage='mypassid'/>
-      </auth>
-    </disk>
-    <disk type='block' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <target dev='hdd' bus='ide' tray='open'/>
-      <readonly/>
-    </disk>
-    <disk type='network' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source protocol="http" name="url_path">
-        <host name="hostname" port="80"/>
-      </source>
-      <target dev='hde' bus='ide' tray='open'/>
-      <readonly/>
-    </disk>
-    <disk type='network' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source protocol="https" name="url_path">
-        <host name="hostname" port="443"/>
-      </source>
-      <target dev='hdf' bus='ide' tray='open'/>
-      <readonly/>
-    </disk>
-    <disk type='network' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source protocol="ftp" name="url_path">
-        <host name="hostname" port="21"/>
-      </source>
-      <target dev='hdg' bus='ide' tray='open'/>
-      <readonly/>
-    </disk>
-    <disk type='network' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source protocol="ftps" name="url_path">
-        <host name="hostname" port="990"/>
-      </source>
-      <target dev='hdh' bus='ide' tray='open'/>
-      <readonly/>
-    </disk>
-    <disk type='network' device='cdrom'>
-      <driver name='qemu' type='raw'/>
-      <source protocol="tftp" name="url_path">
-        <host name="hostname" port="69"/>
-      </source>
-      <target dev='hdi' bus='ide' tray='open'/>
-      <readonly/>
-    </disk>
-    <disk type='block' device='lun'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/sda'/>
-      <target dev='sda' bus='scsi'/>
-      <address type='drive' controller='0' bus='0' target='3' unit='0'/>
-    </disk>
-    <disk type='block' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source dev='/dev/sda'/>
-      <geometry cyls='16383' heads='16' secs='63' trans='lba'/>
-      <blockio logical_block_size='512' physical_block_size='4096'/>
-      <target dev='hdj' bus='ide'/>
-    </disk>
-    <disk type='volume' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source pool='blk-pool0' volume='blk-pool0-vol0'/>
-      <target dev='hdk' bus='ide'/>
-    </disk>
-    <disk type='network' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/2'>
-        <host name='example.com' port='3260'/>
-      </source>
-      <auth username='myuser'>
-        <secret type='iscsi' usage='libvirtiscsi'/>
-      </auth>
-      <target dev='vda' bus='virtio'/>
-    </disk>
-    <disk type='network' device='lun'>
-      <driver name='qemu' type='raw'/>
-      <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/1'>
-        <host name='example.com' port='3260'/>
-      </source>
-      <auth username='myuser'>
-        <secret type='iscsi' usage='libvirtiscsi'/>
-      </auth>
-      <target dev='sdb' bus='scsi'/>
-    </disk>
-    <disk type='volume' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source pool='iscsi-pool' volume='unit:0:0:1' mode='host'/>
-      <auth username='myuser'>
-        <secret type='iscsi' usage='libvirtiscsi'/>
-      </auth>
-      <target dev='vdb' bus='virtio'/>
-    </disk>
-    <disk type='volume' device='disk'>
-      <driver name='qemu' type='raw'/>
-      <source pool='iscsi-pool' volume='unit:0:0:2' mode='direct'/>
-      <auth username='myuser'>
-        <secret type='iscsi' usage='libvirtiscsi'/>
-      </auth>
-      <target dev='vdc' bus='virtio'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='qcow2'/>
-      <source file='/var/lib/libvirt/images/domain.qcow'/>
-      <backingStore type='file'>
-        <format type='qcow2'/>
-        <source file='/var/lib/libvirt/images/snapshot.qcow'/>
-        <backingStore type='block'>
-          <format type='raw'/>
-          <source dev='/dev/mapper/base'/>
-          <backingStore/>
-        </backingStore>
+    </encryption>
+    <shareable/>
+    <serial>
+      ...
+    </serial>
+  </disk>
+    ...
+  <disk type='network'>
+    <driver name="qemu" type="raw" io="threads" ioeventfd="on" event_idx="off"/>
+    <source protocol="sheepdog" name="image_name">
+      <host name="hostname" port="7000"/>
+    </source>
+    <target dev="hdb" bus="ide"/>
+    <boot order='1'/>
+    <transient/>
+    <address type='drive' controller='0' bus='1' unit='0'/>
+  </disk>
+  <disk type='network'>
+    <driver name="qemu" type="raw"/>
+    <source protocol="rbd" name="image_name2">
+      <host name="hostname" port="7000"/>
+      <snapshot name="snapname"/>
+      <config file="/path/to/file"/>
+    </source>
+    <target dev="hdc" bus="ide"/>
+    <auth username='myuser'>
+      <secret type='ceph' usage='mypassid'/>
+    </auth>
+  </disk>
+  <disk type='block' device='cdrom'>
+    <driver name='qemu' type='raw'/>
+    <target dev='hdd' bus='ide' tray='open'/>
+    <readonly/>
+  </disk>
+  <disk type='network' device='cdrom'>
+    <driver name='qemu' type='raw'/>
+    <source protocol="http" name="url_path">
+      <host name="hostname" port="80"/>
+    </source>
+    <target dev='hde' bus='ide' tray='open'/>
+    <readonly/>
+  </disk>
+  <disk type='network' device='cdrom'>
+    <driver name='qemu' type='raw'/>
+    <source protocol="https" name="url_path">
+      <host name="hostname" port="443"/>
+    </source>
+    <target dev='hdf' bus='ide' tray='open'/>
+    <readonly/>
+  </disk>
+  <disk type='network' device='cdrom'>
+    <driver name='qemu' type='raw'/>
+    <source protocol="ftp" name="url_path">
+      <host name="hostname" port="21"/>
+    </source>
+    <target dev='hdg' bus='ide' tray='open'/>
+    <readonly/>
+  </disk>
+  <disk type='network' device='cdrom'>
+    <driver name='qemu' type='raw'/>
+    <source protocol="ftps" name="url_path">
+      <host name="hostname" port="990"/>
+    </source>
+    <target dev='hdh' bus='ide' tray='open'/>
+    <readonly/>
+  </disk>
+  <disk type='network' device='cdrom'>
+    <driver name='qemu' type='raw'/>
+    <source protocol="tftp" name="url_path">
+      <host name="hostname" port="69"/>
+    </source>
+    <target dev='hdi' bus='ide' tray='open'/>
+    <readonly/>
+  </disk>
+  <disk type='block' device='lun'>
+    <driver name='qemu' type='raw'/>
+    <source dev='/dev/sda'/>
+    <target dev='sda' bus='scsi'/>
+    <address type='drive' controller='0' bus='0' target='3' unit='0'/>
+  </disk>
+  <disk type='block' device='disk'>
+    <driver name='qemu' type='raw'/>
+    <source dev='/dev/sda'/>
+    <geometry cyls='16383' heads='16' secs='63' trans='lba'/>
+    <blockio logical_block_size='512' physical_block_size='4096'/>
+    <target dev='hdj' bus='ide'/>
+  </disk>
+  <disk type='volume' device='disk'>
+    <driver name='qemu' type='raw'/>
+    <source pool='blk-pool0' volume='blk-pool0-vol0'/>
+    <target dev='hdk' bus='ide'/>
+  </disk>
+  <disk type='network' device='disk'>
+    <driver name='qemu' type='raw'/>
+    <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/2'>
+      <host name='example.com' port='3260'/>
+    </source>
+    <auth username='myuser'>
+      <secret type='iscsi' usage='libvirtiscsi'/>
+    </auth>
+    <target dev='vda' bus='virtio'/>
+  </disk>
+  <disk type='network' device='lun'>
+    <driver name='qemu' type='raw'/>
+    <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/1'>
+      <host name='example.com' port='3260'/>
+    </source>
+    <auth username='myuser'>
+      <secret type='iscsi' usage='libvirtiscsi'/>
+    </auth>
+    <target dev='sdb' bus='scsi'/>
+  </disk>
+  <disk type='volume' device='disk'>
+    <driver name='qemu' type='raw'/>
+    <source pool='iscsi-pool' volume='unit:0:0:1' mode='host'/>
+    <auth username='myuser'>
+      <secret type='iscsi' usage='libvirtiscsi'/>
+    </auth>
+    <target dev='vdb' bus='virtio'/>
+  </disk>
+  <disk type='volume' device='disk'>
+    <driver name='qemu' type='raw'/>
+    <source pool='iscsi-pool' volume='unit:0:0:2' mode='direct'/>
+    <auth username='myuser'>
+      <secret type='iscsi' usage='libvirtiscsi'/>
+    </auth>
+    <target dev='vdc' bus='virtio'/>
+  </disk>
+  <disk type='file' device='disk'>
+    <driver name='qemu' type='qcow2'/>
+    <source file='/var/lib/libvirt/images/domain.qcow'/>
+    <backingStore type='file'>
+      <format type='qcow2'/>
+      <source file='/var/lib/libvirt/images/snapshot.qcow'/>
+      <backingStore type='block'>
+        <format type='raw'/>
+        <source dev='/dev/mapper/base'/>
+        <backingStore/>
       </backingStore>
-      <target dev='vdd' bus='virtio'/>
-    </disk>
-  </devices>
-  ...
+ </backingStore> + <target dev='vdd' bus='virtio'/> + </disk> +</devices> +...
disk
@@ -2929,28 +2929,28 @@

+...
+<devices>
+  <filesystem type='template'>
+    <source name='my-vm-template'/>
+    <target dir='/'/>
+  </filesystem>
+  <filesystem type='mount' accessmode='passthrough'>
+    <driver type='path' wrpolicy='immediate'/>
+    <source dir='/export/to/guest'/>
+    <target dir='/import/from/host'/>
+    <readonly/>
+  </filesystem>
+  <filesystem type='file' accessmode='passthrough'>
+    <driver name='loop' type='raw'/>
+    <driver type='path' wrpolicy='immediate'/>
+    <source file='/export/to/guest.img'/>
+    <target dir='/import/from/host'/>
+    <readonly/>
+  </filesystem>
   ...
-  <devices>
-    <filesystem type='template'>
-      <source name='my-vm-template'/>
-      <target dir='/'/>
-    </filesystem>
-    <filesystem type='mount' accessmode='passthrough'>
-      <driver type='path' wrpolicy='immediate'/>
-      <source dir='/export/to/guest'/>
-      <target dir='/import/from/host'/>
-      <readonly/>
-    </filesystem>
-    <filesystem type='file' accessmode='passthrough'>
-      <driver name='loop' type='raw'/>
-      <driver type='path' wrpolicy='immediate'/>
-      <source file='/export/to/guest.img'/>
-      <target dir='/import/from/host'/>
-      <readonly/>
-    </filesystem>
-    ...
-  </devices>
-  ...
+</devices> +...
filesystem
@@ -3221,20 +3221,20 @@

+...
+<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>
+  <controller type='scsi' index='0' model='virtio-scsi'>
+    <driver iothread='4'/>
+    <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+  </controller>
   ...
-  <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>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <driver iothread='4'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
-    </controller>
-    ...
-  </devices>
-  ...
+</devices> +...

Each controller has a mandatory attribute type, @@ -3356,18 +3356,18 @@

+...
+<devices>
+  <controller type='usb' index='0' model='ich9-ehci1'>
+    <address type='pci' domain='0' bus='0' slot='4' function='7'/>
+  </controller>
+  <controller type='usb' index='0' model='ich9-uhci1'>
+    <master startport='0'/>
+    <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/>
+  </controller>
   ...
-  <devices>
-    <controller type='usb' index='0' model='ich9-ehci1'>
-      <address type='pci' domain='0' bus='0' slot='4' function='7'/>
-    </controller>
-    <controller type='usb' index='0' model='ich9-uhci1'>
-      <master startport='0'/>
-      <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/>
-    </controller>
-    ...
-  </devices>
-  ...
+</devices> +...

PCI controllers have an optional model attribute with @@ -3507,14 +3507,14 @@ configuration.

-  ...
-  <devices>
-    <controller type='pci' index='0' model='pci-root'/>
-    <controller type='pci' index='1' model='pci-bridge'>
-      <address type='pci' domain='0' bus='0' slot='5' function='0' multifunction='off'/>
-    </controller>
-  </devices>
-  ...
+... +<devices> + <controller type='pci' index='0' model='pci-root'/> + <controller type='pci' index='1' model='pci-bridge'> + <address type='pci' domain='0' bus='0' slot='5' function='0' multifunction='off'/> + </controller> +</devices> +...

For machine types which provide an implicit PCI Express (PCIe) @@ -3569,17 +3569,17 @@ 1.2.19)

-  ...
-  <devices>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
-      <address type='pci' domain='0' bus='0' slot='0xe' function='0'/>
-    </controller>
-    <controller type='pci' index='2' model='pci-bridge'>
-      <address type='pci' domain='0' bus='1' slot='1' function='0'/>
-    </controller>
-  </devices>
-  ...
+... +<devices> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='pci' index='1' model='dmi-to-pci-bridge'> + <address type='pci' domain='0' bus='0' slot='0xe' function='0'/> + </controller> + <controller type='pci' index='2' model='pci-bridge'> + <address type='pci' domain='0' bus='1' slot='1' function='0'/> + </controller> +</devices> +...

Device leases

@@ -3590,17 +3590,17 @@

+...
+<devices>
   ...
-  <devices>
-    ...
-    <lease>
-      <lockspace>somearea</lockspace>
-      <key>somekey</key>
-      <target path='/some/lease/path' offset='1024'/>
-    </lease>
-    ...
-  </devices>
-  ...
+ <lease> + <lockspace>somearea</lockspace> + <key>somekey</key> + <target path='/some/lease/path' offset='1024'/> + </lease> + ... +</devices> +...
lockspace
@@ -3633,66 +3633,66 @@

-  ...
-  <devices>
-    <hostdev mode='subsystem' type='usb'>
-      <source startupPolicy='optional'>
-        <vendor id='0x1234'/>
-        <product id='0xbeef'/>
-      </source>
-      <boot order='2'/>
-    </hostdev>
-  </devices>
-  ...
+... +<devices> + <hostdev mode='subsystem' type='usb'> + <source startupPolicy='optional'> + <vendor id='0x1234'/> + <product id='0xbeef'/> + </source> + <boot order='2'/> + </hostdev> +</devices> +...

or:

-  ...
-  <devices>
-    <hostdev mode='subsystem' type='pci' managed='yes'>
-      <source>
-        <address domain='0x0000' bus='0x06' slot='0x02' function='0x0'/>
-      </source>
-      <boot order='1'/>
-      <rom bar='on' file='/etc/fake/boot.bin'/>
-    </hostdev>
-  </devices>
-  ...
+... +<devices> + <hostdev mode='subsystem' type='pci' managed='yes'> + <source> + <address domain='0x0000' bus='0x06' slot='0x02' function='0x0'/> + </source> + <boot order='1'/> + <rom bar='on' file='/etc/fake/boot.bin'/> + </hostdev> +</devices> +...

or:

-  ...
-  <devices>
-    <hostdev mode='subsystem' type='scsi' sgio='filtered' rawio='yes'>
-      <source>
-        <adapter name='scsi_host0'/>
-        <address bus='0' target='0' unit='0'/>
-      </source>
-      <readonly/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </hostdev>
-  </devices>
-  ...
+... +<devices> + <hostdev mode='subsystem' type='scsi' sgio='filtered' rawio='yes'> + <source> + <adapter name='scsi_host0'/> + <address bus='0' target='0' unit='0'/> + </source> + <readonly/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </hostdev> +</devices> +...

or:

-  ...
-  <devices>
-    <hostdev mode='subsystem' type='scsi'>
-      <source protocol='iscsi' name='iqn.2014-08.com.example:iscsi-nopool/1'>
-        <host name='example.com' port='3260'/>
-        <auth username='myuser'>
-          <secret type='iscsi' usage='libvirtiscsi'/>
-        </auth>
-      </source>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </hostdev>
-  </devices>
-  ...
+... +<devices> + <hostdev mode='subsystem' type='scsi'> + <source protocol='iscsi' name='iqn.2014-08.com.example:iscsi-nopool/1'> + <host name='example.com' port='3260'/> + <auth username='myuser'> + <secret type='iscsi' usage='libvirtiscsi'/> + </auth> + </source> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </hostdev> +</devices> +...
hostdev
@@ -3942,18 +3942,18 @@

-  ...
-  <devices>
-    <redirdev bus='usb' type='tcp'>
-      <source mode='connect' host='localhost' service='4000'/>
-      <boot order='1'/>
-    </redirdev>
-    <redirfilter>
-      <usbdev class='0x08' vendor='0x1234' product='0xbeef' version='2.56' allow='yes'/>
-      <usbdev allow='no'/>
-    </redirfilter>
-  </devices>
-  ...
+... +<devices> + <redirdev bus='usb' type='tcp'> + <source mode='connect' host='localhost' service='4000'/> + <boot order='1'/> + </redirdev> + <redirfilter> + <usbdev class='0x08' vendor='0x1234' product='0xbeef' version='2.56' allow='yes'/> + <usbdev allow='no'/> + </redirfilter> +</devices> +...
redirdev
@@ -4016,23 +4016,23 @@

-  ...
-  <devices>
-    <smartcard mode='host'/>
-    <smartcard mode='host-certificates'>
-      <certificate>cert1</certificate>
-      <certificate>cert2</certificate>
-      <certificate>cert3</certificate>
-      <database>/etc/pki/nssdb/</database>
-    </smartcard>
-    <smartcard mode='passthrough' type='tcp'>
-      <source mode='bind' host='127.0.0.1' service='2001'/>
-      <protocol type='raw'/>
-      <address type='ccid' controller='0' slot='0'/>
-    </smartcard>
-    <smartcard mode='passthrough' type='spicevmc'/>
-  </devices>
-  ...
+...
+<devices>
+  <smartcard mode='host'/>
+  <smartcard mode='host-certificates'>
+    <certificate>cert1</certificate>
+    <certificate>cert2</certificate>
+    <certificate>cert3</certificate>
+    <database>/etc/pki/nssdb/</database>
+  </smartcard>
+  <smartcard mode='passthrough' type='tcp'>
+    <source mode='bind' host='127.0.0.1' service='2001'/>
+    <protocol type='raw'/>
+    <address type='ccid' controller='0' slot='0'/>
+  </smartcard>
+  <smartcard mode='passthrough' type='spicevmc'/>
+</devices>
+...
 

@@ -4096,16 +4096,16 @@

Network interfaces

-  ...
-  <devices>
-    <interface type='direct' trustGuestRxFilters='yes'>
-      <source dev='eth0'/>
-      <mac address='52:54:00:5d:c7:9e'/>
-      <boot order='1'/>
-      <rom bar='off'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='direct' trustGuestRxFilters='yes'> + <source dev='eth0'/> + <mac address='52:54:00:5d:c7:9e'/> + <boot order='1'/> + <rom bar='off'/> + </interface> +</devices> +...

There are several possibilities for specifying a network @@ -4221,23 +4221,23 @@

+...
+<devices>
+  <interface type='network'>
+    <source network='default'/>
+  </interface>
   ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-    </interface>
-    ...
-    <interface type='network'>
-      <source network='default' portgroup='engineering'/>
-      <target dev='vnet7'/>
-      <mac address="00:11:22:33:44:55"/>
-      <virtualport>
-        <parameters instanceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
-      </virtualport>
+  <interface type='network'>
+    <source network='default' portgroup='engineering'/>
+    <target dev='vnet7'/>
+    <mac address="00:11:22:33:44:55"/>
+    <virtualport>
+      <parameters instanceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
+    </virtualport>
 
-    </interface>
-  </devices>
-  ...
+ </interface> +</devices> +...
Bridge to LAN
@@ -4275,26 +4275,26 @@ the interfaces "port-profile".

+...
+<devices>
   ...
-  <devices>
-    ...
-    <interface type='bridge'>
-      <source bridge='br0'/>
-    </interface>
-    <interface type='bridge'>
-      <source bridge='br1'/>
-      <target dev='vnet7'/>
-      <mac address="00:11:22:33:44:55"/>
-    </interface>
-    <interface type='bridge'>
-      <source bridge='ovsbr'/>
-      <virtualport type='openvswitch'>
-        <parameters profileid='menial' interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
-      </virtualport>
-    </interface>
-    ...
-  </devices>
-  ...
+ <interface type='bridge'> + <source bridge='br0'/> + </interface> + <interface type='bridge'> + <source bridge='br1'/> + <target dev='vnet7'/> + <mac address="00:11:22:33:44:55"/> + </interface> + <interface type='bridge'> + <source bridge='ovsbr'/> + <virtualport type='openvswitch'> + <parameters profileid='menial' interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/> + </virtualport> + </interface> + ... +</devices> +...

On hosts that support Open vSwitch on the kernel side and have the @@ -4309,26 +4309,26 @@ to the interface.

+...
+<devices>
   ...
-  <devices>
-    ...
-    <interface type='bridge'>
-      <source bridge='br0'/>
-    </interface>
-    <interface type='bridge'>
-      <source bridge='br1'/>
-      <target dev='vnet7'/>
-      <mac address="00:11:22:33:44:55"/>
-    </interface>
-    <interface type='bridge'>
-      <source bridge='midonet'/>
-      <virtualport type='midonet'>
-        <parameters interfaceid='0b2d64da-3d0e-431e-afdd-804415d6ebbb'/>
-      </virtualport>
-    </interface>
-    ...
-  </devices>
-  ...
+ <interface type='bridge'> + <source bridge='br0'/> + </interface> + <interface type='bridge'> + <source bridge='br1'/> + <target dev='vnet7'/> + <mac address="00:11:22:33:44:55"/> + </interface> + <interface type='bridge'> + <source bridge='midonet'/> + <virtualport type='midonet'> + <parameters interfaceid='0b2d64da-3d0e-431e-afdd-804415d6ebbb'/> + </virtualport> + </interface> + ... +</devices> +...
Userspace SLIRP stack
@@ -4342,15 +4342,15 @@

+...
+<devices>
+  <interface type='user'/>
   ...
-  <devices>
-    <interface type='user'/>
-    ...
-    <interface type='user'>
-      <mac address="00:11:22:33:44:55"/>
-    </interface>
-  </devices>
-  ...
+ <interface type='user'> + <mac address="00:11:22:33:44:55"/> + </interface> +</devices> +...
Generic ethernet connection
@@ -4366,16 +4366,16 @@

+...
+<devices>
+  <interface type='ethernet'/>
   ...
-  <devices>
-    <interface type='ethernet'/>
-    ...
-    <interface type='ethernet'>
-      <target dev='vnet7'/>
-      <script path='/etc/qemu-ifup-mynet'/>
-    </interface>
-  </devices>
-  ...
+ <interface type='ethernet'> + <target dev='vnet7'/> + <script path='/etc/qemu-ifup-mynet'/> + </interface> +</devices> +...
Direct attachment to physical interface
@@ -4433,14 +4433,14 @@
+...
+<devices>
   ...
-  <devices>
-    ...
-    <interface type='direct' trustGuestRxFilters='no'>
-      <source dev='eth0' mode='vepa'/>
-    </interface>
-  </devices>
-  ...
+ <interface type='direct' trustGuestRxFilters='no'> + <source dev='eth0' mode='vepa'/> + </interface> +</devices> +...

The network access of direct attached virtual machines can be @@ -4481,17 +4481,17 @@

+...
+<devices>
   ...
-  <devices>
-    ...
-    <interface type='direct'>
-      <source dev='eth0.2' mode='vepa'/>
-      <virtualport type="802.1Qbg">
-        <parameters managerid="11" typeid="1193047" typeidversion="2" instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
-      </virtualport>
-    </interface>
-  </devices>
-  ...
+ <interface type='direct'> + <source dev='eth0.2' mode='vepa'/> + <virtualport type="802.1Qbg"> + <parameters managerid="11" typeid="1193047" typeidversion="2" instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/> + </virtualport> + </interface> +</devices> +...

The interface can have additional parameters as shown below @@ -4508,18 +4508,18 @@

+...
+<devices>
   ...
-  <devices>
-    ...
-    <interface type='direct'>
-      <source dev='eth0' mode='private'/>
-      <virtualport type='802.1Qbh'>
-        <parameters profileid='finance'/>
-      </virtualport>
-    </interface>
-  </devices>
-  ...
-  
+ <interface type='direct'> + <source dev='eth0' mode='private'/> + <virtualport type='802.1Qbh'> + <parameters profileid='finance'/> + </virtualport> + </interface> +</devices> +... +
PCI Passthrough
@@ -4579,20 +4579,20 @@

-  ...
-  <devices>
-    <interface type='hostdev' managed='yes'>
-      <driver name='vfio'/>
-      <source>
-        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
-      </source>
-      <mac address='52:54:00:6d:90:02'/>
-      <virtualport type='802.1Qbh'>
-        <parameters profileid='finance'/>
-      </virtualport>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='hostdev' managed='yes'> + <driver name='vfio'/> + <source> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </source> + <mac address='52:54:00:6d:90:02'/> + <virtualport type='802.1Qbh'> + <parameters profileid='finance'/> + </virtualport> + </interface> +</devices> +...
Multicast tunnel
@@ -4610,14 +4610,14 @@

-  ...
-  <devices>
-    <interface type='mcast'>
-      <mac address='52:54:00:6d:90:01'/>
-      <source address='230.0.0.1' port='5558'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='mcast'> + <mac address='52:54:00:6d:90:01'/> + <source address='230.0.0.1' port='5558'/> + </interface> +</devices> +...
TCP tunnel
@@ -4631,19 +4631,19 @@ to one of the first 4 network types and do the appropriate routing.

+...
+<devices>
+  <interface type='server'>
+    <mac address='52:54:00:22:c9:42'/>
+    <source address='192.168.0.1' port='5558'/>
+  </interface>
   ...
-  <devices>
-    <interface type='server'>
-      <mac address='52:54:00:22:c9:42'/>
-      <source address='192.168.0.1' port='5558'/>
-    </interface>
-    ...
-    <interface type='client'>
-      <mac address='52:54:00:8b:c9:51'/>
-      <source address='192.168.0.1' port='5558'/>
-    </interface>
-  </devices>
-  ...
+ <interface type='client'> + <mac address='52:54:00:8b:c9:51'/> + <source address='192.168.0.1' port='5558'/> + </interface> +</devices> +...
UDP unicast tunnel
@@ -4658,29 +4658,29 @@ Since 1.2.20

-  ...
-  <devices>
-    <interface type='udp'>
-      <mac address='52:54:00:22:c9:42'/>
-      <source address='127.0.0.1' port='11115'>
-        <local address='127.0.0.1' port='11116'/>
-      </source>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='udp'> + <mac address='52:54:00:22:c9:42'/> + <source address='127.0.0.1' port='11115'> + <local address='127.0.0.1' port='11116'/> + </source> + </interface> +</devices> +...
Setting the NIC model
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet1'/>
-      <model type='ne2k_pci'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + <model type='ne2k_pci'/> + </interface> +</devices> +...

For hypervisors which support this, you can set the model of @@ -4707,20 +4707,20 @@ qemu-kvm -net nic,model=? /dev/null

Setting NIC driver-specific options
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet1'/>
-      <model type='virtio'/>
-      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5' rx_queue_size='256'>
-        <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off' mrg_rxbuf='off'/>
-        <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/>
-      </driver>
-      
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + <model type='virtio'/> + <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5' rx_queue_size='256'> + <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off' mrg_rxbuf='off'/> + <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/> + </driver> + + </interface> +</devices> +...

Some NICs may have tunable driver-specific options. These are @@ -4876,17 +4876,17 @@ qemu-kvm -net nic,model=? /dev/null

Setting network backend-specific options
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet1'/>
-      <model type='virtio'/>
-      <backend tap='/dev/net/tun' vhost='/dev/vhost-net'/>
-      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + <model type='virtio'/> + <backend tap='/dev/net/tun' vhost='/dev/vhost-net'/> + <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/> + </interface> +</devices> +...

For tuning the backend of the network, the backend element @@ -4899,14 +4899,14 @@ qemu-kvm -net nic,model=? /dev/null

Overriding the target element
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet1'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + </interface> +</devices> +...

If no target is specified, certain hypervisors will @@ -4925,27 +4925,27 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <guest dev='myeth'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <guest dev='myeth'/> + </interface> +</devices> +...
Specifying boot order
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet1'/>
-      <boot order='1'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + <boot order='1'/> + </interface> +</devices> +...

For hypervisors which support this, you can set a specific NIC to @@ -4960,15 +4960,15 @@ qemu-kvm -net nic,model=? /dev/null

Interface ROM BIOS configuration
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet1'/>
-      <rom bar='on' file='/etc/fake/boot.bin'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + <rom bar='on' file='/etc/fake/boot.bin'/> + </interface> +</devices> +...

For hypervisors which support this, you can change how a PCI Network @@ -4988,16 +4988,16 @@ qemu-kvm -net nic,model=? /dev/null

Setting up a network backend in a driver domain
+...
+<devices>
   ...
-  <devices>
-    ...
-    <interface type='bridge'>
-      <source bridge='br0'/>
-      <backenddomain name='netvm'/>
-    </interface>
-    ...
-  </devices>
-  ...
+ <interface type='bridge'> + <source bridge='br0'/> + <backenddomain name='netvm'/> + </interface> + ... +</devices> +...

The optional backenddomain element allows specifying a @@ -5013,18 +5013,18 @@ qemu-kvm -net nic,model=? /dev/null

Quality of service
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet0'/>
-      <bandwidth>
-        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
-        <outbound average='128' peak='256' burst='256'/>
-      </bandwidth>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet0'/> + <bandwidth> + <inbound average='1000' peak='5000' floor='200' burst='1024'/> + <outbound average='128' peak='256' burst='256'/> + </bandwidth> + </interface> +</devices> +...

This part of interface XML provides setting quality of service. Incoming @@ -5037,26 +5037,26 @@ qemu-kvm -net nic,model=? /dev/null

Setting VLAN tag (on supported network types only)
-  ...
-  <devices>
-    <interface type='bridge'>
-      <vlan>
-        <tag id='42'/>
-      </vlan>
-      <source bridge='ovsbr0'/>
-      <virtualport type='openvswitch'>
-        <parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
-      </virtualport>
-    </interface>
-    <interface type='bridge'>
-      <vlan trunk='yes'>
-        <tag id='42'/>
-        <tag id='123' nativeMode='untagged'/>
-      </vlan>
-      ...
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='bridge'> + <vlan> + <tag id='42'/> + </vlan> + <source bridge='ovsbr0'/> + <virtualport type='openvswitch'> + <parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/> + </virtualport> + </interface> + <interface type='bridge'> + <vlan trunk='yes'> + <tag id='42'/> + <tag id='123' nativeMode='untagged'/> + </vlan> + ... + </interface> +</devices> +...

If (and only if) the network connection used by the guest @@ -5104,15 +5104,15 @@ qemu-kvm -net nic,model=? /dev/null

Modifying virtual link state
-  ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet0'/>
-      <link state='down'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet0'/> + <link state='down'/> + </interface> +</devices> +...

This element provides means of setting state of the virtual network link. @@ -5125,28 +5125,28 @@ qemu-kvm -net nic,model=? /dev/null

IP configuration
+...
+<devices>
+  <interface type='network'>
+    <source network='default'/>
+    <target dev='vnet0'/>
+    <ip address='192.168.122.5' prefix='24'/>
+    <ip address='192.168.122.5' prefix='24' peer='10.0.0.10'/>
+    <route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/>
+    <route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/>
+  </interface>
   ...
-  <devices>
-    <interface type='network'>
-      <source network='default'/>
-      <target dev='vnet0'/>
-      <ip address='192.168.122.5' prefix='24'/>
-      <ip address='192.168.122.5' prefix='24' peer='10.0.0.10'/>
-      <route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/>
-      <route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/>
-    </interface>
-    ...
-    <hostdev mode='capabilities' type='net'>
-      <source>
-        <interface>eth0</interface>
-      </source>
-      <ip address='192.168.122.6' prefix='24'/>
-      <route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/>
-      <route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/>
-    </hostdev>
+  <hostdev mode='capabilities' type='net'>
+    <source>
+      <interface>eth0</interface>
+    </source>
+    <ip address='192.168.122.6' prefix='24'/>
+    <route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/>
+    <route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/>
+  </hostdev>
 
-  </devices>
-  ...
+</devices>
+...
 

@@ -5177,19 +5177,19 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <interface type='ethernet'>
-      <source/>
-        <ip address='192.168.123.1' prefix='24'/>
-        <ip address='10.0.0.10' prefix='24' peer='192.168.122.5'/>
-        <route family='ipv4' address='192.168.42.0' prefix='24' gateway='192.168.123.4'/>
-      <source/>
-      ...
-    </interface>
+...
+<devices>
+  <interface type='ethernet'>
+    <source/>
+      <ip address='192.168.123.1' prefix='24'/>
+      <ip address='10.0.0.10' prefix='24' peer='192.168.122.5'/>
+      <route family='ipv4' address='192.168.42.0' prefix='24' gateway='192.168.123.4'/>
+    <source/>
     ...
-  </devices>
+  </interface>
   ...
+</devices>
+...
 

@@ -5212,21 +5212,21 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <interface type='vhostuser'>
-      <mac address='52:54:00:3b:83:1a'/>
-      <source type='unix' path='/tmp/vhost1.sock' mode='server'/>
-      <model type='virtio'/>
-    </interface>
-    <interface type='vhostuser'>
-      <mac address='52:54:00:3b:83:1b'/>
-      <source type='unix' path='/tmp/vhost2.sock' mode='client'/>
-      <model type='virtio'/>
-      <driver queues='5'/>
-    </interface>
-  </devices>
-  ...
+... +<devices> + <interface type='vhostuser'> + <mac address='52:54:00:3b:83:1a'/> + <source type='unix' path='/tmp/vhost1.sock' mode='server'/> + <model type='virtio'/> + </interface> + <interface type='vhostuser'> + <mac address='52:54:00:3b:83:1b'/> + <source type='unix' path='/tmp/vhost2.sock' mode='client'/> + <model type='virtio'/> + <driver queues='5'/> + </interface> +</devices> +...

The <source> element has to be specified @@ -5251,23 +5251,23 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <interface ...>
+...
+<devices>
+  <interface ...>
+    ...
+    <filterref filter='clean-traffic'/>
+  </interface>
+  <interface ...>
+    ...
+    <filterref filter='myfilter'>
+      <parameter name='IP' value='104.207.129.11'/>
+      <parameter name='IP6_ADDR' value='2001:19f0:300:2102::'/>
+      <parameter name='IP6_MASK' value='64'/>
       ...
-      <filterref filter='clean-traffic'/>
-    </interface>
-    <interface ...>
-      ...
-      <filterref filter='myfilter'>
-        <parameter name='IP' value='104.207.129.11'/>
-        <parameter name='IP6_ADDR' value='2001:19f0:300:2102::'/>
-        <parameter name='IP6_MASK' value='64'/>
-        ...
-      </filterref>
-    </interface>
-  </devices>
-  ...
+ </filterref> + </interface> +</devices> +...

The filter attribute specifies the name of the nwfilter @@ -5290,18 +5290,18 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <input type='mouse' bus='usb'/>
-    <input type='keyboard' bus='usb'/>
-    <input type='mouse' bus='virtio'/>
-    <input type='keyboard' bus='virtio'/>
-    <input type='tablet' bus='virtio'/>
-    <input type='passthrough' bus='virtio'>
-      <source evdev='/dev/input/event1/>
-    </input>
-  </devices>
-  ...
+... +<devices> + <input type='mouse' bus='usb'/> + <input type='keyboard' bus='usb'/> + <input type='mouse' bus='virtio'/> + <input type='keyboard' bus='virtio'/> + <input type='tablet' bus='virtio'/> + <input type='passthrough' bus='virtio'> + <source evdev='/dev/input/event1/> + </input> +</devices> +...
input
@@ -5336,11 +5336,11 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <hub type='usb'/>
-  </devices>
-  ...
+... +<devices> + <hub type='usb'/> +</devices> +...
hub
@@ -5366,19 +5366,19 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <graphics type='sdl' display=':0.0'/>
-    <graphics type='vnc' port='5904' sharePolicy='allow-exclusive'>
-      <listen type='address' address='1.2.3.4'/>
-    </graphics>
-    <graphics type='rdp' autoport='yes' multiUser='yes' />
-    <graphics type='desktop' fullscreen='yes'/>
-    <graphics type='spice'>
-      <listen type='network' network='rednet'/>
-    </graphics>
-  </devices>
-  ...
+... +<devices> + <graphics type='sdl' display=':0.0'/> + <graphics type='vnc' port='5904' sharePolicy='allow-exclusive'> + <listen type='address' address='1.2.3.4'/> + </graphics> + <graphics type='rdp' autoport='yes' multiUser='yes' /> + <graphics type='desktop' fullscreen='yes'/> + <graphics type='spice'> + <listen type='network' network='rednet'/> + </graphics> +</devices> +...
graphics
@@ -5488,16 +5488,16 @@ qemu-kvm -net nic,model=? /dev/null and usbredir (since 0.9.12).

-  <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'>
-    <channel name='main' mode='secure'/>
-    <channel name='record' mode='insecure'/>
-    <image compression='auto_glz'/>
-    <streaming mode='filter'/>
-    <clipboard copypaste='no'/>
-    <mouse mode='client'/>
-    <filetransfer enable='no'/>
-    <gl enable='yes'/>
-  </graphics>
+<graphics type='spice' port='-1' tlsPort='-1' autoport='yes'> + <channel name='main' mode='secure'/> + <channel name='record' mode='insecure'/> + <image compression='auto_glz'/> + <streaming mode='filter'/> + <clipboard copypaste='no'/> + <mouse mode='client'/> + <filetransfer enable='no'/> + <gl enable='yes'/> +</graphics>

Spice supports variable compression settings for audio, images and streaming. These settings are accessible via the compression @@ -5652,15 +5652,15 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <video>
-      <model type='vga' vram='16384' heads='1'>
-        <acceleration accel3d='yes' accel2d='yes'/>
-      </model>
-    </video>
-  </devices>
-  ...
+... +<devices> + <video> + <model type='vga' vram='16384' heads='1'> + <acceleration accel3d='yes' accel2d='yes'/> + </model> + </video> +</devices> +...
video
@@ -5750,32 +5750,32 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <parallel type='pty'>
-      <source path='/dev/pts/2'/>
-      <target port='0'/>
-    </parallel>
-    <serial type='pty'>
-      <source path='/dev/pts/3'/>
-      <target port='0'/>
-    </serial>
-    <serial type='file'>
-      <source path='/tmp/file' append='on'>
-        <seclabel model='dac' relabel='no'/>
-      </source>
-      <target port='0'/>
-    </serial>
-    <console type='pty'>
-      <source path='/dev/pts/4'/>
-      <target port='0'/>
-    </console>
-    <channel type='unix'>
-      <source mode='bind' path='/tmp/guestfwd'/>
-      <target type='guestfwd' address='10.0.2.1' port='4600'/>
-    </channel>
-  </devices>
-  ...
+... +<devices> + <parallel type='pty'> + <source path='/dev/pts/2'/> + <target port='0'/> + </parallel> + <serial type='pty'> + <source path='/dev/pts/3'/> + <target port='0'/> + </serial> + <serial type='file'> + <source path='/tmp/file' append='on'> + <seclabel model='dac' relabel='no'/> + </source> + <target port='0'/> + </serial> + <console type='pty'> + <source path='/dev/pts/4'/> + <target port='0'/> + </console> + <channel type='unix'> + <source mode='bind' path='/tmp/guestfwd'/> + <target type='guestfwd' address='10.0.2.1' port='4600'/> + </channel> +</devices> +...

In each of these directives, the top-level element name (parallel, serial, @@ -5815,9 +5815,9 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/>
-  ...
+... +<log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/> +...

Each character device element has an optional @@ -5837,14 +5837,14 @@ qemu-kvm -net nic,model=? /dev/null

Parallel port
-  ...
-  <devices>
-    <parallel type='pty'>
-      <source path='/dev/pts/2'/>
-      <target port='0'/>
-    </parallel>
-  </devices>
-  ...
+... +<devices> + <parallel type='pty'> + <source path='/dev/pts/2'/> + <target port='0'/> + </parallel> +</devices> +...

target can have a port attribute, which @@ -5855,14 +5855,14 @@ qemu-kvm -net nic,model=? /dev/null

Serial port
-  ...
-  <devices>
-    <serial type='pty'>
-      <source path='/dev/pts/3'/>
-      <target port='0'/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type='pty'> + <source path='/dev/pts/3'/> + <target port='0'/> + </serial> +</devices> +...

target can have a port attribute, which @@ -5921,31 +5921,31 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <console type='pty'>
-      <source path='/dev/pts/4'/>
-      <target port='0'/>
-    </console>
+...
+<devices>
+  <console type='pty'>
+    <source path='/dev/pts/4'/>
+    <target port='0'/>
+  </console>
 
-    <!-- KVM virtio console -->
-    <console type='pty'>
-      <source path='/dev/pts/5'/>
-      <target type='virtio' port='0'/>
-    </console>
-  </devices>
-  ...
+ <!-- KVM virtio console --> + <console type='pty'> + <source path='/dev/pts/5'/> + <target type='virtio' port='0'/> + </console> +</devices> +...
-  ...
-  <devices>
-    <!-- KVM S390 sclp console -->
-    <console type='pty'>
-      <source path='/dev/pts/1'/>
-      <target type='sclp' port='0'/>
-    </console>
-  </devices>
-  ...
+... +<devices> + <!-- KVM S390 sclp console --> + <console type='pty'> + <source path='/dev/pts/1'/> + <target type='sclp' port='0'/> + </console> +</devices> +...

If the console is presented as a serial port, the target @@ -5961,26 +5961,26 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <channel type='unix'>
-      <source mode='bind' path='/tmp/guestfwd'/>
-      <target type='guestfwd' address='10.0.2.1' port='4600'/>
-    </channel>
+...
+<devices>
+  <channel type='unix'>
+    <source mode='bind' path='/tmp/guestfwd'/>
+    <target type='guestfwd' address='10.0.2.1' port='4600'/>
+  </channel>
 
-    <!-- KVM virtio channel -->
-    <channel type='pty'>
-      <target type='virtio' name='arbitrary.virtio.serial.port.name'/>
-    </channel>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
-      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
-    </channel>
-    <channel type='spicevmc'>
-      <target type='virtio' name='com.redhat.spice.0'/>
-    </channel>
-  </devices>
-  ...
+ <!-- KVM virtio channel --> + <channel type='pty'> + <target type='virtio' name='arbitrary.virtio.serial.port.name'/> + </channel> + <channel type='unix'> + <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/> + <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/> + </channel> + <channel type='spicevmc'> + <target type='virtio' name='com.redhat.spice.0'/> + </channel> +</devices> +...

This can be implemented in a variety of ways. The specific type of @@ -6060,13 +6060,13 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <console type='stdio'>
-      <target port='1'/>
-    </console>
-  </devices>
-  ...
+... +<devices> + <console type='stdio'> + <target port='1'/> + </console> +</devices> +...
Device logfile
@@ -6077,14 +6077,14 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="file">
-      <source path="/var/log/vm/vm-serial.log"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="file"> + <source path="/var/log/vm/vm-serial.log"/> + <target port="1"/> + </serial> +</devices> +...
Virtual console
@@ -6095,13 +6095,13 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type='vc'>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type='vc'> + <target port="1"/> + </serial> +</devices> +...
Null device
@@ -6111,13 +6111,13 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type='null'>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type='null'> + <target port="1"/> + </serial> +</devices> +...
Pseudo TTY
@@ -6128,14 +6128,14 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="pty">
-      <source path="/dev/pts/3"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="pty"> + <source path="/dev/pts/3"/> + <target port="1"/> + </serial> +</devices> +...

NB special case if <console type='pty'>, then the TTY @@ -6155,14 +6155,14 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="dev">
-      <source path="/dev/ttyS0"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="dev"> + <source path="/dev/ttyS0"/> + <target port="1"/> + </serial> +</devices> +...
Named pipe
@@ -6172,14 +6172,14 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="pipe">
-      <source path="/tmp/mypipe"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="pipe"> + <source path="/tmp/mypipe"/> + <target port="1"/> + </serial> +</devices> +...
TCP client/server
@@ -6189,30 +6189,30 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="tcp">
-      <source mode="connect" host="0.0.0.0" service="2445"/>
-      <protocol type="raw"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-   ...
+... +<devices> + <serial type="tcp"> + <source mode="connect" host="0.0.0.0" service="2445"/> + <protocol type="raw"/> + <target port="1"/> + </serial> +</devices> + ...

Or as a TCP server waiting for a client connection.

-  ...
-  <devices>
-    <serial type="tcp">
-      <source mode="bind" host="127.0.0.1" service="2445"/>
-      <protocol type="raw"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="tcp"> + <source mode="bind" host="127.0.0.1" service="2445"/> + <protocol type="raw"/> + <target port="1"/> + </serial> +</devices> +...

Alternatively you can use telnet instead @@ -6226,21 +6226,21 @@ qemu-kvm -net nic,model=? /dev/null

+...
+<devices>
+  <serial type="tcp">
+    <source mode="connect" host="0.0.0.0" service="2445"/>
+    <protocol type="telnet"/>
+    <target port="1"/>
+  </serial>
   ...
-  <devices>
-    <serial type="tcp">
-      <source mode="connect" host="0.0.0.0" service="2445"/>
-      <protocol type="telnet"/>
-      <target port="1"/>
-    </serial>
-    ...
-    <serial type="tcp">
-      <source mode="bind" host="127.0.0.1" service="2445"/>
-      <protocol type="telnet"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+ <serial type="tcp"> + <source mode="bind" host="127.0.0.1" service="2445"/> + <protocol type="telnet"/> + <target port="1"/> + </serial> +</devices> +...

Since 2.4.0, the optional attribute @@ -6260,15 +6260,15 @@ qemu-kvm -net nic,model=? /dev/null or default_tls_x509_cert_dir TLS directory structure exists.

-  ...
-  <devices>
-    <serial type="tcp">
-      <source mode='connect' host="127.0.0.1" service="5555" tls="yes"/>
-      <protocol type="raw"/>
-      <target port="0"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="tcp"> + <source mode='connect' host="127.0.0.1" service="5555" tls="yes"/> + <protocol type="raw"/> + <target port="0"/> + </serial> +</devices> +...
UDP network console
@@ -6278,15 +6278,15 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="udp">
-      <source mode="bind" host="0.0.0.0" service="2445"/>
-      <source mode="connect" host="0.0.0.0" service="2445"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="udp"> + <source mode="bind" host="0.0.0.0" service="2445"/> + <source mode="connect" host="0.0.0.0" service="2445"/> + <target port="1"/> + </serial> +</devices> +...
UNIX domain socket client/server
@@ -6296,14 +6296,14 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="unix">
-      <source mode="bind" path="/tmp/foo"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="unix"> + <source mode="bind" path="/tmp/foo"/> + <target port="1"/> + </serial> +</devices> +...
Spice channel
@@ -6319,14 +6319,14 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="spiceport">
-      <source channel="org.qemu.console.serial.0"/>
-      <target port="1"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="spiceport"> + <source channel="org.qemu.console.serial.0"/> + <target port="1"/> + </serial> +</devices> +...
Nmdm device
@@ -6337,13 +6337,13 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <serial type="nmdm">
-      <source master="/dev/nmdm0A" slave="/dev/nmdm0B"/>
-    </serial>
-  </devices>
-  ...
+... +<devices> + <serial type="nmdm"> + <source master="/dev/nmdm0A" slave="/dev/nmdm0B"/> + </serial> +</devices> +...

The source element has these attributes: @@ -6367,11 +6367,11 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <sound model='es1370'/>
-  </devices>
-  ...
+... +<devices> + <sound model='es1370'/> +</devices> +...
sound
@@ -6397,13 +6397,13 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <sound model='ich6'>
-      <codec type='micro'/>
-    </sound>
-  </devices>
-  ...
+... +<devices> + <sound model='ich6'> + <codec type='micro'/> + </sound> +</devices> +...

Each sound element has an optional @@ -6433,11 +6433,11 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <watchdog model='i6300esb'/>
-  </devices>
-  ...
+... +<devices> + <watchdog model='i6300esb'/> +</devices> +...
   ...
@@ -6520,11 +6520,11 @@ qemu-kvm -net nic,model=? /dev/null
       Example: automatically added device with KVM
     

-  ...
-  <devices>
-    <memballoon model='virtio'/>
-  </devices>
-  ...
+... +<devices> + <memballoon model='virtio'/> +</devices> +...

Example: manually added device with static PCI slot 2 requested @@ -6592,19 +6592,19 @@ qemu-kvm -net nic,model=? /dev/null Example: usage of the RNG device:

-  ...
-  <devices>
-    <rng model='virtio'>
-      <rate period="2000" bytes="1234"/>
-      <backend model='random'>/dev/random</backend>
-      <!-- OR -->
-      <backend model='egd' type='udp'>
-        <source mode='bind' service='1234'/>
-        <source mode='connect' host='1.2.3.4' service='1234'/>
-      </backend>
-    </rng>
-  </devices>
-  ...
+...
+<devices>
+  <rng model='virtio'>
+    <rate period="2000" bytes="1234"/>
+    <backend model='random'>/dev/random</backend>
+    <!-- OR -->
+    <backend model='egd' type='udp'>
+      <source mode='bind' service='1234'/>
+      <source mode='connect' host='1.2.3.4' service='1234'/>
+    </backend>
+  </rng>
+</devices>
+...
 
model
@@ -6680,15 +6680,15 @@ qemu-kvm -net nic,model=? /dev/null Example: usage of the TPM passthrough device

-  ...
-  <devices>
-    <tpm model='tpm-tis'>
-      <backend type='passthrough'>
-        <device path='/dev/tpm0'/>
-      </backend>
-    </tpm>
-  </devices>
-  ...
+...
+<devices>
+  <tpm model='tpm-tis'>
+    <backend type='passthrough'>
+      <device path='/dev/tpm0'/>
+    </backend>
+  </tpm>
+</devices>
+...
 
model
@@ -6734,13 +6734,13 @@ qemu-kvm -net nic,model=? /dev/null Example: usage of NVRAM configuration

-  ...
-  <devices>
-    <nvram>
-      <address type='spapr-vio' reg='0x3000'/>
-    </nvram>
-  </devices>
-  ...
+...
+<devices>
+  <nvram>
+    <address type='spapr-vio' reg='0x3000'/>
+  </nvram>
+</devices>
+...
 
spapr-vio
@@ -6778,14 +6778,14 @@ qemu-kvm -net nic,model=? /dev/null Example: usage of panic configuration

-  ...
-  <devices>
-    <panic model='hyperv'/>
-    <panic model='isa'>
-      <address type='isa' iobase='0x505'/>
-    </panic>
-  </devices>
-  ...
+...
+<devices>
+  <panic model='hyperv'/>
+  <panic model='isa'>
+    <address type='isa' iobase='0x505'/>
+  </panic>
+</devices>
+...
 
model
@@ -6823,20 +6823,20 @@ qemu-kvm -net nic,model=? /dev/null

-  ...
-  <devices>
-    <shmem name='my_shmem0'>
-      <model type='ivshmem-plain'/>
-      <size unit='M'>4</size>
-    </shmem>
-    <shmem name='shmem_server'>
-      <model type='ivshmem-doorbell'/>
-      <size unit='M'>2</size>
-      <server path='/tmp/socket-shmem'/>
-      <msi vectors='32' ioeventfd='on'/>
-    </shmem>
-  </devices>
-  ...
+...
+<devices>
+  <shmem name='my_shmem0'>
+    <model type='ivshmem-plain'/>
+    <size unit='M'>4</size>
+  </shmem>
+  <shmem name='shmem_server'>
+    <model type='ivshmem-doorbell'/>
+    <size unit='M'>2</size>
+    <server path='/tmp/socket-shmem'/>
+    <msi vectors='32' ioeventfd='on'/>
+  </shmem>
+</devices>
+...
 
@@ -6896,26 +6896,26 @@ qemu-kvm -net nic,model=? /dev/null Example: usage of the memory devices

-  ...
-  <devices>
-    <memory model='dimm'>
-      <target>
-        <size unit='KiB'>524287</size>
-        <node>0</node>
-      </target>
-    </memory>
-    <memory model='dimm'>
-      <source>
-        <pagesize unit='KiB'>4096</pagesize>
-        <nodemask>1-3</nodemask>
-      </source>
-      <target>
-        <size unit='KiB'>524287</size>
-        <node>1</node>
-      </target>
-    </memory>
-  </devices>
-  ...
+...
+<devices>
+  <memory model='dimm'>
+    <target>
+      <size unit='KiB'>524287</size>
+      <node>0</node>
+    </target>
+  </memory>
+  <memory model='dimm'>
+    <source>
+      <pagesize unit='KiB'>4096</pagesize>
+      <nodemask>1-3</nodemask>
+    </source>
+    <target>
+      <size unit='KiB'>524287</size>
+      <node>1</node>
+    </target>
+  </memory>
+</devices>
+...
 
model
@@ -6975,11 +6975,11 @@ qemu-kvm -net nic,model=? /dev/null Example:

-  ...
-  <devices>
-    <iommu model='intel'/>
-  </devices>
-  ...
+...
+<devices>
+  <iommu model='intel'/>
+</devices>
+...
 
model
@@ -7021,21 +7021,21 @@ qemu-kvm -net nic,model=? /dev/null

-  <seclabel type='dynamic' model='selinux'/>
+<seclabel type='dynamic' model='selinux'/>
 
-  <seclabel type='dynamic' model='selinux'>
-    <baselabel>system_u:system_r:my_svirt_t:s0</baselabel>
-  </seclabel>
+<seclabel type='dynamic' model='selinux'>
+  <baselabel>system_u:system_r:my_svirt_t:s0</baselabel>
+</seclabel>
 
-  <seclabel type='static' model='selinux' relabel='no'>
-    <label>system_u:system_r:svirt_t:s0:c392,c662</label>
-  </seclabel>
+<seclabel type='static' model='selinux' relabel='no'>
+  <label>system_u:system_r:svirt_t:s0:c392,c662</label>
+</seclabel>
 
-  <seclabel type='static' model='selinux' relabel='yes'>
-    <label>system_u:system_r:svirt_t:s0:c392,c662</label>
-  </seclabel>
+<seclabel type='static' model='selinux' relabel='yes'>
+  <label>system_u:system_r:svirt_t:s0:c392,c662</label>
+</seclabel>
 
-  <seclabel type='none'/>
+<seclabel type='none'/>