One have to set the following options in the xen config file:
maxvcpus= # vcpus = # vcpu_avail = bitmask for vcpu activation e.g. 24=11000 and will activate vcpu0,vcpu1 only.
Also there is a bug in xm/create.py. The following patch fixed the issue for me and after this bitmask value was activating required vpcu's read from the xen configuration file. Prior to that, vpcu_avail was always set to '1' (also verified from 'xenstore-ls -f' output).
--- create.py
+++ create.py.af
if maxvcpus and vcpus:
config.append(['vcpus', vcpus])
- config.append(['vcpu_avail', (1 << vcpus) -1)])
+ config.append(['vcpu_avail', getattr(vals, 'vcpu_avail'])
def add_conf(n):
if hasattr(vals, n):