Hide Forgot
Description of problem: In the below link : From the section Target Elements it is mentioned that http://libvirt.org/formatstorage.html path Provides the location at which the volume can be accessed on the local filesystem, as an absolute path. This is a readonly attribute, so shouldn't be specified when creating a volume. If we specify the path and other parameters it still works properly instead of throwing error. virsh pool-dumpxml guest_images_disk <pool type='disk'> <name>guest_images_disk</name> <uuid>69ff269b-a6b8-4cf9-9b6a-4b564bf436dc</uuid> <capacity unit='bytes'>16106110464</capacity> <allocation unit='bytes'>1073741824</allocation> <available unit='bytes'>13958609408</available> <source> <device path='/dev/sdd'> <freeExtent start='17408' end='2147501056'/> <freeExtent start='3221242880' end='4294984704'/> <freeExtent start='5368726528' end='16106110464'/> </device> <format type='gpt'/> </source> <target> <path>/dev</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> virsh vol-create --pool guest_images_disk vol1.xml vol1.xml ----------------------------------------------- <volume> <name>vol1_in_pool</name> <key>/1.qcow2</key> <source> </source> <capacity unit='bytes'>1073741824</capacity> <allocation unit='bytes'>143360</allocation> <target> <path>/dev/sdd8</path> <permissions> <mode>0644</mode> <owner>0</owner> <group>0</group> </permissions> <timestamps> <atime>1379313090.538768450</atime> <mtime>1379313090.538768450</mtime> <ctime>1379313090.538768450</ctime> </timestamps> </target> </volume> -------------------------------------------------
Lots of XML bits work like that, for better or worse; if the parameter isn't something the XML parser reads, then it's silently ignored. I doubt we will ever fix this pattern