[libvirt-users] how to change existing domain xml?

p-man314 at mail.ru p-man314 at mail.ru
Wed Jan 25 20:07:15 UTC 2012


Matthias Bolte пишет:
> 2012/1/24  <p-man314 at mail.ru>:
>   
>> Hi.
>>
>> I'm trying to change network settings for a domain via libvirt (the driver
>> is xenapi) with no success.
>>
>> According to its sources, 'virsh edit' uses virDomainGetXMLDesc(), allows to
>> edit the received xml and then use virDomainDefineXML(). In case of xenapi
>> driver it leads to a new vm creation (with the same name and edited
>> settings).
>>     
>
> virDomainDefineXML is the right API function. The problem is that the
> XenAPI driver currently has a bug here. It should check (via UUID and
> name) if the domain XML refers to an existing domain and update this
> domain or the if the given domain XML doesn't refer to an existing
> domain and define a new one instead.
>
> The XenAPI driver does not check this and always defines a new domain.
>
> So unfortunately you cannot edit the config of an existing domain
> until this bug is fixed,
>   
Thank you for your explanations. Could you please provide a reference to
this bug in the bugzilla?
> You might be able to workaround this bug by undefining the domain
> first and then redefining it.
>
>   

Unfortunately undefining and redefining destroys storage of a vm, at
least with xenapi.




More information about the libvirt-users mailing list