How to Configure Dom0 Memory in XenServer 5.6

Configure Dom0 Memory in XenServer

In this blog post, we will show you how to configure Dom0 memory in XenServer 5.6 or later by modifying the configuration file via the console.

The Xen hypervisor is a “type 1” hypervisor that runs directly on the hardware. On top of this we run a privileged Linux virtual machine, called “domain 0” ( or Dom0 ), that runs the management toolstack and API, contains drivers for network and storage I/O, etc.,

Dom0, or the Control Domain, is a Linux VM that manages the network and storage I/O of all the guest VMs. Dom0 is a Linux VM with higher priority to the hardware than the guest operating systems. Domain 0 manages the network and storage I/O of all guest VMs, and because it uses Linux device drivers, a broad range of physical devices are supporting.

By default, the Dom0 value is set to 2940M and to configure Dom0 memory in XenServer. Follow the below steps:

  • Log in to Dom0 as root by using the console in XenCenter or by SSH access.
  • Ensure to make a copy of original /boot/extlinux.conf file. This helps you to recover the XenServer from an unbootable state if you experience issues.
  • Open the file /boot/extlinux.conf by using an editor such as Notepad. Notice that this file contains a header followed by several sections, each introduced by “label”. In each section, you can find a line prefixed “append”. This line specifies the arguments that are passes to XenServer. The one that is usually used is the one with label “xe”. Make the change in each section.
  • The existing dom0_mem parameter to read dom0_mem=2940M in the append line of the xe and xe-serial sections.

Change the following:

label xe # XenServer kernel mboot.c32 append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=1M crashkernel=64M@32M console=com1 vga=mode-0x0311 --- /boot/vmlinuz-2.6-xen root=LABEL=root-ecpmuteu ro xencons=hvc console=hvc0 console=tty0 quiet vga=785 splash --- /boot/initrd-2.6-xen.img 

to:

label xe # XenServer kernel mboot.c32 append /boot/xen.gz dom0_mem=2940M lowmem_emergency_pool=1M crashkernel=64M@32M console=com1 vga=mode-0x0311 --- /boot/vmlinuz-2.6-xen root=LABEL=root-ecpmuteu ro xencons=hvc console=hvc0 console=tty0 quiet vga=785 splash --- /boot/initrd-2.6-xen.img 

Adjusting Dom0 Memory Settings

On the XenServer host CLI, run the following four – step sequence of commands to adjust the memory setting:

./etc/xensource-inventory
staticmax=`xe vm-param-get uuid=$CONTROL_DOMAIN_UUID param-name=memory-static-max`
echo staticmax=$staticmax
xe vm-memory-target-set uuid=$CONTROL_DOMAIN_UUID target=$staticmax

Note: The dom0_mem=2940M change allocates more memory to dom0, which implies that it can better handle large numbers of virtual machines. After changing this setting and restarting, provide specific instructions to ensure that dom0 consumes all the memory allocated to it.

For any assistance on your Citrix XenServer you can reach our server management experts who can provide the expert advise and help you configure things in a timely manner.

Hope it helps! For any assistance Contact Us.

Find us on Twitter and Facebook.

Written by actsupp-r0cks