Allow root directory in filesystem source dir schema

Use absDirPath instead of absFilePath.

https://bugzilla.redhat.com/show_bug.cgi?id=1028107
This commit is contained in:
Ján Tomko 2013-11-07 18:14:32 +01:00
parent b2f31af701
commit eab51940bd
5 changed files with 36 additions and 2 deletions

View File

@ -1679,7 +1679,7 @@
<interleave> <interleave>
<element name="source"> <element name="source">
<attribute name="dir"> <attribute name="dir">
<ref name="absFilePath"/> <ref name="absDirPath"/>
</attribute> </attribute>
<empty/> <empty/>
</element> </element>
@ -1697,7 +1697,7 @@
<interleave> <interleave>
<element name="source"> <element name="source">
<attribute name="dir"> <attribute name="dir">
<ref name="absFilePath"/> <ref name="absDirPath"/>
</attribute> </attribute>
<empty/> <empty/>
</element> </element>

View File

@ -14,6 +14,10 @@
<on_crash>destroy</on_crash> <on_crash>destroy</on_crash>
<devices> <devices>
<emulator>/usr/libexec/libvirt_lxc</emulator> <emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='bind'>
<source dir='/'/>
<target dir='/'/>
</filesystem>
<filesystem type='ram'> <filesystem type='ram'>
<source usage='1048576'/> <source usage='1048576'/>
<target dir='/mnt/mississippi'/> <target dir='/mnt/mississippi'/>

View File

@ -0,0 +1,25 @@
<domain type='lxc'>
<name>demo</name>
<uuid>8369f1ac-7e46-e869-4ca5-759d51478066</uuid>
<memory unit='KiB'>500000</memory>
<currentMemory unit='KiB'>500000</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64'>exe</type>
<init>/bin/sh</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/'/>
<target dir='/'/>
</filesystem>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
</domain>

View File

@ -14,6 +14,10 @@
<on_crash>destroy</on_crash> <on_crash>destroy</on_crash>
<devices> <devices>
<emulator>/usr/libexec/libvirt_lxc</emulator> <emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='bind' accessmode='passthrough'>
<source dir='/'/>
<target dir='/'/>
</filesystem>
<filesystem type='ram' accessmode='passthrough'> <filesystem type='ram' accessmode='passthrough'>
<source usage='1048576' units='KiB'/> <source usage='1048576' units='KiB'/>
<target dir='/mnt/mississippi'/> <target dir='/mnt/mississippi'/>

View File

@ -137,6 +137,7 @@ mymain(void)
DO_TEST("hostdev"); DO_TEST("hostdev");
DO_TEST("disk-formats"); DO_TEST("disk-formats");
DO_TEST_DIFFERENT("filesystem-ram"); DO_TEST_DIFFERENT("filesystem-ram");
DO_TEST("filesystem-root");
virObjectUnref(caps); virObjectUnref(caps);
virObjectUnref(xmlopt); virObjectUnref(xmlopt);