<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 07/19/2013 04:51 PM, Peeyush Gupta
wrote:<br>
</div>
<blockquote
cite="mid:1374223862.34534.YahooMailNeo@web194601.mail.sg3.yahoo.com"
type="cite">
<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; color: rgb(0, 0, 0);
font-size: 16px; font-family: 'times new roman', 'new york',
times, serif; font-style: normal;"><span>I am trying to add
vcpupin in the guest xml file. I am working with openstack
and the code I have is python bound. I investigated through
the code and found that the elemets in xml file are set in
get_guest_config function. Now the thing is I am not able to
set vcpupin element. I mean I tried guest.cputune_vcpupin
but it's not working.</span></div>
</div>
</blockquote>
Hi Peeyush <br>
<br>
In libvirt python -binding . You can find the following functions
for pining vcpus.<br>
<br>
<br>
class virDomain:<br>
.....<br>
<br>
def pinVcpu(self, vcpu, cpumap):<br>
"""Dynamically change the real CPUs which can be allocated
to a virtual CPU. This function requires privileged access to the
hypervisor. """<br>
ret = libvirtmod.virDomainPinVcpu(self._o, vcpu, cpumap)<br>
if ret == -1: raise libvirtError ('virDomainPinVcpu()
failed', dom=self)<br>
return ret<br>
<br>
def pinVcpuFlags(self, vcpu, cpumap, flags):<br>
"""Dynamically change the real CPUs which can be allocated
to a virtual CPU. This function requires privileged access to the
hypervisor. """<br>
ret = libvirtmod.virDomainPinVcpuFlags(self._o, vcpu,
cpumap, flags)<br>
if ret == -1: raise libvirtError ('virDomainPinVcpuFlags()
failed', dom=self)<br>
return ret<br>
<br>
.......<br>
<blockquote
cite="mid:1374223862.34534.YahooMailNeo@web194601.mail.sg3.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">
<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;"><span><br>
</span></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;"><span>Help me out, please!</span></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>
<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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
libvirt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a></pre>
</blockquote>
<br>
</body>
</html>