[sheepdog-users] [Sheepdog][Libvirt]Boot VMs from sheepdog volumes error

Eric Blake eblake at redhat.com
Fri Feb 1 17:49:14 CET 2013

On 02/01/2013 04:08 AM, harryxiyou wrote:
> Hi all,
> I wanna boot VMs from sheepdog volumes so i do according to
> https://github.com/collie/sheepdog/wiki/Libvirt
> However, some errors happened to me like following.
> $ ./virsh create os.xml
> error:create domain from os.xml failure
> error:(domain_definition):14: Premature end of data in tag domain line 1
> (null)
> ^

That says your <domain> tag is incomplete.  Sure enough...

> $ cat os.xml
> <domain type='qemu'>

You opened it...

> <name>testvm</name>
> <memory>1048576</memory>
> <os>
> <type arch='x86_64'>hvm</type>
> </os>
> <devices>
> <disk type='network'>
> <source protocol="sheepdog" name="testvdi"/>
> <target dev='hda' bus='ide'/>
> </disk>
> <graphics type='vnc' port='-1' autoport='yes'/>
> </devices>

...but never closed it with </domain>.

> Could anyone give me some help? Thanks.

Rather than writing XML by hand from scratch, I highly recommend using a
higher level program like virt-manager to create a scratch VM, and then
use 'virsh edit' to hand tune the resulting XML.  That way, you are less
likely to forget something essential, and will at least have the benefit
of seeing how libvirt indents constructs rather than struggling to
visually pick out the indentation with everything starting on the first

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://lists.wpkg.org/pipermail/sheepdog-users/attachments/20130201/9c3fc052/attachment-0003.sig>

More information about the sheepdog-users mailing list