VM CPU and Memory Allocation

When you create a new VM, you can allocate virtual CPUs, specify the number of cores-per-socket you would like to present to the VM’s vCPUs, and set initial memory resources to the new VM. You can change the settings at anytime after the new VM is created.

The vCPU hotplug feature in XenCenter enables customers to dynamically increase the number of vCPUs assigned to a running Linux VM, without having to restart the VM.

Options

Number of vCPUs

(for Windows VMs)

Enter the number of virtual CPUs (vCPUs) you would like to allocate to the new VM.

To ensure you get the best performance out of the new VM, the number of vCPUs you assign to the VM should not exceed the number of physical CPUs on the server.

Note: This value can be changed later, if needed. For more information, see Change VM properties: CPU. For information about the maximum number of vCPUs supported on a VM, refer to the XenServer Configuration Limits document.

Maximum number of vCPUs

(for Linux VMs)

Select the maximum number of virtual CPUs (vCPUs) you would like to allocate to the new VM from the drop-down list.

To ensure you get the best performance out of the new VM, the maximum number of vCPUs you assign to the VM should not exceed the number of physical CPUs on the server.

Note: This value can be changed later, if needed. For more information, see Change VM properties: CPU.

Topology

Specify the topology for the vCPU.

By default, XenServer allocates one core per socket for each vCPU. For example, allocating 4 vCPUs will appear as 4 sockets with 1 core per socket. Click the Topology drop-down list to change this setting and select an option from the list.

Note: The cores-per-socket setting depends on the number of sockets present on the server and the operating system installed. Some operating systems have restrictions on the number of CPUs. You should comply with the operating system requirements when setting this option.

Initial number of vCPUs

(for Linux VMs)

This option displays the initial number of vCPUs allocated to the VM. By default, this number is equal to the Maximum number of vCPUs set in the previous step. You can select from the drop-down list and modify the initial number of vCPUs allocated to the VM.

Memory

Enter the amount of memory you want to allocate to the VM.

The XenServer templates provide typical VM configurations and set reasonable defaults for the memory, based on the type of guest operating system. You should also take into account the following considerations when deciding how much memory you initially allocate to a new VM:

  • The kinds of applications that will run on the VM.
  • Other virtual machines that will be using the same memory resource.
  • Applications that will run on the server alongside the virtual machine.

You can adjust the memory allocation after the new VM is created on the VM’s Memory tab, where you can also enable Dynamic Memory Control (DMC) to allow dynamic reallocation of memory between VMs in the same pool. See the Help topics in the Configuring VM memory folder for details.

VM Power State Scenarios

The following table lists the three VM power states and describes their various vCPU scenarios.

VM Power State Maximum Number of vCPUs Initial number of vCPUs Current number of vCPUs
Running Cannot be increased/decreased N/A Can only be increased.
Shutdown Can be increased/decreased Can be increased/decreased N/A
Suspended Cannot be modified N/A Cannot be modified

VM CPU and Memory Allocation