<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Saurabh,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>I checked that out and it's working. Looks like I wasn't able to understand how to define cpumap. Anyways, thanks for your answer.</span></div><div></div><div> </div><div><font class="Apple-style-span" color="#9E8FA9">~Peeyush Gupta</font><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr
 size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Saurabh Deochake <saurabh.d04@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Peeyush Gupta <gpeeyush@ymail.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "libvirt-users@redhat.com" <libvirt-users@redhat.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Saturday, 27 July 2013 2:13 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt-users] pinVcpu not working<br> </font> </div> <div class="y_msg_container"><br><div id="yiv7585911485"><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="yiv7585911485gmail_extra"><br><br><div class="yiv7585911485gmail_quote">On Fri, Jul 19, 2013 at 11:45 AM, Peeyush Gupta <span dir="ltr"><<a rel="nofollow" ymailto="mailto:gpeeyush@ymail.com" target="_blank" href="mailto:gpeeyush@ymail.com">gpeeyush@ymail.com</a>></span> wrote:<br>
<blockquote class="yiv7585911485gmail_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;">
<div style="font-size:12pt;"><span>Hi all,</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;">
<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;">Thanks.</div></span></div><span class="yiv7585911485"><font color="#888888"><div style="font-size:12pt;">
</div><div style="font-size:12pt;"> </div><div><font color="#9E8FA9">~Peeyush Gupta</font></div></font></span></div></div><br>_______________________________________________<br>

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