More informations: the variable memory_size is in MByte. Cheers,
On Wed, Nov 25, 2009 at 9:34 AM, Marco Sinhoreli <[email protected]> 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 > <[email protected]> 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 [email protected] http://lists.xensource.com/mailman/listinfo/xen-api
