Skip to content

Instantly share code, notes, and snippets.

@gtt116
Last active July 12, 2016 06:10
Show Gist options
  • Save gtt116/bf33380d624101d5cf11 to your computer and use it in GitHub Desktop.
Save gtt116/bf33380d624101d5cf11 to your computer and use it in GitHub Desktop.
OpenStack Qemu domain XML file example
<emulator>/usr/bin/kvm</emulator>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='457eb676-33da-42ec-9a8c-9293d545c337'/>
</auth>
<source protocol='rbd' name='netbeta-vms/ecb16c09-277c-4b0b-927e-2baae90cd558_disk'>
<host name='10.180.0.47' port='6789'/>
<host name='10.180.0.48' port='6789'/>
</source>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='457eb676-33da-42ec-9a8c-9293d545c337'/>
</auth>
<source protocol='rbd' name='netbeta-vms/ecb16c09-277c-4b0b-927e-2baae90cd558_disk.config'>
<host name='10.180.0.47' port='6789'/>
<host name='10.180.0.48' port='6789'/>
</source>
<backingStore/>
<target dev='vdz' bus='virtio'/>
<readonly/>
<alias name='virtio-disk25'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
<domain type='kvm' id='609'>
<name>instance-0000133d</name>
<uuid>8f0538ba-9d3c-4b9d-80eb-5c60a8c39550</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static' cpuset='4-63'>1</vcpu>
<sysinfo type='smbios'>
<system>
<entry name='manufacturer'>OpenStack Foundation</entry>
<entry name='product'>OpenStack Nova</entry>
<entry name='version'>2013.2-netease.2.1.3</entry>
<entry name='serial'>44454c4c-5600-1034-8047-b6c04f433358</entry>
<entry name='uuid'>8f0538ba-9d3c-4b9d-80eb-5c60a8c39550</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu mode='host-model'>
<model fallback='allow'/>
</cpu>
<clock offset='utc'>
<timer name='pit' tickpolicy='delay'/>
<timer name='rtc' tickpolicy='catchup'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/data/nova/instances/8f0538ba-9d3c-4b9d-80eb-5c60a8c39550/disk'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/mapper/ebsdisk01_59a874680fbc4fa0b2737bbd76c8c140_66529d85-c31_4041583641'/>
<target dev='vdd' bus='virtio'/>
<serial>66529d85-c31</serial>
<alias name='virtio-disk3'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<interface type='bridge'>
<mac address='fa:16:3e:5a:0b:b4'/>
<source bridge='br100'/>
<target dev='vnet8'/>
<model type='virtio'/>
<filterref filter='nova-instance-instance-0000133d-fa163e5a0bb4'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='file'>
<source path='/data/nova/instances/8f0538ba-9d3c-4b9d-80eb-5c60a8c39550/console.log'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<serial type='pty'>
<source path='/dev/pts/10'/>
<target port='1'/>
<alias name='serial1'/>
</serial>
<console type='file'>
<source path='/data/nova/instances/8f0538ba-9d3c-4b9d-80eb-5c60a8c39550/console.log'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='tablet' bus='usb'>
<alias name='input0'/>
</input>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5908' autoport='yes' listen='10.180.0.16' keymap='en-us'>
<listen type='address' address='10.180.0.16'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
<seclabel type='none'/>
</domain>
<domain type="kvm">
<uuid>96e8fa98-365a-4172-96a2-33437c4c984e</uuid>
<name>instance-00003ac2</name>
<memory>1048576</memory>
<vcpu cpuset="4-23">1</vcpu>
<sysinfo type="smbios">
<system>
<entry name="manufacturer">OpenStack Foundation</entry>
<entry name="product">OpenStack Nova</entry>
<entry name="version">2013.2-netease.461</entry>
<entry name="serial">4c573876-6ff1-11e1-8f7b-3440b5db35b0</entry>
<entry name="uuid">96e8fa98-365a-4172-96a2-33437c4c984e</entry>
</system>
</sysinfo>
<blkiotune>
<device>
<path>/dev/sda</path>
<weight>100</weight>
</device>
</blkiotune>
<os>
<type>hvm</type>
<boot dev="hd"/>
<smbios mode="sysinfo"/>
<entry name="serial">4c573876-6ff1-11e1-8f7b-3440b5db35b0</entry>
<entry name="uuid">96e8fa98-365a-4172-96a2-33437c4c984e</entry>
</system>
</sysinfo>
<blkiotune>
<device>
<path>/dev/sda</path>
<weight>100</weight>
</device>
</blkiotune>
<os>
<type>hvm</type>
<boot dev="hd"/>
<smbios mode="sysinfo"/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cputune>
<shares>2048</shares>
<quota>82500</quota>
<period>100000</period>
</cputune>
<clock offset="utc">
<timer name="pit" tickpolicy="delay"/>
<timer name="rtc" tickpolicy="catchup"/>
</clock>
<cpu mode="host-model" match="exact"/>
<devices>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/store/1/vpe/iso/CentOS-6.5-x86_64-bin-DVD1.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/data/nova/instances/96e8fa98-365a-4172-96a2-33437c4c984e/disk"/>
<target bus="virtio" dev="vda"/>
</disk>
<interface type="bridge">
<mac address="fa:16:3e:38:94:bb"/>
<model type="virtio"/>
<source bridge="br-int"/>
<target dev="tapba7b4aac-f6"/>
<virtualport type="openvswitch">
<parameters interfaceid="ba7b4aac-f6a5-4d98-bd9d-f3ce95991d3f"/>
</virtualport>
</interface>
<serial type="file">
<source path="/data/nova/instances/96e8fa98-365a-4172-96a2-33437c4c984e/console.log"/>
</serial>
<serial type="pty"/>
<input type="tablet" bus="usb"/>
<graphics type="vnc" autoport="yes" keymap="en-us" listen="10.180.0.24"/>
</devices>
</domain>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment