Re: how to adjust the value passed by xml dynamicly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07.02.2014 09:06, yue wrote:
hi,all
we can pass value throught xml when start vm.  how to adjust the value
dynamicly as needed  while vm is running via API calls?
for example , change from
  <filterref filter='hcount'>
         <parameter name='HC' value='6'/>
         <parameter name='HC' value='10'/>
       </filterref>
to
<filterref filter='hcount'>
<parameter name='HC' value='16'/>
<parameter name='HC' value='20'/>
</filterref>
i do not want to restart or interrupt  the running state of vms(via api,
not command line tools).


These (or any other values) can be changed byt re-defining the domain again:

char *xml = virDomainGetXMLDesc();
/* change the desired values in @xml */
virDomainDefine(conn, xml);
free(xml);


However, this works only on 'config' level - the changes will be applied the next time domain is started.

For a runtime change, maybe you can use virDomainUpdateDeviceFlags() but I haven't try if it works with <filterref/>.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]