Move example XML files into examples/xml

* docs/storage/: Move to examples/xml/storage/
* docs/test*.xml: Move to examples/xml/test/
* docs/Makefile.am: Remove example XML files from dist
* Makefile.am: Add examples/xml to EXTRA_DIST
* tests/virshtest.c: Update for moved test XML
* libvirt.spec.in: Include example XML files as docs
* tests/int-overflow: UPdate for moved XML
This commit is contained in:
Daniel P. Berrange
2009-09-16 19:02:59 +01:00
parent bde4589189
commit 13f59ad733
23 changed files with 8 additions and 11 deletions

View File

@@ -0,0 +1,6 @@
<pool type="dir">
<name>virtimages</name>
<target>
<path>/var/lib/virt/images</path>
</target>
</pool>

View File

@@ -0,0 +1,15 @@
<pool type="fs">
<name>virtimages</name>
<source>
<device path="/dev/VolGroup00/VirtImages"/>
</source>
<target>
<path>/var/lib/virt/images</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
<label>system_u:object_r:xen_image_t:s0</label>
</permissions>
</target>
</pool>

View File

@@ -0,0 +1,9 @@
<pool type="logical">
<name>HostVG</name>
<source>
<device path="/dev/sda1"/>
</source>
<target>
<path>/dev/HostVG</path>
</target>
</pool>

View File

@@ -0,0 +1,16 @@
<pool type="netfs">
<name>virtimages</name>
<source>
<host name="nfs.example.com"/>
<directory path="/var/lib/virt/images"/>
</source>
<target>
<path>/var/lib/virt/images</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
<label>system_u:object_r:xen_image_t:s0</label>
</permissions>
</target>
</pool>

View File

@@ -0,0 +1,10 @@
<volume type="file">
<name>cow.img</name>
<storage>
<allocation>0</allocation>
<capacity unit="T">1</capacity>
</storage>
<target>
<format type="cow"/>
</target>
</volume>

View File

@@ -0,0 +1,10 @@
<volume type="file">
<name>qcow.img</name>
<storage>
<allocation>0</allocation>
<capacity unit="T">1</capacity>
</storage>
<target>
<format type="qcow"/>
</target>
</volume>

View File

@@ -0,0 +1,10 @@
<volume type="file">
<name>qcow2.img</name>
<storage>
<allocation>0</allocation>
<capacity unit="T">1</capacity>
</storage>
<target>
<format type="qcow2"/>
</target>
</volume>

View File

@@ -0,0 +1,7 @@
<volume type="file">
<name>raw.img</name>
<storage>
<allocation unit="M">10</allocation>
<capacity unit="M">1000</capacity>
</storage>
</volume>

View File

@@ -0,0 +1,7 @@
<volume type="file">
<name>sparse.img</name>
<storage>
<allocation>0</allocation>
<capacity unit="T">1</capacity>
</storage>
</volume>

View File

@@ -0,0 +1,10 @@
<volume type="file">
<name>vmdk3.img</name>
<storage>
<allocation>0</allocation>
<capacity unit="T">1</capacity>
</storage>
<target>
<format type="vmdk"/>
</target>
</volume>

View File

@@ -0,0 +1,26 @@
<domain type='test'>
<name>fc4</name>
<uuid>EF86180145B911CB88E3AFBFE5370493</uuid>
<os>
<type>xen</type>
<kernel>/boot/vmlinuz-2.6.15-1.43_FC5guest</kernel>
<initrd>/boot/initrd-2.6.15-1.43_FC5guest.img</initrd>
<root>/dev/sda1</root>
<cmdline> ro selinux=0 3</cmdline>
</os>
<memory>261072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<devices>
<disk type='file'>
<source file='/u/fc4.img'/>
<target dev='sda1'/>
</disk>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='aa:00:00:00:00:11'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
<console tty='/dev/pts/5'/>
</devices>
</domain>

View File

@@ -0,0 +1,42 @@
<domain type='test'>
<name>fv0</name>
<uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<memory>524288</memory>
<maxMemory>1524288</maxMemory>
<vcpu>4</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:5d:c7:9e'/>
<script path='vif-bridge'/>
</interface>
<disk type='file'>
<source file='/root/fv0'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/root/fc5-x86_64-boot.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<disk type='file' device='floppy'>
<source file='/root/fd.img'/>
<target dev='fda'/>
</disk>
<graphics type='vnc' port='5904'/>
</devices>
</domain>

View File

@@ -0,0 +1,11 @@
<network>
<name>default</name>
<uuid>004b96e12d78c30f5aa5f03c87d21e69</uuid>
<bridge name='brdefault'/>
<forward dev='eth0'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.128' end='192.168.122.253'/>
</dhcp>
</ip>
</network>

View File

@@ -0,0 +1,10 @@
<network>
<name>private</name>
<uuid>004b22212d78c30f5aa5f03c87d21e69</uuid>
<bridge name='brpriv'/>
<ip address='192.168.124.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.124.128' end='192.168.124.253'/>
</dhcp>
</ip>
</network>

View File

@@ -0,0 +1,28 @@
<node>
<!-- This file gives an example config for the mock 'test' backend
driver to libvirt. This is intended to allow reliable unit testing
of applications using libvirt. To use this with virsh, run something
like:
virsh -connect test:////path/to/this/dir/testnode.xml nodeinfo
-->
<domain file="testdomfv0.xml"/>
<domain file="testdomfc4.xml"/>
<network file="testnetpriv.xml"/>
<network file="testnetdef.xml"/>
<pool file="testpool.xml">
<volume file="testvol.xml"/>
</pool>
<cpu>
<mhz>6000</mhz>
<model>i986</model>
<active>50</active>
<nodes>4</nodes>
<sockets>4</sockets>
<cores>4</cores>
<threads>2</threads>
</cpu>
<memory>8192000</memory>
</node>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0"?>
<node>
<!-- This file gives an example config for the mock 'test' backend
driver to libvirt. This is intended to allow relible unit testing
of applications using libvirt. To use this with virsh, run something
like:
virsh -connect test:////path/to/this/dir/testnode.xml nodeinfo
-->
<domain type="test">
<name>fv0</name>
<uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev="hd"/>
</os>
<memory>524288</memory>
<maxMemory>1524288</maxMemory>
<vcpu>4</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<interface type="bridge">
<source bridge="xenbr0"/>
<mac address="00:16:3e:5d:c7:9e"/>
<script path="vif-bridge"/>
</interface>
<disk type="file">
<source file="/root/fv0"/>
<target dev="hda"/>
</disk>
<disk type="file" device="cdrom">
<source file="/root/fc5-x86_64-boot.iso"/>
<target dev="hdc"/>
<readonly/>
</disk>
<disk type="file" device="floppy">
<source file="/root/fd.img"/>
<target dev="fda"/>
</disk>
<graphics type="vnc" port="5904"/>
</devices>
</domain>
<domain type="test">
<name>fc4</name>
<uuid>EF86180145B911CB88E3AFBFE5370493</uuid>
<os>
<type>xen</type>
<kernel>/boot/vmlinuz-2.6.15-1.43_FC5guest</kernel>
<initrd>/boot/initrd-2.6.15-1.43_FC5guest.img</initrd>
<root>/dev/sda1</root>
<cmdline> ro selinux=0 3</cmdline>
</os>
<memory>261072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<devices>
<disk type="file">
<source file="/u/fc4.img"/>
<target dev="sda1"/>
</disk>
<interface type="bridge">
<source bridge="xenbr0"/>
<mac address="aa:00:00:00:00:11"/>
<script path="/etc/xen/scripts/vif-bridge"/>
</interface>
<console tty="/dev/pts/5"/>
</devices>
</domain>
<network>
<name>private</name>
<uuid>004b22212d78c30f5aa5f03c87d21e69</uuid>
<bridge name="brpriv"/>
<ip address="192.168.124.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.124.128" end="192.168.124.253"/>
</dhcp>
</ip>
</network>
<network>
<name>default</name>
<uuid>004b96e12d78c30f5aa5f03c87d21e69</uuid>
<bridge name="brdefault"/>
<forward dev="eth0"/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.128" end="192.168.122.253"/>
</dhcp>
</ip>
</network>
<cpu>
<mhz>6000</mhz>
<model>i986</model>
<active>50</active>
<nodes>4</nodes>
<sockets>4</sockets>
<cores>4</cores>
<threads>2</threads>
</cpu>
<memory>8192000</memory>
</node>

View File

@@ -0,0 +1,15 @@
<pool type='dir'>
<name>default-pool</name>
<uuid>35bb2ad9-388a-cdfe-461a-b8907f6e53fe</uuid>
<capacity>107374182400</capacity>
<allocation>0</allocation>
<available>107374182400</available>
<target>
<path>/default-pool</path>
<permissions>
<mode>0700</mode>
<owner>10736</owner>
<group>10736</group>
</permissions>
</target>
</pool>

View File

@@ -0,0 +1,6 @@
<volume>
<name>default-vol</name>
<capacity>1000000</capacity>
<allocation>50000</allocation>
<target/>
</volume>