<div dir="ltr">Hi Peeyush,<div><br>If we want to pin vcpu1 of a domain to CPUs 3 and 4, we need to pass:</div><div><br></div><div>dom.pinVcpu(1, (False, False, False, True, True, False....[and so on, til number of logical CPUs of host]))<br>
<br>Can you please check this?<br><br>Regards,<br>Saurabh Deochake</div><div>[NTT DATA]<br><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 19, 2013 at 11:45 AM, Peeyush Gupta <span dir="ltr"><<a href="mailto:gpeeyush@ymail.com" target="_blank">gpeeyush@ymail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif">
<div style="font-family:'times new roman','new york',times,serif;font-size:12pt"><span>Hi all,</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">
<span><br></span></div><div style="background-color:transparent"><span><div style="background-color:transparent">I am working with libvirt and I am trying to set cpu affinity. Now I can always use </div><div style="background-color:transparent">
<br></div><div style="background-color:transparent">    virsh vcpupin <domain_name> <vcpu> <pcpu></div><div style="background-color:transparent"><br></div><div style="background-color:transparent">to pin vcpus to pcpus. I want to do it using Python API. Now, there is function
 pinVcpu which is supposed to do that. But this is not working. For example I gave </div><div style="background-color:transparent"><br></div><div style="background-color:transparent">    dom.pinVcpu(0,1)</div><div style="background-color:transparent">
<br></div><div style="background-color:transparent">but still my vcpu affinity is for all the pcpus. The function returns 0 (success).</div><div style="background-color:transparent">Any idea what am I doing wrong?</div><div style="background-color:transparent">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman','new york',times,serif">Thanks.</div></span></div><span class=""><font color="#888888"><div style="font-family:'times new roman','new york',times,serif;font-size:12pt">
</div><div style="font-family:'times new roman','new york',times,serif;font-size:12pt"> </div><div><font color="#9E8FA9">~Peeyush Gupta</font></div></font></span></div></div><br>_______________________________________________<br>

libvirt-users mailing list<br>
<a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br></blockquote></div><br></div></div></div>