[libvirt-users] How to insert vcpupin in guest xml file
hongming
honzhang at redhat.com
Mon Sep 9 03:39:20 UTC 2013
On 07/19/2013 04:51 PM, Peeyush Gupta wrote:
> Hi all,
>
> 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.
Hi Peeyush
In libvirt python -binding . You can find the following functions for
pining vcpus.
class virDomain:
.....
def pinVcpu(self, vcpu, cpumap):
"""Dynamically change the real CPUs which can be allocated to a
virtual CPU. This function requires privileged access to the hypervisor. """
ret = libvirtmod.virDomainPinVcpu(self._o, vcpu, cpumap)
if ret == -1: raise libvirtError ('virDomainPinVcpu() failed',
dom=self)
return ret
def pinVcpuFlags(self, vcpu, cpumap, flags):
"""Dynamically change the real CPUs which can be allocated to a
virtual CPU. This function requires privileged access to the hypervisor. """
ret = libvirtmod.virDomainPinVcpuFlags(self._o, vcpu, cpumap,
flags)
if ret == -1: raise libvirtError ('virDomainPinVcpuFlags()
failed', dom=self)
return ret
.......
>
> Help me out, please!
> Thanks.
> ~Peeyush Gupta
>
>
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130909/8b20e687/attachment.htm>
More information about the libvirt-users
mailing list