aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Wiedenroth <wiedi@frubar.net>2012-07-18 20:06:58 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-07-18 20:08:27 +0100
commit29bc4fe6460d80c2aca1b90e54faed1431efcfa7 (patch)
tree3398d4307271f7c22e9dc5e62b0525ea712f0ec7 /tests/storagevolxml2xmlin
parentMount all tmpfs filesystems with correct SELinux label (diff)
downloadlibvirt-29bc4fe6460d80c2aca1b90e54faed1431efcfa7.tar.gz
libvirt-29bc4fe6460d80c2aca1b90e54faed1431efcfa7.tar.bz2
libvirt-29bc4fe6460d80c2aca1b90e54faed1431efcfa7.zip
Add a sheepdog backend for the storage driver
This patch brings support to manage sheepdog pools and volumes to libvirt. It uses the "collie" command-line utility that comes with sheepdog for that. A sheepdog pool in libvirt maps to a sheepdog cluster. It needs a host and port to connect to, which in most cases is just going to be the default of localhost on port 7000. A sheepdog volume in libvirt maps to a sheepdog vdi. To create one specify the pool, a name and the capacity. Volumes can also be resized later. In the volume XML the vdi name has to be put into the <target><path>. To use the volume as a disk source for virtual machines specify the vdi name as "name" attribute of the <source>. The host and port information from the pool are specified inside the host tag. <disk type='network'> ... <source protocol="sheepdog" name="vdi_name"> <host name="localhost" port="7000"/> </source> </disk> To work right this patch parses the output of collie, so it relies on the raw output option. There recently was a bug which caused size information to be reported wrong. This is fixed upstream already and will be in the next release. Signed-off-by: Sebastian Wiedenroth <wiedi@frubar.net>
Diffstat (limited to 'tests/storagevolxml2xmlin')
-rw-r--r--tests/storagevolxml2xmlin/vol-sheepdog.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/storagevolxml2xmlin/vol-sheepdog.xml b/tests/storagevolxml2xmlin/vol-sheepdog.xml
new file mode 100644
index 000000000..49e221ca5
--- /dev/null
+++ b/tests/storagevolxml2xmlin/vol-sheepdog.xml
@@ -0,0 +1,10 @@
+<volume>
+ <name>test2</name>
+ <source>
+ </source>
+ <capacity unit='bytes'>1024</capacity>
+ <allocation unit='bytes'>0</allocation>
+ <target>
+ <path>sheepdog:test2</path>
+ </target>
+</volume>