[libvirt-users] Changing QoS on-the-fly

Hi all, it's possible to change/add the QoS settings for a running domain? I edited the domain definition with virsh but it seems to have no effect until I shut down the domain. libvirt version 0.9.13 kvm-qemu version 1.2.0 Best, Davide.

On 02/13/2013 04:17 AM, Davide Guerri wrote:
Hi all, it's possible to change/add the QoS settings for a running domain?
I edited the domain definition with virsh but it seems to have no effect until I shut down the domain.
You are correct that 'virsh edit' only affects the next boot of a guest; to change parameters on the fly, you have to use hotplug commands. Which particular QoS settings in the XML are you trying to change, so I can point out which virsh command is the hotplug for that setting? For example, 'virsh memtune' can be used to hotplug in new values for the <memtune> XML element. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 13/feb/2013, at 14:53, Eric Blake <eblake@redhat.com> wrote:
On 02/13/2013 04:17 AM, Davide Guerri wrote:
Which particular QoS settings in the XML are you trying to change, so I can point out which virsh command is the hotplug for that setting? For example, 'virsh memtune' can be used to hotplug in new values for the <memtune> XML element.
bandwidth, inbound and outbound Thanks! D.

On 13.02.2013 14:55, Davide Guerri wrote:
On 13/feb/2013, at 14:53, Eric Blake <eblake@redhat.com> wrote:
On 02/13/2013 04:17 AM, Davide Guerri wrote:
Which particular QoS settings in the XML are you trying to change, so I can point out which virsh command is the hotplug for that setting? For example, 'virsh memtune' can be used to hotplug in new values for the <memtune> XML element.
bandwidth, inbound and outbound
Thanks!
D.
I haven't gone through the code to tell for sure, but for now you can only set the network part of QoS (via virsh net-update) while the domain's interface is not supported yet. However, patches are welcome :) Michal

I've just found this: domiftune domain interface-device [[--config] [--live] | [--current]] [--inbound average,peak,burst] [--outbound average,peak,burst] Set or query the domain's network interface's bandwidth parameters. interface-device can be the interface's target name (<target dev='name'/>), or the MAC address. If no --inbound or --outbound is specified, this command will query and show the bandwidth settings. Otherwise, it will set the inbound or outbound bandwidth. average,peak,burst is the same as in command attach-interface. If --live is specified, affect a running guest. If --config is specified, affect the next boot of a persistent guest. If --current is specified, affect the current guest state. Both --live and --current flags may be given, but --current is exclusive. If no flag is specified, behavior is different depending on hypervisor. I'm gonna try it. I thought the edit command was to perform on-the-fly editing of VMs I should have read the manual :) On 13/feb/2013, at 14:58, Michal Privoznik <mprivozn@redhat.com> wrote:
On 13.02.2013 14:55, Davide Guerri wrote:
On 13/feb/2013, at 14:53, Eric Blake <eblake@redhat.com> wrote:
On 02/13/2013 04:17 AM, Davide Guerri wrote:
Which particular QoS settings in the XML are you trying to change, so I can point out which virsh command is the hotplug for that setting? For example, 'virsh memtune' can be used to hotplug in new values for the <memtune> XML element.
bandwidth, inbound and outbound
Thanks!
D.
I haven't gone through the code to tell for sure, but for now you can only set the network part of QoS (via virsh net-update) while the domain's interface is not supported yet. However, patches are welcome :)
Michal
participants (4)
-
Davide Guerri
-
Davide Guerri
-
Eric Blake
-
Michal Privoznik