[libvirt] [Sheepdog][Libvirt]Boot VMs from sheepdog volumes error

harryxiyou harryxiyou at gmail.com
Fri Feb 1 17:22:10 UTC 2013


On Sat, Feb 2, 2013 at 12:49 AM, Eric Blake <eblake at redhat.com> wrote:
> 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>.
>

A stupid mistake. Thanks for your reminder ;-)

[...]
> 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
> column.
>

Thanks, i will.



-- 
Thanks
Harry Wei




More information about the libvir-list mailing list