With the XenServer Windows client called XenCenter it is possible to manage multiple XenServer hosts, create virtual machines, watch the console of virtual machines, etc. One of the limitations I recently ran into (this is a luxury problem, I know) is that it doesn’t allow you to assign more than 8 virtual CPUs (vCPUs) to a single VM.

However, on the command line you can increase this value to 32 for Linux VMs. First, let’s see which uuid is assigned to the VM we want to give more than 8 vCPUs:

xe vm-list

Now make sure that the VM is halted and then use this uuid in the following commands:

xe vm-param-set VCPUs-max=32 uuid=replace_with_uuid
xe vm-param-set VCPUs-at-startup=32 uuid=replace_with_uuid

If you want to increase the memory size beyond 16GB as well, e.g. to 32GB, add the following commands:

xe vm-param-set memory-static-max=34359738368 uuid=replace_with_uuid
xe vm-param-set memory-dynamic-max=34359738368 uuid=replace_with_uuid
xe vm-param-set memory-dynamic-min=34359738368 uuid=replace_with_uuid
xe vm-param-set memory-static-min=34359738368 uuid=replace_with_uuid

Restart the VM and enjoy! For a quick look if everything worked out, watch the output of this command inside the VM:

cat /proc/cpuinfo | grep processor | wc -l
Assigning more than 8 virtual CPUs in XenServer
Tagged on:

4 thoughts on “Assigning more than 8 virtual CPUs in XenServer

  • 2011-04-26 at 18:20
    Permalink

    In XenServer 5.6 the memory config is a little different – its all one line, and instead of params, its vm-memory-limits-set.

    xe vm-memory-limits-set uuid=replace_with_uuid static-min=34359738368 dynamic-min=34359738368 dynamic-max=34359738368 static-max=34359738368

    Reply
  • 2012-01-19 at 22:12
    Permalink

    Does XenServer see cores or cpu’s? I have a server with 4 cpu’s and 4 cores per cpu. So do I have 4 cpu’s to assign to vm’s or do I have 16 cpu’s to assign to vm’s?

    Reply
    • 2012-01-20 at 10:26
      Permalink

      XenServer sees cores, so in your case 4 x 4 = 16

      Reply
  • 2013-05-30 at 20:08
    Permalink

    Assuming I have a server with 8 cores. There are 4 VMs having 2 vCPUs each and 1 VM with 6 vCPUs. Does the VM with 6 vCPUs need to wait until all 6 vCPUs are available before processing can occure for that VM?

    Reply

Leave a Reply to Rick Collette Cancel reply

Your email address will not be published. Required fields are marked *