Check that VM name is unique.<br><br><div class="gmail_quote">On Mon, Aug 22, 2011 at 2:56 PM, Stephan Eberle <span dir="ltr"><<a href="mailto:steviee@me.com">steviee@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div>Hi,<br></div><div><br></div><div>I just stumbled over this log entry:<br></div><div><br></div><div>Mon Aug 22 13:52:02 2011 [ONE][E]: SQL command was: INSERT INTO vm_pool (oid,uid,name,last_poll, state,lcm_state,stime,etime,deploy_id,memory,cpu,net_tx,net_rx,last_seq, template) VALUES (7,0,'vssvn',0,1,0,1314013922,0,'',0,0,0,0,-1,'<TEMPLATE><CPU><![CDATA[0.8]]></CPU><DISK><CLONE><![CDATA[no]]></CLONE><DISK_ID><![CDATA[0]]></DISK_ID><DRIVER><![CDATA[raw]]></DRIVER><READONLY><![CDATA[no]]></READONLY><SAVE><![CDATA[yes]]></SAVE><SOURCE><![CDATA[/home/images/vs-svn-serv.img]]></SOURCE><TARGET><![CDATA[hda]]></TARGET><TYPE><![CDATA[disk]]></TYPE></DISK><FEATURES><ACPI><![CDATA[no]]></ACPI></FEATURES><GRAPHICS><KEYMAP><![CDATA[de]]></KEYMAP><LISTEN><![CDATA[xx.xx.xx.xx]]></LISTEN><PASSWD><![CDATA[falcon1]]></PASSWD><PORT><![CDATA[2]]></PORT><TYPE><![CDATA[vnc]]></TYPE></GRAPHICS><MEMORY><![CDATA[512]]></MEMORY><NAME><![CDATA[vssvn]]></NAME><NIC><BRIDGE><![CDATA[virbr0]]></BRIDGE><IP><![CDATA[192.168.122.2]]></IP><MAC><![CDATA[02:00:c0:a8:7a:02]]></MAC><NETWORK><![CDATA[external]]></NETWORK><NETWORK_ID><![CDATA[0]]></NETWORK_ID></NIC><OS><ARCH><![CDATA[i686]]></ARCH><BOOT><![CDATA[hd]]></BOOT></OS><PUBLIC><![CDATA[YES]]></PUBLIC><RAW><TYPE><![CDATA[kvm]]></TYPE></RAW><TYPE><![CDATA[KVM]]></TYPE><VCPU><![CDATA[1]]></VCPU><VMID><![CDATA[8]]></VMID><VMID><![CDATA[7]]></VMID></TEMPLATE>'), error: PRIMARY KEY must be unique<br>
Mon Aug 22 13:52:02 2011 [ONE][E]: Can not insert VM in the database.<br>Mon Aug 22 13:52:02 2011 [ReM][E]: [VirtualMachineAllocate] Error trying to CREATE VM Can not insert VM in the database.<br><br></div><div><br></div>
<div>Any idea of how to fix this!?<br></div><div><br></div><div>Best regards,<br></div><div>Stevie<br><br></div><div><br>Am 22. Aug 2011 um 12:28 schrieb Stephan Eberle <<a href="mailto:steviee@me.com" target="_blank">steviee@me.com</a>>:<br>
<br><div><blockquote type="cite"><div><div><div></div><div class="h5"><div>Hi,<br></div><div><br></div><div>I'm currently trying to add a pre-existing qemu-image to my newly installed ONE service via<br></div><div><br>
</div><div>onevm create ./vs-svn-serv.tpl<br></div><div><br></div><div>and I'm getting this message:<br></div><div><br></div><div>Error: [VirtualMachineAllocate] Error trying to CREATE VM Can not insert VM in the database.<br>
</div><div><br></div><div>Is this due to some missing arguments in the template? What's the cause? <br></div><div><br></div><div>Thank's in advance,<br></div><div>Stevie<br></div><div><br></div><div><br></div><div>
<br></div><div>PS: My template looks like this:<br></div><div><br></div><div><br>#---------------------------------------<br># VM definition example<br>#---------------------------------------<br><br>NAME = "vs-svn-serv-1"<br>
<br>CPU = 0.8<br>MEMORY = 512<br>PUBLIC = YES<br><br># --- disks ---<br><br>DISK = [<br> source = "/home/images/vs-svn-serv.img",<br> target = "hda",<br> driver = "raw",<br> readonly = "no" ]<br>
<br># --- 1 NIC ---<br><br>NIC = [ NETWORK="external"]<br><br>FEATURES=[ acpi="no" ]<br><br># --- VNC server ---<br><br>GRAPHICS = [<br> type = "vnc",<br> listen = "xx.xx.xx.xx",<br>
port = "5902"]<br><br><br><br></div></div></div><div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfocgi/users-opennebula.org</a><br>
</div></div></blockquote></div></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>