As máscaras de afinidade de CPU são ignoradas nos contêineres do OpenVZ . Você não poderá fazer isso funcionar.
In RHEL5-based kernels we had the notion of virtual cpus: tasks were scheduled on vcpus while the vcpus were somehow distributed among physical cpus. The sched_setaffinity syscall could be used to bind tasks to vcpus then.
This concept was cumbersome and often sub-optimal so in RHEL6 we decided to drop it: currently setting nr_cpus limit for a container is actually equivalent to setting cpulimit. The decision is justified by the fact that the latest Linux scheduler is smart enough to gather actively interacting tasks together so that there is no need to limit parallelism artificially.
As a result, cpu affinity support was dropped. Tasks can still use the sched_setaffinity syscall, but it will be ignored.