[libvirt-users] virsh create failed: cannot set CPU affinity on process 0

Osier Yang jyang at redhat.com
Fri Mar 30 03:34:02 UTC 2012


On 03/30/2012 02:35 AM, 杨镭 wrote:
> Hello Everyone:
>
> We can't create vm on a physical server with 64 CPU(as reported by
> /proc/cpuinfo). The error message is: "cannot set CPU affinity on process 0"
>
> The following is the capabilities detected by libvirt:
>
> <arch>x86_64</arch>
> <model>Westmere</model>
> <vendor>Intel</vendor>
> <topology sockets='4' cores='10' threads='2'/>

The cpu affinity is controlled by <vcpu cpuset="0-10,^9">4</vcpu>,
or <vcpu placement="auto">4</vcpu> (in this case numad is used to
get the advisory nodeset, attribute "placement" will show up in
0.9.11, not released yet).

If no cpuset like (cpuset='0-10,^9') is specified, the domain
process will be pinned to all the available pysical process.

This is the basic work horse of CPU affinity setting.

However, it's weried to see "cannot set CPU affinity on process 0",
how came the PID of domain process being 0?!, could you try to
debug with gdb, and to see why it's zero?

>
> I wonder if libvirt uses incorrect CPU topology information to set
> process affinity which lead to the error above.

No, no matters with the CPU topology specified in the XML.

Retgards,
Osier




More information about the libvirt-users mailing list