[libvirt] """virsh schedinfo [--weight number] domain""" doesn't work with virsh(libxl) for managing Xen domains.

Hi Devs, We're using Centos 7 Xen hypervisors and try to use Libvirt(libxl) for managing Xen guest domains. We noticed that we can't set cpu weight values for Xen domains with libvirt (tested for libvirt v.1.3 and v.2.2) even though its possible to do with XL toolkit. [root@hv1xen ~]# virsh schedinfo --domain rtp6a88apsm3or --cap=5 Scheduler : credit weight : 1000 [root@hv1xen ~]# virsh schedinfo --domain rtp6a88apsm3or --weight=50 Scheduler : credit error: invalid scheduler option: weight We noticed in documentation for 'virsh' like this https://linux.die.net/man/1/virsh that the cpu weight option is going to be deprecated: *"""Note*: The weight and cap parameters are defined only for the XEN_CREDIT scheduler and are now *DEPRECATED* . """ Can you please clarify why it's been deprecated and what should be used instead for scheduling and limitation of CPU for Xen domains with Libvirt? We like Libvirt very much and don't want to apply some awkward workarounds like simultaneous using Libvirt and XL toolkit. Any suggestion here? Thanks.

On 09/27/2016 03:27 AM, Volo M. wrote:
Hi Devs,
We're using Centos 7 Xen hypervisors and try to use Libvirt(libxl) for managing Xen guest domains. We noticed that we can't set cpu weight values for Xen domains with libvirt (tested for libvirt v.1.3 and v.2.2) even though its possible to do with XL toolkit. [root@hv1xen ~]# virsh schedinfo --domain rtp6a88apsm3or --cap=5 Scheduler : credit weight : 1000 [root@hv1xen ~]# virsh schedinfo --domain rtp6a88apsm3or --weight=50 Scheduler : credit error: invalid scheduler option: weight
Thanks for the report. That is a bug in the libvirt libxl driver. I've sent a patch to fix it https://www.redhat.com/archives/libvir-list/2016-September/msg01284.html
We noticed in documentation for 'virsh' like this https://linux.die.net/man/1/virsh that the cpu weight option is going to be deprecated: *"""Note*: The weight and cap parameters are defined only for the XEN_CREDIT scheduler and are now /DEPRECATED/ . """
That "note" is bogus and was incorrectly introduced all the way back in Oct 2008 via commit 6c504d6a. Even today, the default scheduler in Xen is credit and it supports setting cap and weight. I'll send a doc patch to remove the "and are now deprecated". Regards, Jim
participants (2)
-
Jim Fehlig
-
Volo M.