XenCenter

Configuring VM Memory

Note:

XenCenter YYYY.x.x is currently in preview and is not supported for production use. Note that any future references to production support apply only when XenCenter YYYY.x.x and XenServer 8 go from preview status to general availability.

You can use XenCenter YYYY.x.x to manage your XenServer 8 and Citrix Hypervisor 8.2 CU1 non-production environments. However, to manage your Citrix Hypervisor 8.2 CU1 production environment, use XenCenter 8.2.7. For more information, see the XenCenter 8.2.7 documentation.

You can install XenCenter 8.2.7 and XenCenter YYYY.x.x on the same system. Installing XenCenter YYYY.x.x does not overwrite your XenCenter 8.2.7 installation.

When a VM is first created, it is allocated a fixed amount of memory. To improve the utilization of physical memory in your XenServer environment, you can use Dynamic Memory Control (DMC). DMC is a memory management feature that enables dynamic reallocation of memory between VMs.

The Memory tab in XenCenter shows memory usage and configuration information for your VMs and servers.

  • For servers, the total available memory and the current memory usage are shown, and you can see how memory is divided between hosted VMs.
  • For VMs, in addition to current memory usage you can also see the VM’s memory configuration information. That configuration includes whether DMC is enabled and the current dynamic minimum and maximum values. You can edit DMC configuration settings in this tab.

VMs with the same memory configuration are grouped in the Memory tab, enabling you to view and configure memory settings for individual VMs and for groups of VMs.

Note:

You cannot use the Dynamic Memory Control (DMC) feature on Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Rocky Linux 8, Rocky Linux 9, or CentOS Stream 9 VMs as these operating systems do not support memory ballooning with the Xen hypervisor.

Dynamic Memory Control (DMC)

Dynamic memory control (sometimes known as dynamic memory optimization, memory overcommit, or memory ballooning) works by automatically adjusting the memory of running VMs.

  • DMC keeps the amount of memory allocated to each VM between specified minimum and maximum memory values
  • DMC guarantees performance
  • DMC permits greater density of VMs per server

Without DMC, if you start further VMs when a server is full, the action fails with “out of memory” errors. To reduce the existing VM memory allocation and make room for more VMs, you must edit each VM’s memory allocation and then reboot the VM. With DMC enabled, XenServer attempts to reclaim memory by automatically reducing the current memory allocation of running VMs within their defined memory ranges.

Dynamic and static memory range

For each VM, you can set a dynamic memory range. This dynamic memory range is the range within which memory can be added or removed from the VM without requiring a reboot. You can adjust the dynamic range while the VM is running, without having to reboot it. XenServer always guarantees to keep the amount of memory allocated to the VM within the dynamic range. For example, if the Dynamic Minimum Memory is 512 MB and the Dynamic Maximum Memory is 1,024 MB, the VM has a Dynamic Memory Range of 512–1,024 MB. The VM operates within this range. With DMC, XenServer guarantees to always assign each VM memory within its specified DMR.

When host memory is plentiful, all running VMs receive their Dynamic Maximum Memory level. When host memory is scarce, all running VMs receive their Dynamic Minimum Memory level. If new VMs are required to start on full servers, running VMs have their memory squeezed to start new ones. The required extra memory is obtained by squeezing the existing running VMs proportionally within their pre-defined dynamic ranges.

Many operating systems that XenServer supports do not fully support dynamically adding or removing memory. As a result, the XenServer server must declare the maximum amount of memory that a VM can be asked to consume when the VM starts. The guest operating system can use this information to size its page tables and other memory management structures accordingly. This feature introduces the concept of a static memory range within the XenServer product. The static memory range cannot be adjusted while the VM is running. The dynamic range is constrained such as to be always contained within this static range until the VM is next rebooted. The static minimum is there to protect the administrator. Set the static minimum to the lowest amount of memory that the OS can run with on a XenServer server.

Important:

Citrix advises you not to change the static minimum level as this value is set at the supported level per operating system. By setting a static maximum level higher than a dynamic max, you can allocate more memory to a VM in the future without requiring a reboot.

DMC memory constraints

XenCenter enforces the following constraints when setting DMC values:

  • The minimum dynamic memory value cannot be lower than the static minimum memory value.
  • The minimum dynamic memory value cannot be greater than the maximum dynamic memory value.
  • The maximum dynamic memory value cannot be greater than the maximum static memory value.
  • The minimum dynamic memory must be at least 75% of the static maximum. A lower amount can cause in-guest failures and is not supported.

You can change a VM’s memory properties to any values that satisfy these constraints, subject to validation checks. In addition to these constraints, Citrix supports only certain VM memory configurations for specific operating systems.

To enable DMC

  1. Choose a VM or server in the Resources pane and select the Memory tab.
  2. Select the Edit button for the VM or group of VMs you want to configure.
  3. For multiple VMs with the same current memory configuration, choose the VMs you want to configure and click Next.
  4. Select the Automatically allocate memory within this range option.
  5. Set the required maximum and minimum dynamic memory range values by using the slider or by typing the values directly.
  6. Click OK to apply the changes and close the dialog box.

To disable DMC

  1. Choose the VM or server in the Resources pane and select the Memory tab.
  2. Select the Edit button for the VM or group of VMs you want to configure.
  3. For multiple VMs with the same current memory configuration, choose the VMs you want to configure and click Next.
  4. Select the Set a fixed memory option.
  5. Specify the amount of memory to allocate.
  6. Click OK to apply the changes and close the dialog box.
Configuring VM Memory