From: Matthias Bolte General metadata
-
- <domain type='xen' id='3'>
- <name>fv0</name>
- <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
- ...
+
+<domain type='xen' id='3'>
+ <name>fv0</name>
+ <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
+ ...
name
- ... - <os> - <type>hvm</type> - <loader>/usr/lib/xen/boot/hvmloader</loader> - <boot dev='hd'/> - </os> - ...+
+ ... + <os> + <type>hvm</type> + <loader>/usr/lib/xen/boot/hvmloader</loader> + <boot dev='hd'/> + </os> + ...
type
pygrub
with Xen.
- - ... - <bootloader>/usr/bin/pygrub</bootloader> - <bootloader_args>--append single</bootloader_args> - ...+
+ ... + <bootloader>/usr/bin/pygrub</bootloader> + <bootloader_args>--append single</bootloader_args> + ...
bootloader
- ... - <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> - ...+
+ ... + <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> + ...
type
- ... - <memory>524288</memory> - <currentMemory>524288</currentMemory> - <memoryBacking> - <hugepages/> - </memoryBacking> - <vcpu>1</vcpu> - ...+
+ ... + <memory>524288</memory> + <currentMemory>524288</currentMemory> + <memoryBacking> + <hugepages/> + </memoryBacking> + <vcpu>1</vcpu> + ...
memory
- ... - <cpu match='exact'> - <model>core2duo</model> - <topology sockets='1' cores='2' threads='1'/> - <feature policy='disable' name='lahf_lm'/> - </cpu> - ...+
+ ... + <cpu match='exact'> + <model>core2duo</model> + <topology sockets='1' cores='2' threads='1'/> + <feature policy='disable' name='lahf_lm'/> + </cpu> + ...
In case no restrictions need to be put on CPU model and its features, a @@ -224,12 +224,12 @@ Since 0.7.6
-- ... - <cpu> - <topology sockets='1' cores='2' threads='1'/> - </cpu> - ...+
+ ... + <cpu> + <topology sockets='1' cores='2' threads='1'/> + </cpu> + ...
cpu
- ... - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>restart</on_crash> - ...+
+ ... + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + ...
on_poweroff
- ... - <features> - <pae/> - <acpi/> - <apic/> - </features> - ...+
+ ... + <features> + <pae/> + <acpi/> + <apic/> + </features> + ...
All features are listed within the features
@@ -386,10 +386,10 @@
it to be in so called 'localtime'.
- ... - <clock offset="localtime"/> - ...+
+ ... + <clock offset="localtime"/> + ...
clock
- ... - <devices> - <emulator>/usr/lib/xen/bin/qemu-dm</emulator> - ...+
+ ... + <devices> + <emulator>/usr/lib/xen/bin/qemu-dm</emulator> + </devices> + ...
emulator
- ... - <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> + <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> + ...
disk
- ... - <hostdev mode='subsystem' type='usb'> - <source> - <vendor id='0x1234'/> - <product id='0xbeef'/> - </source> - </hostdev> - ...+
+ ... + <devices> + <hostdev mode='subsystem' type='usb'> + <source> + <vendor id='0x1234'/> + <product id='0xbeef'/> + </source> + </hostdev> + </devices> + ...+
or:
-- ... - <hostdev mode='subsystem' type='pci'> - <source> - <address bus='0x06' slot='0x02' function='0x0'/> - </source> - </hostdev> - ...+ +
+ ... + <devices> + <hostdev mode='subsystem' type='pci'> + <source> + <address bus='0x06' slot='0x02' function='0x0'/> + </source> + </hostdev> + </devices> + ...
hostdev
- ... - <interface type='bridge'> - <source bridge='xenbr0'/> - <mac address='00:16:3e:5d:c7:9e'/> - <script path='vif-bridge'/> - </interface> - ...+
+ ... + <devices> + <interface type='bridge'> + <source bridge='xenbr0'/> + <mac address='00:16:3e:5d:c7:9e'/> + <script path='vif-bridge'/> + </interface> + </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> + <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> + ...
- ... - <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> + <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> + ...
- ... - <interface type='user'/> - ... - <interface type='user'> - <mac address="11:22:33:44:55:66"/> - </interface> - ...+
+ ... + <devices> + <interface type='user'/> + ... + <interface type='user'> + <mac address="11:22:33:44:55:66"/> + </interface> + </devices> + ...
- ... - <interface type='ethernet'/> - ... - <interface type='ethernet'> - <target dev='vnet7'/> - <script path='/etc/qemu-ifup-mynet'/> - </interface> - ...+
+ ... + <devices> + <interface type='ethernet'/> + ... + <interface type='ethernet'> + <target dev='vnet7'/> + <script path='/etc/qemu-ifup-mynet'/> + </interface> + </devices> + ...
- ... - <interface type='mcast'> - <source address='230.0.0.1' port='5558'/> - </interface> - ...+
+ ... + <devices> + <interface type='mcast'> + <source address='230.0.0.1' port='5558'/> + </interface> + </devices> + ...
- ... - <interface type='server'> - <source address='192.168.0.1' port='5558'/> - </interface> - ... - <interface type='client'> ++ ... + <devices> + <interface type='server'> <source address='192.168.0.1' port='5558'/> - </interface> - ...+ </interface> + ... + <interface type='client'> + <source address='192.168.0.1' port='5558'/> + </interface> + </devices> + ...
- ... - <interface type='network'> - <source network='default'/> - <target dev='vnet1'/> - <model type='ne2k_pci'/> - </interface> - ...+
+ ... + <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 @@ -757,13 +782,15 @@ qemu-kvm -net nic,model=? /dev/null
- ... - <interface type='network'> - <source network='default'/> - <target dev='vnet1'/> - </interface> - ...+
+ ... + <devices> + <interface type='network'> + <source network='default'/> + <target dev='vnet1'/> + </interface> + </devices> + ...
If no target is specified, certain hypervisors will automatically @@ -783,10 +810,12 @@ qemu-kvm -net nic,model=? /dev/null to provide a graphics tablet for absolute cursor movement.
-- ... - <input type='mouse' bus='usb'/> - ...+
+ ... + <devices> + <input type='mouse' bus='usb'/> + </devices> + ...
input
- ... - <graphics type='sdl' display=':0.0'/> - <graphics type='vnc' port='5904'/> - <graphics type='rdp' autoport='yes' multiUser='yes' /> - <graphics type='desktop' fullscreen='yes'/> - ...+
+ ... + <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> + ...
graphics
- ... - <video> - <model type='vga' vram='8192' heads='1'> - <acceleration accel3d='yes' accel3d='yes'/> - </model> - </video> - ...+
+ ... + <devices> + <video> + <model type='vga' vram='8192' heads='1'> + <acceleration accel3d='yes' accel3d='yes'/> + </model> + </video> + </devices> + ...
video
- ... - <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>+
+ ... + <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> + ...
In each of these directives, the top-level element name (parallel, serial, @@ -949,13 +983,15 @@ qemu-kvm -net nic,model=? /dev/null
- ... - <parallel type='pty'> - <source path='/dev/pts/2'/> - <target port='0'/> - </parallel> - ...+
+ ... + <devices> + <parallel type='pty'> + <source path='/dev/pts/2'/> + <target port='0'/> + </parallel> + </devices> + ...
target
can have a port
attribute, which
@@ -965,13 +1001,15 @@ qemu-kvm -net nic,model=? /dev/null
- ... - <serial type='pty'> - <source path='/dev/pts/3'/> - <target port='0'/> - </serial> - ...+
+ ... + <devices> + <serial type='pty'> + <source path='/dev/pts/3'/> + <target port='0'/> + </serial> + </devices> + ...
target
can have a port
attribute, which
@@ -987,13 +1025,15 @@ qemu-kvm -net nic,model=? /dev/null
virtualized guests without a paravirtualized console.
- ... - <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> + </devices> + ...
If the console is presented as a serial port, the target
@@ -1008,13 +1048,15 @@ qemu-kvm -net nic,model=? /dev/null
guest.
- ... - <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> + </devices> + ...
This can be implemented in a variety of ways. The specific type of @@ -1045,12 +1087,14 @@ qemu-kvm -net nic,model=? /dev/null into the virtual machine's logfile
-- ... - <console type='stdio'> - <target port='1'> - </console> - ...+
+ ... + <devices> + <console type='stdio'> + <target port='1'> + </console> + </devices> + ...
- ... - <serial type="file"> - <source path="/var/log/vm/vm-serial.log"/> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type="file"> + <source path="/var/log/vm/vm-serial.log"/> + <target port="1"/> + </serial> + </devices> + ...
- ... - <serial type='vc'> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type='vc'> + <target port="1"/> + </serial> + </devices> + ...
- ... - <serial type='null'> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type='null'> + <target port="1"/> + </serial> + </devices> + ...
- ... - <serial type="pty"> - <source path="/dev/pts/3"/> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type="pty"> + <source path="/dev/pts/3"/> + <target port="1"/> + </serial> + </devices> + ...
NB special case if <console type='pty'>, then the TTY @@ -1130,13 +1182,15 @@ qemu-kvm -net nic,model=? /dev/null port.
-- ... - <serial type="dev"> - <source path="/dev/ttyS0"/> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type="dev"> + <source path="/dev/ttyS0"/> + <target port="1"/> + </serial> + </devices> + ...
- ... - <serial type="pipe"> - <source path="/tmp/mypipe"/> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type="pipe"> + <source path="/tmp/mypipe"/> + <target port="1"/> + </serial> + </devices> + ...
- ... - <serial type="tcp"> - <source mode="connect" host="0.0.0.0" service="2445"/> - <protocol type="raw"/> - <target port="1"/> - </serial> - ...+
+ ... + <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.
-- ... - <serial type="tcp"> - <source mode="bind" host="127.0.0.1" service="2445"/> - <protocol type="raw"/> - <target port="1"/> - </serial> - ...+
+ ... + <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 of raw TCP.
-
- ... - <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="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="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> + <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> + ...
- ... - <serial type="unix"> - <source mode="bind" path="/tmp/foo"/> - <target port="1"/> - </serial> - ...+
+ ... + <devices> + <serial type="unix"> + <source mode="bind" path="/tmp/foo"/> + <target port="1"/> + </serial> + </devices> + ...
sound
element. Since 0.4.3
- - ... - <sound model='es1370'/> - ...+
+ ... + <devices> + <sound model='es1370'/> + </devices> + ...
sound
- ... - <watchdog model='i6300esb'/> - ...+
+ ... + <devices> + <watchdog model='i6300esb'/> + </devices> + ...-
- ... - <watchdog model='i6300esb' action='poweroff'/> - ...+
+ ... + <devices> + <watchdog model='i6300esb' action='poweroff'/> + </devices> +</domain>
model