<h3><a name="elementsMetadata">General metadata</a></h3>
- <pre>
- <domain type='xen' id='3'>
- <name>fv0</name>
- <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
- ...</pre>
+<pre>
+<domain type='xen' id='3'>
+ <name>fv0</name>
+ <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
+ ...</pre>
<dl>
<dt><code>name</code></dt>
to obtain/find the boot image.
</p>
- <pre>
- ...
- <os>
- <type>hvm</type>
- <loader>/usr/lib/xen/boot/hvmloader</loader>
- <boot dev='hd'/>
- </os>
- ...</pre>
+<pre>
+ ...
+ <os>
+ <type>hvm</type>
+ <loader>/usr/lib/xen/boot/hvmloader</loader>
+ <boot dev='hd'/>
+ </os>
+ ...</pre>
<dl>
<dt><code>type</code></dt>
An example is <code>pygrub</code> with Xen.
</p>
- <pre>
- ...
- <bootloader>/usr/bin/pygrub</bootloader>
- <bootloader_args>--append single</bootloader_args>
- ...</pre>
+<pre>
+ ...
+ <bootloader>/usr/bin/pygrub</bootloader>
+ <bootloader_args>--append single</bootloader_args>
+ ...</pre>
<dl>
<dt><code>bootloader</code></dt>
is usually available for both para and full virtualized guests.
</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>
- </os>
- ...</pre>
+<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>
+ </os>
+ ...</pre>
<dl>
<dt><code>type</code></dt>
<h3><a name="elementsResources">Basic resources</a></h3>
- <pre>
- ...
- <memory>524288</memory>
- <currentMemory>524288</currentMemory>
- <memoryBacking>
- <hugepages/>
- </memoryBacking>
- <vcpu>1</vcpu>
- ...</pre>
+<pre>
+ ...
+ <memory>524288</memory>
+ <currentMemory>524288</currentMemory>
+ <memoryBacking>
+ <hugepages/>
+ </memoryBacking>
+ <vcpu>1</vcpu>
+ ...</pre>
<dl>
<dt><code>memory</code></dt>
<span class="since">Since 0.7.5</span>
</p>
- <pre>
- ...
- <cpu match='exact'>
- <model>core2duo</model>
- <topology sockets='1' cores='2' threads='1'/>
- <feature policy='disable' name='lahf_lm'/>
- </cpu>
- ...</pre>
+<pre>
+ ...
+ <cpu match='exact'>
+ <model>core2duo</model>
+ <topology sockets='1' cores='2' threads='1'/>
+ <feature policy='disable' name='lahf_lm'/>
+ </cpu>
+ ...</pre>
<p>
In case no restrictions need to be put on CPU model and its features, a
<span class="since">Since 0.7.6</span>
</p>
- <pre>
- ...
- <cpu>
- <topology sockets='1' cores='2' threads='1'/>
- </cpu>
- ...</pre>
+<pre>
+ ...
+ <cpu>
+ <topology sockets='1' cores='2' threads='1'/>
+ </cpu>
+ ...</pre>
<dl>
<dt><code>cpu</code></dt>
re-configured for the first post-install bootup.
</p>
- <pre>
- ...
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>restart</on_crash>
- ...</pre>
+<pre>
+ ...
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ ...</pre>
<dl>
<dt><code>on_poweroff</code></dt>
toggled on/off.
</p>
- <pre>
- ...
- <features>
- <pae/>
- <acpi/>
- <apic/>
- </features>
- ...</pre>
+<pre>
+ ...
+ <features>
+ <pae/>
+ <acpi/>
+ <apic/>
+ </features>
+ ...</pre>
<p>
All features are listed within the <code>features</code>
it to be in so called 'localtime'.
</p>
- <pre>
- ...
- <clock offset="localtime"/>
- ...</pre>
+<pre>
+ ...
+ <clock offset="localtime"/>
+ ...</pre>
<dl>
<dt><code>clock</code></dt>
<span class="since">Since 0.1.3</span>
</p>
- <pre>
- ...
- <devices>
- <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
+ </devices>
+ ...</pre>
<dl>
<dt><code>emulator</code></dt>
element.
</p>
- <pre>
- ...
- <disk type='file'>
- <driver name="tap" type="aio" cache="default">
- <source file='/var/lib/xen/images/fv0'/>
- <target dev='hda' bus='ide'/>
- <encryption type='...'>
- ...
- </encryption>
- <shareable/>
- </disk>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <disk type='file'>
+ <driver name="tap" type="aio" cache="default">
+ <source file='/var/lib/xen/images/fv0'/>
+ <target dev='hda' bus='ide'/>
+ <encryption type='...'>
+ ...
+ </encryption>
+ <shareable/>
+ </disk>
+ </devices>
+ ...</pre>
<dl>
<dt><code>disk</code></dt>
0.4.4 for USB and 0.6.0 for PCI (KVM only)</span>:
</p>
- <pre>
- ...
- <hostdev mode='subsystem' type='usb'>
- <source>
- <vendor id='0x1234'/>
- <product id='0xbeef'/>
- </source>
- </hostdev>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <hostdev mode='subsystem' type='usb'>
+ <source>
+ <vendor id='0x1234'/>
+ <product id='0xbeef'/>
+ </source>
+ </hostdev>
+ </devices>
+ ...</pre>
+
<p>or:</p>
- <pre>
- ...
- <hostdev mode='subsystem' type='pci'>
- <source>
- <address bus='0x06' slot='0x02' function='0x0'/>
- </source>
- </hostdev>
- ...</pre>
+
+<pre>
+ ...
+ <devices>
+ <hostdev mode='subsystem' type='pci'>
+ <source>
+ <address bus='0x06' slot='0x02' function='0x0'/>
+ </source>
+ </hostdev>
+ </devices>
+ ...</pre>
<dl>
<dt><code>hostdev</code></dt>
<h4><a name="elementsNICS">Network interfaces</a></h4>
- <pre>
- ...
- <interface type='bridge'>
- <source bridge='xenbr0'/>
- <mac address='00:16:3e:5d:c7:9e'/>
- <script path='vif-bridge'/>
- </interface>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <interface type='bridge'>
+ <source bridge='xenbr0'/>
+ <mac address='00:16:3e:5d:c7:9e'/>
+ <script path='vif-bridge'/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSVirtual">Virtual network</a></h5>
<a href="#elementsNICSTargetOverride">overriding the target element</a>).
</p>
- <pre>
- ...
- <interface type='network'>
- <source network='default'/>
- </interface>
- ...
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet7'/>
- <mac address="11:22:33:44:55:66"/>
- </interface>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <interface type='network'>
+ <source network='default'/>
+ </interface>
+ ...
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='vnet7'/>
+ <mac address="11:22:33:44:55:66"/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSBridge">Bridge to LAN</a></h5>
full incoming & outgoing net access just like a physical machine.
</p>
- <pre>
- ...
- <interface type='bridge'>
- <source bridge='br0'/>
- </interface>
-
- <interface type='bridge'>
- <source bridge='br0'/>
- <target dev='vnet7'/>
- <mac address="11:22:33:44:55:66"/>
- </interface>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <interface type='bridge'>
+ <source bridge='br0'/>
+ </interface>
+ ...
+ <interface type='bridge'>
+ <source bridge='br0'/>
+ <target dev='vnet7'/>
+ <mac address="11:22:33:44:55:66"/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSSlirp">Userspace SLIRP stack</a></h5>
VMs to have outgoing access.
</p>
- <pre>
- ...
- <interface type='user'/>
- ...
- <interface type='user'>
- <mac address="11:22:33:44:55:66"/>
- </interface>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <interface type='user'/>
+ ...
+ <interface type='user'>
+ <mac address="11:22:33:44:55:66"/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSEthernet">Generic ethernet connection</a></h5>
overridden.
</p>
- <pre>
- ...
- <interface type='ethernet'/>
- ...
- <interface type='ethernet'>
- <target dev='vnet7'/>
- <script path='/etc/qemu-ifup-mynet'/>
- </interface>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <interface type='ethernet'/>
+ ...
+ <interface type='ethernet'>
+ <target dev='vnet7'/>
+ <script path='/etc/qemu-ifup-mynet'/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSMulticast">Multicast tunnel</a></h5>
multicast address block.
</p>
- <pre>
- ...
- <interface type='mcast'>
- <source address='230.0.0.1' port='5558'/>
- </interface>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <interface type='mcast'>
+ <source address='230.0.0.1' port='5558'/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSTCP">TCP tunnel</a></h5>
network access, one of the VMs should have a 2nd NIC which is connected
to one of the first 4 network types and do the appropriate routing.</p>
- <pre>
- ...
- <interface type='server'>
- <source address='192.168.0.1' port='5558'/>
- </interface>
- ...
- <interface type='client'>
+<pre>
+ ...
+ <devices>
+ <interface type='server'>
<source address='192.168.0.1' port='5558'/>
- </interface>
- ...</pre>
+ </interface>
+ ...
+ <interface type='client'>
+ <source address='192.168.0.1' port='5558'/>
+ </interface>
+ </devices>
+ ...</pre>
<h5><a name="elementsNICSModel">Setting the NIC model</a></h5>
- <pre>
- ...
- <interface type='network'>
- <source network='default'/>
- <target dev='vnet1'/>
- <b><model type='ne2k_pci'/></b>
- </interface>
- ...</pre>
+<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="elementsNICSTargetOverride">Overriding the target element</a></h5>
- <pre>
- ...
- <interface type='network'>
- <source network='default'/>
- <b><target dev='vnet1'/></b>
- </interface>
- ...</pre>
+<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 automatically
to provide a graphics tablet for absolute cursor movement.
</p>
- <pre>
- ...
- <input type='mouse' bus='usb'/>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <input type='mouse' bus='usb'/>
+ </devices>
+ ...</pre>
<dl>
<dt><code>input</code></dt>
admin.
</p>
- <pre>
- ...
- <graphics type='sdl' display=':0.0'/>
- <graphics type='vnc' port='5904'/>
- <graphics type='rdp' autoport='yes' multiUser='yes' />
- <graphics type='desktop' fullscreen='yes'/>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <graphics type='sdl' display=':0.0'/>
+ <graphics type='vnc' port='5904'/>
+ <graphics type='rdp' autoport='yes' multiUser='yes' />
+ <graphics type='desktop' fullscreen='yes'/>
+ </devices>
+ ...</pre>
<dl>
<dt><code>graphics</code></dt>
A video device.
</p>
- <pre>
- ...
- <video>
- <model type='vga' vram='8192' heads='1'>
- <acceleration accel3d='yes' accel3d='yes'/>
- </model>
- </video>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <video>
+ <model type='vga' vram='8192' heads='1'>
+ <acceleration accel3d='yes' accel3d='yes'/>
+ </model>
+ </video>
+ </devices>
+ ...</pre>
<dl>
<dt><code>video</code></dt>
all classed as character devices and so represented using the same syntax.
</p>
- <pre>
- ...
- <parallel type='pty'>
- <source path='/dev/pts/2'/>
- <target port='0'/>
- </parallel>
- <serial type='pty'>
- <source path='/dev/pts/3'/>
- <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>
- </domain></pre>
+<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>
+ <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,
<h6><a name="elementCharParallel">Parallel port</a></h6>
- <pre>
- ...
- <parallel type='pty'>
- <source path='/dev/pts/2'/>
- <target port='0'/>
- </parallel>
- ...</pre>
+<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>
- ...
- <serial type='pty'>
- <source path='/dev/pts/3'/>
- <target port='0'/>
- </serial>
- ...</pre>
+<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
virtualized guests without a paravirtualized console.
</p>
- <pre>
- ...
- <console type='pty'>
- <source path='/dev/pts/4'/>
- <target port='0'/>
- </console>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <console type='pty'>
+ <source path='/dev/pts/4'/>
+ <target port='0'/>
+ </console>
+ </devices>
+ ...</pre>
<p>
If the console is presented as a serial port, the <code>target</code>
guest.
</p>
- <pre>
- ...
- <channel type='unix'>
- <source mode='bind' path='/tmp/guestfwd'/>
- <target type='guestfwd' address='10.0.2.1' port='4600'/>
- </channel>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <channel type='unix'>
+ <source mode='bind' path='/tmp/guestfwd'/>
+ <target type='guestfwd' address='10.0.2.1' port='4600'/>
+ </channel>
+ </devices>
+ ...</pre>
<p>
This can be implemented in a variety of ways. The specific type of
into the virtual machine's logfile
</p>
- <pre>
- ...
- <console type='stdio'>
- <target port='1'>
- </console>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <console type='stdio'>
+ <target port='1'>
+ </console>
+ </devices>
+ ...</pre>
<h6><a name="elementsCharFle">Device logfile</a></h6>
device is written to the file.
</p>
- <pre>
- ...
- <serial type="file">
- <source path="/var/log/vm/vm-serial.log"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<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>
hotkey sequence such as "ctrl+alt+3"
</p>
- <pre>
- ...
- <serial type='vc'>
- <target port="1"/>
- </serial>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <serial type='vc'>
+ <target port="1"/>
+ </serial>
+ </devices>
+ ...</pre>
<h6><a name="elementsCharNull">Null device</a></h6>
provided to the input. All data written is discarded.
</p>
- <pre>
- ...
- <serial type='null'>
- <target port="1"/>
- </serial>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <serial type='null'>
+ <target port="1"/>
+ </serial>
+ </devices>
+ ...</pre>
<h6><a name="elementsCharPTY">Pseudo TTY</a></h6>
serial port locally.
</p>
- <pre>
- ...
- <serial type="pty">
- <source path="/dev/pts/3"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<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
port.
</p>
- <pre>
- ...
- <serial type="dev">
- <source path="/dev/ttyS0"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <serial type="dev">
+ <source path="/dev/ttyS0"/>
+ <target port="1"/>
+ </serial>
+ </devices>
+ ...</pre>
<h6><a name="elementsCharPipe">Named pipe</a></h6>
more info.
</p>
- <pre>
- ...
- <serial type="pipe">
- <source path="/tmp/mypipe"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <serial type="pipe">
+ <source path="/tmp/mypipe"/>
+ <target port="1"/>
+ </serial>
+ </devices>
+ ...</pre>
<h6><a name="elementsCharTCP">TCP client/server</a></h6>
remote server.
</p>
- <pre>
- ...
- <serial type="tcp">
- <source mode="connect" host="0.0.0.0" service="2445"/>
- <protocol type="raw"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<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>
- ...
- <serial type="tcp">
- <source mode="bind" host="127.0.0.1" service="2445"/>
- <protocol type="raw"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<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 telnet instead of raw TCP.
<p>
- <pre>
- ...
- <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>
- ...</pre>
+<pre>
+ ...
+ <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>
<h6><a name="elementsCharUDP">UDP network console</a></h6>
sending and receiving packets. This is a lossy service.
</p>
- <pre>
- ...
- <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>
- ...</pre>
+<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>
accepting connections from local clients.
</p>
- <pre>
- ...
- <serial type="unix">
- <source mode="bind" path="/tmp/foo"/>
- <target port="1"/>
- </serial>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <serial type="unix">
+ <source mode="bind" path="/tmp/foo"/>
+ <target port="1"/>
+ </serial>
+ </devices>
+ ...</pre>
<h4><a name="elementsSound">Sound devices</a></h4>
<code>sound</code> element. <span class="since">Since 0.4.3</span>
</p>
- <pre>
- ...
- <sound model='es1370'/>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <sound model='es1370'/>
+ </devices>
+ ...</pre>
<dl>
<dt><code>sound</code></dt>
libvirt.
</p>
- <pre>
- ...
- <watchdog model='i6300esb'/>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <watchdog model='i6300esb'/>
+ </devices>
+ ...</pre>
- <pre>
- ...
- <watchdog model='i6300esb' action='poweroff'/>
- ...</pre>
+<pre>
+ ...
+ <devices>
+ <watchdog model='i6300esb' action='poweroff'/>
+ </devices>
+</domain></pre>
<dl>
<dt><code>model</code></dt>