+1 from me.

Best,
Regards

Daisy (˹)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol@cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203


libvirt-cim-bounces@redhat.com wrote on 2008-10-30 07:17:41:

> # HG changeset patch
> # User Kaitlin Rupert <karupert@us.ibm.com>
> # Date 1225321849 25200
> # Node ID 3fe31c4399cc4b4df264013f612926361fd9b20d
> # Parent  3648a3f070f319d031110c8dba89ab5a47e90363
> [TEST] #2 Fix cim_define() for LXC
>
> For LXC guests, don't supply a value for vcpu when creating a ProcRASD.
> The VirtualQuantity attribute isn't valid for containers guests.
>
> Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
>
> diff -r 3648a3f070f3 -r 3fe31c4399cc suites/libvirt-cim/lib/XenKvmLib/vsms.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py   Fri Oct 10 13:03:572008 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py   Wed Oct 29 16:10:492008 -0700
> @@ -174,7 +174,7 @@
>      pass
>  
>  class CIM_ProcResourceAllocationSettingData(CIMClassMOF):
> -    def __init__(self, vcpu, name, weight=None, limit=None):
> +    def __init__(self, name, vcpu=None, weight=None, limit=None):
>          self.ResourceType = RASD_TYPE_PROC
>          
>          if vcpu != None:
> diff -r 3648a3f070f3 -r 3fe31c4399cc suites/libvirt-cim/lib/XenKvmLib/vxml.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py   Fri Oct 10 13:03:572008 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py   Wed Oct 29 16:10:492008 -0700
> @@ -472,7 +472,10 @@
>                                                mac=net_mac,
>                                                name=dom_name,
>                                                virt_net=net_name)
> -        self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name)
> +        if virt == 'LXC':
> +            self.pasd = vsms.get_pasd_class(virt)(name=dom_name)
> +        else:
> +            self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name)
>          self.masd = vsms.get_masd_class(virt)(megabytes=mem,
>                                                mallocunits=mem_allocunits,
>                                                name=dom_name)
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim