Two components contribute to the memory footprint of the Citrix Hypervisor server. First, the memory consumed by the Xen hypervisor itself. Second, there is the memory consumed by the Control Domain of the host. Also known as ‘Domain0’, or ‘dom0’, the Control Domain is a secure, privileged Linux VM that runs the Citrix Hypervisor management toolstack (XAPI). Besides providing Citrix Hypervisor management functions, the Control Domain also runs the driver stack that provides user created VM access to physical devices.
Control domain memory
The amount of memory allocated to the Control Domain is adjusted automatically and is based on the amount of physical memory on the physical host. By default, Citrix Hypervisor allocates 1 GiB plus 5% of the total physical memory to the control domain, up to a maximum of 8 GiB.
The amount reported in the Citrix Hypervisor section in XenCenter includes the memory used by the Control Domain (dom0), the Xen hypervisor itself, and the crash kernel. Therefore, the amount of memory reported in XenCenter can exceed these values. The amount of memory used by the hypervisor is larger for hosts using more memory.
Change the amount of memory allocated to the control domain
You can change the amount of memory allocated to dom0 by using XenCenter or by using the command line. If you increase the amount of memory allocated to the Control Domain beyond the amount allocated by default, this results in less memory being available to VMs.
Changing the dom0 memory by using XenCenter
For information about changing the dom0 memory by using XenCenter, see Changing the Control Domain Memory in the XenCenter documentation.
You cannot use XenCenter to reduce dom0 memory below the value that was initially set during Citrix Hypervisor installation. To make this change you must use the command line.
Changing the dom0 memory by using the command line
On hosts with smaller memory (less than 16 GiB), you might want to reduce the memory allocated to the Control Domain to lower than the default value set during installation. You can use the command line to make this change. However, we recommend that you do not reduce the dom0 memory below 1 GiB and that you do this operation under the guidance of the Support team.
On the Citrix Hypervisor server, open a local shell and log on as root.
Type the following:
/opt/xensource/libexec/xen-cmdline --set-xen dom0_mem=<nn>M,max:<nn>M
<nn>represents the amount of memory, in MiB, to be allocated to dom0.
Restart the Citrix Hypervisor server using XenCenter or the
rebootcommand on the xsconsole.
When the host restarts, on the xsconsole, run the
freecommand to verify the new memory settings.
How much memory is available to VMs?
To find out how much host memory is available to be assigned to VMs, find the value of the free memory of the host by running
memory-free . Then type the command
vm-compute-maximum-memory to get the actual amount of free memory that can be allocated to the VM. For example:
xe host-list uuid=host_uuid params=memory-free xe vm-compute-maximum-memory vm=vm_name total=host_memory_free_value