<html><body><div style="color:#000; background-color:#fff; 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;"><span>Hi all,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><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="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">Thanks.</div></span></div><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 style="font-family: 'times new
 roman', 'new york', times, serif; font-size: 12pt;"><font class="Apple-style-span" color="#9E8FA9">~Peeyush Gupta</font></div></div></body></html>