I'm using libvirt's
virsh vol-create command to create multiple volumes. I've started using Jinja2 templates to help with automating the task for a specific application. In my case, it would help simplify things for me if I could use the looping feature of Jinja2 to create multiple "<volume>" sections in a single XML file. However, generally speaking, XML requires a single top-level tag to be defined (not multiple of the same) and besides this
virsh vol-create gives me an error anyway:
$ virsh vol-create default volumes.xml error: Failed to create vol from volumes.xml error: (storage_volume_definition):16: Extra content at the end of the document <volume> ^
(file contents are here)
Is it possible to put multiple "<volume>" definitions in the same XML file?