</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<dl>
<dt><code>type</code></dt>
</p>
<pre>
- ...
- <bootloader>/usr/bin/pygrub</bootloader>
- <bootloader_args>--append single</bootloader_args>
- ...</pre>
+...
+<bootloader>/usr/bin/pygrub</bootloader>
+<bootloader_args>--append single</bootloader_args>
+...</pre>
<dl>
<dt><code>bootloader</code></dt>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<dl>
<dt><code>type</code></dt>
</p>
<pre>
- <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>
</pre>
</dl>
<pre>
- <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>
</pre>
</p>
<pre>
+...
+<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>
- ...</pre>
+</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>
+...</pre>
<p>
The <code>sysinfo</code> element has a mandatory
by default.
</p>
<pre>
- ...
- <resource>
- <partition>/virtualmachines/production</partition>
- </resource>
- ...
+...
+<resource>
+ <partition>/virtualmachines/production</partition>
+</resource>
+...
</pre>
<p>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<pre>
- <cpu mode='host-model'>
- <model fallback='forbid'/>
- <topology sockets='1' cores='2' threads='1'/>
- </cpu>
- ...</pre>
+<cpu mode='host-model'>
+ <model fallback='forbid'/>
+ <topology sockets='1' cores='2' threads='1'/>
+</cpu>
+...</pre>
<pre>
- <cpu mode='host-passthrough'>
- <feature policy='disable' name='lahf_lm'/>
- ...</pre>
+<cpu mode='host-passthrough'>
+ <feature policy='disable' name='lahf_lm'/>
+...</pre>
<p>
In case no restrictions need to be put on CPU model and its features, a
</p>
<pre>
- ...
- <cpu>
- <topology sockets='1' cores='2' threads='1'/>
- </cpu>
- ...</pre>
+...
+<cpu>
+ <topology sockets='1' cores='2' threads='1'/>
+</cpu>
+...</pre>
<dl>
<dt><code>cpu</code></dt>
When a user needs a power7 VM to run in compatibility mode
on a Power8 host, this can be described in XML as follows :
<pre>
- <cpu mode='host-model'>
- <model>power7</model>
- </cpu>
- ...</pre>
+<cpu mode='host-model'>
+ <model>power7</model>
+</cpu>
+...</pre>
</dd>
<dt><code>host-passthrough</code></dt>
<dd>With this mode, the CPU visible to the guest should be exactly
</p>
<pre>
+...
+<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>
- ...</pre>
+ <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>
+...</pre>
<p>
Each <code>cell</code> element specifies a NUMA cell or a NUMA node.
</p>
<pre>
- ...
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>restart</on_crash>
- <on_lockfailure>poweroff</on_lockfailure>
- ...</pre>
+...
+<on_poweroff>destroy</on_poweroff>
+<on_reboot>restart</on_reboot>
+<on_crash>restart</on_crash>
+<on_lockfailure>poweroff</on_lockfailure>
+...</pre>
<p>
The following collections of elements allow the actions to be
</p>
<pre>
- ...
- <pm>
- <suspend-to-disk enabled='no'/>
- <suspend-to-mem enabled='yes'/>
- </pm>
- ...</pre>
+...
+<pm>
+ <suspend-to-disk enabled='no'/>
+ <suspend-to-mem enabled='yes'/>
+</pm>
+...</pre>
<dl>
<dt><code>pm</code></dt>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>
All features are listed within the <code>features</code>
</p>
<pre>
- ...
- <clock offset='localtime'>
- <timer name='rtc' tickpolicy='catchup' track='guest'>
- <catchup threshold='123' slew='120' limit='10000'/>
- </timer>
- <timer name='pit' tickpolicy='delay'/>
- </clock>
- ...</pre>
+...
+<clock offset='localtime'>
+ <timer name='rtc' tickpolicy='catchup' track='guest'>
+ <catchup threshold='123' slew='120' limit='10000'/>
+ </timer>
+ <timer name='pit' tickpolicy='delay'/>
+</clock>
+...</pre>
<dl>
<dt><code>clock</code></dt>
</p>
<pre>
- ...
- <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>
+...
</pre>
<table class="top_table">
</p>
<pre>
- ...
- <devices>
- <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
- </devices>
- ...</pre>
+...
+<devices>
+ <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
+</devices>
+...</pre>
<dl>
<dt><code>emulator</code></dt>
</p>
<pre>
- ...
- <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>
- ...</pre>
+ </backingStore>
+ <target dev='vdd' bus='virtio'/>
+ </disk>
+</devices>
+...</pre>
<dl>
<dt><code>disk</code></dt>
</p>
<pre>
+...
+<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>
- ...</pre>
+</devices>
+...</pre>
<dl>
<dt><code>filesystem</code></dt>
</p>
<pre>
+...
+<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>
- ...</pre>
+</devices>
+...</pre>
<p>
Each controller has a mandatory attribute <code>type</code>,
</p>
<pre>
+...
+<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>
- ...</pre>
+</devices>
+...</pre>
<p>
PCI controllers have an optional <code>model</code> attribute with
configuration.
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>
For machine types which provide an implicit PCI Express (PCIe)
1.2.19</span>)
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<h4><a name="elementsLease">Device leases</a></h4>
</p>
<pre>
+...
+<devices>
...
- <devices>
- ...
- <lease>
- <lockspace>somearea</lockspace>
- <key>somekey</key>
- <target path='/some/lease/path' offset='1024'/>
- </lease>
- ...
- </devices>
- ...</pre>
+ <lease>
+ <lockspace>somearea</lockspace>
+ <key>somekey</key>
+ <target path='/some/lease/path' offset='1024'/>
+ </lease>
+ ...
+</devices>
+...</pre>
<dl>
<dt><code>lockspace</code></dt>
</p>
<pre>
- ...
- <devices>
- <hostdev mode='subsystem' type='usb'>
- <source startupPolicy='optional'>
- <vendor id='0x1234'/>
- <product id='0xbeef'/>
- </source>
- <boot order='2'/>
- </hostdev>
- </devices>
- ...</pre>
+...
+<devices>
+ <hostdev mode='subsystem' type='usb'>
+ <source startupPolicy='optional'>
+ <vendor id='0x1234'/>
+ <product id='0xbeef'/>
+ </source>
+ <boot order='2'/>
+ </hostdev>
+</devices>
+...</pre>
<p>or:</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>or:</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>or:</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<dl>
<dt><code>hostdev</code></dt>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<dl>
<dt><code>redirdev</code></dt>
</p>
<pre>
- ...
- <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>
+...
</pre>
<p>
<h4><a name="elementsNICS">Network interfaces</a></h4>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>
There are several possibilities for specifying a network
</p>
<pre>
+...
+<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>
- </devices>
- ...</pre>
+ <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>
+...</pre>
<h5><a name="elementsNICSBridge">Bridge to LAN</a></h5>
the interfaces "port-profile".
</p>
<pre>
+...
+<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>
- ...</pre>
+ <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>
+...</pre>
<p>
On hosts that support Open vSwitch on the kernel side and have the
to the interface.
</p>
<pre>
+...
+<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>
- ...</pre>
+ <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>
+...</pre>
<h5><a name="elementsNICSSlirp">Userspace SLIRP stack</a></h5>
</p>
<pre>
+...
+<devices>
+ <interface type='user'/>
...
- <devices>
- <interface type='user'/>
- ...
- <interface type='user'>
- <mac address="00:11:22:33:44:55"/>
- </interface>
- </devices>
- ...</pre>
+ <interface type='user'>
+ <mac address="00:11:22:33:44:55"/>
+ </interface>
+</devices>
+...</pre>
<h5><a name="elementsNICSEthernet">Generic ethernet connection</a></h5>
</p>
<pre>
+...
+<devices>
+ <interface type='ethernet'/>
...
- <devices>
- <interface type='ethernet'/>
- ...
- <interface type='ethernet'>
- <target dev='vnet7'/>
- <script path='/etc/qemu-ifup-mynet'/>
- </interface>
- </devices>
- ...</pre>
+ <interface type='ethernet'>
+ <target dev='vnet7'/>
+ <script path='/etc/qemu-ifup-mynet'/>
+ </interface>
+</devices>
+...</pre>
<h5><a name="elementsNICSDirect">Direct attachment to physical interface</a></h5>
</dl>
<pre>
+...
+<devices>
...
- <devices>
- ...
- <interface type='direct' trustGuestRxFilters='no'>
- <source dev='eth0' mode='vepa'/>
- </interface>
- </devices>
- ...</pre>
+ <interface type='direct' trustGuestRxFilters='no'>
+ <source dev='eth0' mode='vepa'/>
+ </interface>
+</devices>
+...</pre>
<p>
The network access of direct attached virtual machines can be
</dd>
</dl>
<pre>
+...
+<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>
- ...</pre>
+ <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>
+...</pre>
<p>
The interface can have additional parameters as shown below
</dd>
</dl>
<pre>
+...
+<devices>
...
- <devices>
- ...
- <interface type='direct'>
- <source dev='eth0' mode='private'/>
- <virtualport type='802.1Qbh'>
- <parameters profileid='finance'/>
- </virtualport>
- </interface>
- </devices>
- ...
- </pre>
+ <interface type='direct'>
+ <source dev='eth0' mode='private'/>
+ <virtualport type='802.1Qbh'>
+ <parameters profileid='finance'/>
+ </virtualport>
+ </interface>
+</devices>
+...
+</pre>
<h5><a name="elementsNICSHostdev">PCI Passthrough</a></h5>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<h5><a name="elementsNICSMulticast">Multicast tunnel</a></h5>
</p>
<pre>
- ...
- <devices>
- <interface type='mcast'>
- <mac address='52:54:00:6d:90:01'/>
- <source address='230.0.0.1' port='5558'/>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='mcast'>
+ <mac address='52:54:00:6d:90:01'/>
+ <source address='230.0.0.1' port='5558'/>
+ </interface>
+</devices>
+...</pre>
<h5><a name="elementsNICSTCP">TCP tunnel</a></h5>
to one of the first 4 network types and do the appropriate routing.</p>
<pre>
+...
+<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>
- ...</pre>
+ <interface type='client'>
+ <mac address='52:54:00:8b:c9:51'/>
+ <source address='192.168.0.1' port='5558'/>
+ </interface>
+</devices>
+...</pre>
<h5><a name="elementsNICSUDP">UDP unicast tunnel</a></h5>
<span class="since">Since 1.2.20</span></p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<h5><a name="elementsNICSModel">Setting the NIC model</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet1'/>
- <b><model type='ne2k_pci'/></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet1'/>
+ <b><model type='ne2k_pci'/></b>
+ </interface>
+</devices>
+...</pre>
<p>
For hypervisors which support this, you can set the model of
<h5><a name="elementsDriverBackendOptions">Setting NIC driver-specific options</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet1'/>
- <model type='virtio'/>
- <b><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>
- </b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet1'/>
+ <model type='virtio'/>
+ <b><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>
+ </b>
+ </interface>
+</devices>
+...</pre>
<p>
Some NICs may have tunable driver-specific options. These are
<h5><a name="elementsBackendOptions">Setting network backend-specific options</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet1'/>
- <model type='virtio'/>
- <b><backend tap='/dev/net/tun' vhost='/dev/vhost-net'/></b>
- <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet1'/>
+ <model type='virtio'/>
+ <b><backend tap='/dev/net/tun' vhost='/dev/vhost-net'/></b>
+ <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
+ </interface>
+</devices>
+...</pre>
<p>
For tuning the backend of the network, the <code>backend</code> element
<h5><a name="elementsNICSTargetOverride">Overriding the target element</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <b><target dev='vnet1'/></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <b><target dev='vnet1'/></b>
+ </interface>
+</devices>
+...</pre>
<p>
If no target is specified, certain hypervisors will
</p>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <b><guest dev='myeth'/></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <b><guest dev='myeth'/></b>
+ </interface>
+</devices>
+...</pre>
<h5><a name="elementsNICSBoot">Specifying boot order</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet1'/>
- <b><boot order='1'/></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet1'/>
+ <b><boot order='1'/></b>
+ </interface>
+</devices>
+...</pre>
<p>
For hypervisors which support this, you can set a specific NIC to
<h5><a name="elementsNICSROM">Interface ROM BIOS configuration</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet1'/>
- <b><rom bar='on' file='/etc/fake/boot.bin'/></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet1'/>
+ <b><rom bar='on' file='/etc/fake/boot.bin'/></b>
+ </interface>
+</devices>
+...</pre>
<p>
For hypervisors which support this, you can change how a PCI Network
</p>
<h5><a name="elementDomain">Setting up a network backend in a driver domain</a></h5>
<pre>
+...
+<devices>
...
- <devices>
- ...
- <interface type='bridge'>
- <source bridge='br0'/>
- <b><backenddomain name='netvm'/></b>
- </interface>
- ...
- </devices>
- ...</pre>
+ <interface type='bridge'>
+ <source bridge='br0'/>
+ <b><backenddomain name='netvm'/></b>
+ </interface>
+ ...
+</devices>
+...</pre>
<p>
The optional <code>backenddomain</code> element allows specifying a
<h5><a name="elementQoS">Quality of service</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet0'/>
- <b><bandwidth>
- <inbound average='1000' peak='5000' floor='200' burst='1024'/>
- <outbound average='128' peak='256' burst='256'/>
- </bandwidth></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet0'/>
+ <b><bandwidth>
+ <inbound average='1000' peak='5000' floor='200' burst='1024'/>
+ <outbound average='128' peak='256' burst='256'/>
+ </bandwidth></b>
+ </interface>
+</devices>
+...</pre>
<p>
This part of interface XML provides setting quality of service. Incoming
<h5><a name="elementVlanTag">Setting VLAN tag (on supported network types only)</a></h5>
<pre>
- ...
- <devices>
- <interface type='bridge'>
- <b><vlan></b>
- <b><tag id='42'/></b>
- <b></vlan></b>
- <source bridge='ovsbr0'/>
- <virtualport type='openvswitch'>
- <parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
- </virtualport>
- </interface>
- <interface type='bridge'>
- <b><vlan trunk='yes'></b>
- <b><tag id='42'/></b>
- <b><tag id='123' nativeMode='untagged'/></b>
- <b></vlan></b>
- ...
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='bridge'>
+ <b><vlan></b>
+ <b><tag id='42'/></b>
+ <b></vlan></b>
+ <source bridge='ovsbr0'/>
+ <virtualport type='openvswitch'>
+ <parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
+ </virtualport>
+ </interface>
+ <interface type='bridge'>
+ <b><vlan trunk='yes'></b>
+ <b><tag id='42'/></b>
+ <b><tag id='123' nativeMode='untagged'/></b>
+ <b></vlan></b>
+ ...
+ </interface>
+</devices>
+...</pre>
<p>
If (and only if) the network connection used by the guest
<h5><a name="elementLink">Modifying virtual link state</a></h5>
<pre>
- ...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet0'/>
- <b><link state='down'/></b>
- </interface>
- </devices>
- ...</pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet0'/>
+ <b><link state='down'/></b>
+ </interface>
+</devices>
+...</pre>
<p>
This element provides means of setting state of the virtual network link.
<h5><a name="ipconfig">IP configuration</a></h5>
<pre>
+...
+<devices>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet0'/>
+ <b><ip address='192.168.122.5' prefix='24'/></b>
+ <b><ip address='192.168.122.5' prefix='24' peer='10.0.0.10'/></b>
+ <b><route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/></b>
+ <b><route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/></b>
+ </interface>
...
- <devices>
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet0'/>
- <b><ip address='192.168.122.5' prefix='24'/></b>
- <b><ip address='192.168.122.5' prefix='24' peer='10.0.0.10'/></b>
- <b><route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/></b>
- <b><route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/></b>
- </interface>
- ...
- <hostdev mode='capabilities' type='net'>
- <source>
- <interface>eth0</interface>
- </source>
- <b><ip address='192.168.122.6' prefix='24'/></b>
- <b><route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/></b>
- <b><route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/></b>
- </hostdev>
-
- </devices>
- ...
+ <hostdev mode='capabilities' type='net'>
+ <source>
+ <interface>eth0</interface>
+ </source>
+ <b><ip address='192.168.122.6' prefix='24'/></b>
+ <b><route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/></b>
+ <b><route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/></b>
+ </hostdev>
+
+</devices>
+...
</pre>
<p>
</p>
<pre>
- ...
- <devices>
- <interface type='ethernet'>
- <b><source/></b>
- <b><ip address='192.168.123.1' prefix='24'/></b>
- <b><ip address='10.0.0.10' prefix='24' peer='192.168.122.5'/></b>
- <b><route family='ipv4' address='192.168.42.0' prefix='24' gateway='192.168.123.4'/></b>
- <b><source/></b>
- ...
- </interface>
+...
+<devices>
+ <interface type='ethernet'>
+ <b><source/></b>
+ <b><ip address='192.168.123.1' prefix='24'/></b>
+ <b><ip address='10.0.0.10' prefix='24' peer='192.168.122.5'/></b>
+ <b><route family='ipv4' address='192.168.42.0' prefix='24' gateway='192.168.123.4'/></b>
+ <b><source/></b>
...
- </devices>
+ </interface>
...
+</devices>
+...
</pre>
<p>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>
The <code><source></code> element has to be specified
</p>
<pre>
- ...
- <devices>
- <interface ...>
- ...
- <filterref filter='clean-traffic'/>
- </interface>
- <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='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>
- ...</pre>
+ </filterref>
+ </interface>
+</devices>
+...</pre>
<p>
The <code>filter</code> attribute specifies the name of the nwfilter
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<dl>
<dt><code>input</code></dt>
</p>
<pre>
- ...
- <devices>
- <hub type='usb'/>
- </devices>
- ...</pre>
+...
+<devices>
+ <hub type='usb'/>
+</devices>
+...</pre>
<dl>
<dt><code>hub</code></dt>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<dl>
<dt><code>graphics</code></dt>
and <code>usbredir</code> (<span class="since">since 0.9.12</span>).
</p>
<pre>
- <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></pre>
+<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></pre>
<p>
Spice supports variable compression settings for audio, images and
streaming. These settings are accessible via the <code>compression
</p>
<pre>
- ...
- <devices>
- <video>
- <model type='vga' vram='16384' heads='1'>
- <acceleration accel3d='yes' accel2d='yes'/>
- </model>
- </video>
- </devices>
- ...</pre>
+...
+<devices>
+ <video>
+ <model type='vga' vram='16384' heads='1'>
+ <acceleration accel3d='yes' accel2d='yes'/>
+ </model>
+ </video>
+</devices>
+...</pre>
<dl>
<dt><code>video</code></dt>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>
In each of these directives, the top-level element name (parallel, serial,
</p>
<pre>
- ...
- <log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/>
- ...</pre>
+...
+<log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/>
+...</pre>
<p>
Each character device element has an optional
<h6><a name="elementCharParallel">Parallel port</a></h6>
<pre>
- ...
- <devices>
- <parallel type='pty'>
- <source path='/dev/pts/2'/>
- <target port='0'/>
- </parallel>
- </devices>
- ...</pre>
+...
+<devices>
+ <parallel type='pty'>
+ <source path='/dev/pts/2'/>
+ <target port='0'/>
+ </parallel>
+</devices>
+...</pre>
<p>
<code>target</code> can have a <code>port</code> attribute, which
<h6><a name="elementCharSerial">Serial port</a></h6>
<pre>
- ...
- <devices>
- <serial type='pty'>
- <source path='/dev/pts/3'/>
- <target port='0'/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type='pty'>
+ <source path='/dev/pts/3'/>
+ <target port='0'/>
+ </serial>
+</devices>
+...</pre>
<p>
<code>target</code> can have a <code>port</code> attribute, which
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<pre>
- ...
- <devices>
- <!-- KVM S390 sclp console -->
- <console type='pty'>
- <source path='/dev/pts/1'/>
- <target type='sclp' port='0'/>
- </console>
- </devices>
- ...</pre>
+...
+<devices>
+ <!-- KVM S390 sclp console -->
+ <console type='pty'>
+ <source path='/dev/pts/1'/>
+ <target type='sclp' port='0'/>
+ </console>
+</devices>
+...</pre>
<p>
If the console is presented as a serial port, the <code>target</code>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<p>
This can be implemented in a variety of ways. The specific type of
</p>
<pre>
- ...
- <devices>
- <console type='stdio'>
- <target port='1'/>
- </console>
- </devices>
- ...</pre>
+...
+<devices>
+ <console type='stdio'>
+ <target port='1'/>
+ </console>
+</devices>
+...</pre>
<h6><a name="elementsCharFle">Device logfile</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="file">
- <source path="/var/log/vm/vm-serial.log"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="file">
+ <source path="/var/log/vm/vm-serial.log"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharVC">Virtual console</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type='vc'>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type='vc'>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharNull">Null device</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type='null'>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type='null'>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharPTY">Pseudo TTY</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="pty">
- <source path="/dev/pts/3"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="pty">
+ <source path="/dev/pts/3"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<p>
NB special case if <console type='pty'>, then the TTY
</p>
<pre>
- ...
- <devices>
- <serial type="dev">
- <source path="/dev/ttyS0"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="dev">
+ <source path="/dev/ttyS0"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharPipe">Named pipe</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="pipe">
- <source path="/tmp/mypipe"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="pipe">
+ <source path="/tmp/mypipe"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharTCP">TCP client/server</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="tcp">
- <source mode="connect" host="0.0.0.0" service="2445"/>
- <protocol type="raw"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="tcp">
+ <source mode="connect" host="0.0.0.0" service="2445"/>
+ <protocol type="raw"/>
+ <target port="1"/>
+ </serial>
+</devices>
+ ...</pre>
<p>
Or as a TCP server waiting for a client connection.
</p>
<pre>
- ...
- <devices>
- <serial type="tcp">
- <source mode="bind" host="127.0.0.1" service="2445"/>
- <protocol type="raw"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="tcp">
+ <source mode="bind" host="127.0.0.1" service="2445"/>
+ <protocol type="raw"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<p>
Alternatively you can use <code>telnet</code> instead
</p>
<pre>
+...
+<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>
- ...</pre>
+ <serial type="tcp">
+ <source mode="bind" host="127.0.0.1" service="2445"/>
+ <protocol type="telnet"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<p>
<span class="since">Since 2.4.0,</span> the optional attribute
or <code>default_tls_x509_cert_dir</code> TLS directory structure exists.
</p>
<pre>
- ...
- <devices>
- <serial type="tcp">
- <source mode='connect' host="127.0.0.1" service="5555" tls="yes"/>
- <protocol type="raw"/>
- <target port="0"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="tcp">
+ <source mode='connect' host="127.0.0.1" service="5555" tls="yes"/>
+ <protocol type="raw"/>
+ <target port="0"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharUDP">UDP network console</a></h6>
</p>
<pre>
- ...
- <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>
- ...</pre>
+...
+<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>
+...</pre>
<h6><a name="elementsCharUNIX">UNIX domain socket client/server</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="unix">
- <source mode="bind" path="/tmp/foo"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="unix">
+ <source mode="bind" path="/tmp/foo"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsCharSpiceport">Spice channel</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="spiceport">
- <source channel="org.qemu.console.serial.0"/>
- <target port="1"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="spiceport">
+ <source channel="org.qemu.console.serial.0"/>
+ <target port="1"/>
+ </serial>
+</devices>
+...</pre>
<h6><a name="elementsNmdm">Nmdm device</a></h6>
</p>
<pre>
- ...
- <devices>
- <serial type="nmdm">
- <source master="/dev/nmdm0A" slave="/dev/nmdm0B"/>
- </serial>
- </devices>
- ...</pre>
+...
+<devices>
+ <serial type="nmdm">
+ <source master="/dev/nmdm0A" slave="/dev/nmdm0B"/>
+ </serial>
+</devices>
+...</pre>
<p>
The <code>source</code> element has these attributes:
</p>
<pre>
- ...
- <devices>
- <sound model='es1370'/>
- </devices>
- ...</pre>
+...
+<devices>
+ <sound model='es1370'/>
+</devices>
+...</pre>
<dl>
<dt><code>sound</code></dt>
</p>
<pre>
- ...
- <devices>
- <sound model='ich6'>
- <codec type='micro'/>
- </sound>
- </devices>
- ...</pre>
+...
+<devices>
+ <sound model='ich6'>
+ <codec type='micro'/>
+ </sound>
+</devices>
+...</pre>
<p>
Each <code>sound</code> element has an optional
</p>
<pre>
- ...
- <devices>
- <watchdog model='i6300esb'/>
- </devices>
- ...</pre>
+...
+<devices>
+ <watchdog model='i6300esb'/>
+</devices>
+...</pre>
<pre>
...
Example: automatically added device with KVM
</p>
<pre>
- ...
- <devices>
- <memballoon model='virtio'/>
- </devices>
- ...</pre>
+...
+<devices>
+ <memballoon model='virtio'/>
+</devices>
+...</pre>
<p>
Example: manually added device with static PCI slot 2 requested
Example: usage of the RNG device:
</p>
<pre>
- ...
- <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>
+...
</pre>
<dl>
<dt><code>model</code></dt>
Example: usage of the TPM passthrough device
</p>
<pre>
- ...
- <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>
+...
</pre>
<dl>
<dt><code>model</code></dt>
Example: usage of NVRAM configuration
</p>
<pre>
- ...
- <devices>
- <nvram>
- <address type='spapr-vio' reg='0x3000'/>
- </nvram>
- </devices>
- ...
+...
+<devices>
+ <nvram>
+ <address type='spapr-vio' reg='0x3000'/>
+ </nvram>
+</devices>
+...
</pre>
<dl>
<dt><code>spapr-vio</code></dt>
Example: usage of panic configuration
</p>
<pre>
- ...
- <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>
+...
</pre>
<dl>
<dt><code>model</code></dt>
</p>
<pre>
- ...
- <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>
+...
</pre>
<dl>
Example: usage of the memory devices
</p>
<pre>
- ...
- <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>
+...
</pre>
<dl>
<dt><code>model</code></dt>
Example:
</p>
<pre>
- ...
- <devices>
- <iommu model='intel'/>
- </devices>
- ...
+...
+<devices>
+ <iommu model='intel'/>
+</devices>
+...
</pre>
<dl>
<dt><code>model</code></dt>
</p>
<pre>
- <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'/>
</pre>
<p>