WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] exception MEMORY_CONSTRAINT_VIOLATION

To: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Subject: Re: [Xen-API] exception MEMORY_CONSTRAINT_VIOLATION
From: Marco Sinhoreli <msinhore@xxxxxxxxx>
Date: Wed, 25 Nov 2009 09:34:34 -0200
Cc: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 25 Nov 2009 03:34:33 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jQQ2EScpOB9XsCfReCyzNPL3mfHIEvz44jFpqVXXkcY=; b=mEvWMtdDcl+eCDFx7ndqYko4I4tjbTD5wNCUYmtOWIkOP3R3zJQZLZEAfGIzP4bzrB XwClpfhDv5NTFMi3Rj8WNK/UVzdYgm3CTQytEOLlUHrt5DkQUKZyPBfX8cgY0jjpcJNj pYnTyNuDb2IQZX9zeCTA5qWZ7K45eLrAsicD4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YgdlNmYb80FQ1dgfxOQCu56+Cixy9HoBRaRsiBw+PXpG7JAc6jmMAe44imyFGqqEo9 BcXfx2p0rmFR1kpbQy/thBL+3AsNdpyF2GrlE+kmuUIPxfEZ9BZce79uGqomNxMYO81T UuU380XgkrbyVmmJXe2NYiFqXd6ZAols727gQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B0D0470.1060402@xxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <20fe3cf60911242144j6f684c07o2233be697eb14ebf@xxxxxxxxxxxxxx> <4B0D0470.1060402@xxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Hi Jonathan,

I'm using the python xenapi. Above the source code for setup VM memory
dynamic and static:

<code>
        [...]
        # Cloning the template
        vm = self.master.VM.clone(template_ref, label)

        # Configuring the VM memory

        memory_size = str(memory_size * 1024 * 1024)
        self.master.VM.set_memory_dynamic_max(vm, memory_size)
        self.master.VM.set_memory_dynamic_min(vm, memory_size)
        self.master.VM.set_memory_static_max(vm, memory_size)
        self.master.VM.set_memory_static_min(vm, memory_size)

        # Configuring the network interface
        self.__create_vlan_if_not_exists(host, master, vlan, 'eth0',
'Kickstart Install VLAN')
        self.__configure_network_interface(vm, host, master, vlan, 'eth0', '0')
        [...]
</code>

Cheers,


On Wed, Nov 25, 2009 at 8:18 AM, Jonathan Knowles
<jonathan.knowles@xxxxxxxxxxxxx> wrote:
> Hi Marco
>
> Thanks for your mail.
>
> Marco Sinhoreli wrote:
>>
>> Using the Xenapi to create a virtual machine, this exception is returning:
>>
>> <code>
>> XenAPIError: ['MEMORY_CONSTRAINT_VIOLATION', 'min or max']
>> </code>
>>
>> This isn't documented and I don't know what it mean. It's happing only
>> with XCP. Using XenServer 5.0.0 the same code run perfectly.
>
> 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
>
> You can see the current memory constraints for any given VM
> using a command similar to:
>
>    xe vm-list params=all name-label=<name-of-vm> | grep memory
>
> Marco - could you post the exact sequence of commands that
> cause this failure? Are you using vm-install to create a VM?
>
> Thanks
>
> Jonathan Knowles
>



-- 
Marco Sinhoreli

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api