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

Re: [Xen-API] exception MEMORY_CONSTRAINT_VIOLATION


  • To: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
  • From: Marco Sinhoreli <msinhore@xxxxxxxxx>
  • Date: Wed, 25 Nov 2009 09:43:08 -0200
  • Cc: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 25 Nov 2009 03:43:09 -0800
  • 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=paytEZPtgIUr6V5rEcZi5hssLF8NpTWCgQL9lr1VNMTSkP9lM0os4FLXz1QCwmewi+ yVsNqGnVa/GEBTxuwdXL6XbG8GDqjj6MiX0LDkec0cEWK01DF/DSz9oyxUaJphYcQJ9K CUfDd5iamyRd/Vcixp0d9kswFFQ2PkeyIzFKk=
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

More informations: the variable memory_size is in MByte.

Cheers,

On Wed, Nov 25, 2009 at 9:34 AM, Marco Sinhoreli <msinhore@xxxxxxxxx> wrote:
> 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
>



-- 
Marco Sinhoreli

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


 


Rackspace

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