[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Marco

Jonathan Knowles wrote:
XAPI raises a MEMORY_CONSTRAINT_VIOLATION exception (during an API call) if it believes that carrying out the call would violate the following memory constraint for any VM:

static-min <= dynamic-min <= dynamic-max <= static-max

Here's some further information.

When you first install a VM, XAPI initializes the new VM's
memory fields according to:

    static-min <= dynamic-min = dynamic-max = static-max

The "static-min" and "static-max" fields define /hard/ limits
on the size of a running VM. For example, "static-max" acts
as an upper bound for the size of a running VM - the VM can
never grow to exceed the static maximum size. Once you've
started a VM, XAPI will prevent you from changing either of
these static limits.

The "dynamic-min" and "dynamic-max" fields define /soft/ limits
on the size of a running VM. These limits constitute a "dynamic
memory range". Unlike the static fields, XAPI /will/ let you
change the dynamic fields at any time after a VM has started.

XAPI will at all times try to keep your VM within its dynamic
memory limits. However, to achieve this, it relies completely
on co-operation from a balloon driver running within the guest
operating system. (If your guest doesn't have a balloon driver
installed, then it will consume memory equal to static-max.)

If you only want to change a VM's size, and are not interested
in using dynamic memory control, or if your VM does not have a
balloon driver installed, then it's best to make sure that its
memory fields satisfy:

    static-min <= dynamic-min = dynamic-max = static-max

Probably the easiest way to do this is to use the following
function, remembering to keep the last three values the same:

    xe vm-memory-limits-set     \
        static-min=<value>      \
        dynamic-min=<value>     \
        dynamic-max=<value>     \

Let me know if you have any further questions, and I'll try
to help :).

Best wishes

Jonathan Knowles

xen-api mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.