67
1. Find the uuid of the required VM:
xe vm-list
2. Note the uuid, and then run the command param-name=memory-dynamic:
xe vm-param-get uuid=<uuid> param-name=memory-dynamic-{min,max}
For example, the following displays the dynamic maximum memory properties for the VM with uuid
beginning ec77
xe vm-param-get uuid= \
ec77a893-bff2-aa5c-7ef2-9c3acf0f83c0 \
param-name=memory-dynamic-max;
134217728
This shows that the static maximum memory for this VM is 134217728 bytes (128MB).
Updating memory properties
Warning:
It is essential that you use the correct ordering when setting the static/dynamic minimum/maximum
parameters. In addition you must not invalidate the following constraint:
0 ≤ memory-static-min ≤ memory-dynamic-min ≤ memory-dynamic-max ≤ memory-
static-max
Update the static memory range of a virtual machine:
xe vm-memory-static-range-set uuid=<uuid> min=<value>max=<value>
Update the dynamic memory range of a virtual machine:
xe vm-memory-dynamic-range-set \
uuid=<uuid> min=<value> \
max=<value>
Specifying a target is particularly useful in virtual server environments, and in any situation where you know
exactly how much memory you want a guest to use. XenServer will adjust the guest's memory allocation
to meet the target you specify. For example:
xe vm-target-set
Update all memory limits (static and dynamic) of a virtual machine:
xe vm-memory-limits-set \
uuid=<uuid> \
static-min=<value> \
dynamic-min=<value> \
dynamic-max=<value> static-max=<value>
Note:
• To allocate a specific amount memory to a VM that won't change, set the Dynamic Maximum and Dynamic
Minimum to the same value.
• You cannot increase the dynamic memory of a VM beyond the static maximum.
• To alter the static maximum of a VM – you will need to suspend or shut down the VM.