65
xe vm-param-get uuid=<uuid> param-name=memory-static-{min,max}
For example, the following displays the static maximum memory properties for the VM with the uuid beginning
ec77:
xe vm-param-get uuid= \
ec77a893-bff2-aa5c-7ef2-9c3acf0f83c0 \
param-name=memory-static-max;
268435456
This shows that the static maximum memory for this VM is 268435456 bytes (256MB).
Display the Dynamic Memory Properties of a VM
To display the dynamic memory properties, follow the procedure as above but use the command param-
name=memory-dynamic:
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 dynamic 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 target=<value> vm=<vm-name>
Update all memory limits (static and dynamic) of a virtual machine: