Cloud init API issue

Hi, I am using ovirt REST API function to create vm. Virtual machine is not creating with the cloud init and i am unable to login. The following xml is which i used for creating vm <vm> <name>$name</name> <cluster> <name>WTC</name> </cluster> <template> <name>$templatetype</name> </template> <memory>$memory</memory> <os> <boot dev=\"hd\"/> </os> <initialization> <cloud_init> <host> <address></address> </host> <authorized_keys> <authorized_key> <user> <user_name>root</user_name> </user> <key></key> </authorized_key> </authorized_keys> <regenerate_ssh_keys>true</regenerate_ssh_keys> <timezone>Asia/Jerusalem</timezone> <users> <user> <user_name>root</user_name> <password>mypass</password> </user> </users> <network_configuration> <nics> <nic> <name>eth0</name> <boot_protocol>STATIC</boot_protocol> <network> <ip address='' netmask='255.255.255.0' gateway='/> </network> <on_boot>true</on_boot> </nic> </nics> <dns> <servers> <host> <address></address> </host> <host> <address></address> </host> </servers> <search_domains> <host> <address></address> </host> </search_domains> </dns> </network_configuration> <files> <file> <name></name> <content></content> <type>PLAINTEXT</type> </file> </files> </cloud_init> </initialization> </vm> could you please check if there any issues with the xml data ? i am able to create VM from the ovirt panel and its working but this problem is only when i use the REST Api to do this

Hi Logs / error messages can be helpful. Also, see example in http://www.ovirt.org/Features/Cloud-Init_Integration Oved ----- Original Message -----
From: "Shanil S" <xielesshanil@gmail.com> To: users@ovirt.org Sent: Thursday, June 26, 2014 1:11:44 PM Subject: [ovirt-users] Cloud init API issue
Hi,
I am using ovirt REST API function to create vm. Virtual machine is not creating with the cloud init and i am unable to login. The following xml is which i used for creating vm
<vm> <name>$name</name> <cluster> <name>WTC</name> </cluster> <template> <name>$templatetype</name> </template> <memory>$memory</memory> <os> <boot dev=\"hd\"/> </os> <initialization> <cloud_init> <host> <address></address> </host> <authorized_keys> <authorized_key> <user> <user_name>root</user_name> </user> <key></key> </authorized_key> </authorized_keys> <regenerate_ssh_keys>true</regenerate_ssh_keys> <timezone>Asia/Jerusalem</timezone> <users> <user> <user_name>root</user_name> <password>mypass</password> </user> </users> <network_configuration> <nics> <nic> <name>eth0</name> <boot_protocol>STATIC</boot_protocol> <network> <ip address='' netmask='255.255.255.0' gateway='/> </network> <on_boot>true</on_boot> </nic> </nics> <dns> <servers> <host> <address></address> </host> <host> <address></address> </host> </servers> <search_domains> <host> <address></address> </host> </search_domains> </dns> </network_configuration> <files> <file> <name></name> <content></content> <type>PLAINTEXT</type> </file> </files> </cloud_init> </initialization> </vm>
could you please check if there any issues with the xml data ? i am able to create VM from the ovirt panel and its working but this problem is only when i use the REST Api to do this
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

It may be initialization issue, The initialization data (cloud-init and sysprep) is only running the first time when the VM is not initialized, if you do want to re-initialize the VM you need to use run-once in the UI and in REST you need to start the VM with the <vm>..</vm> tag including the <initialization> section On 26.06.14 06:25, Oved Ourfali wrote:
Hi
Logs / error messages can be helpful.
Also, see example in http://www.ovirt.org/Features/Cloud-Init_Integration
Oved
----- Original Message -----
From: "Shanil S" <xielesshanil@gmail.com> To: users@ovirt.org Sent: Thursday, June 26, 2014 1:11:44 PM Subject: [ovirt-users] Cloud init API issue
Hi,
I am using ovirt REST API function to create vm. Virtual machine is not creating with the cloud init and i am unable to login. The following xml is which i used for creating vm
<vm> <name>$name</name> <cluster> <name>WTC</name> </cluster> <template> <name>$templatetype</name> </template> <memory>$memory</memory> <os> <boot dev=\"hd\"/> </os> <initialization> <cloud_init> <host> <address></address> </host> <authorized_keys> <authorized_key> <user> <user_name>root</user_name> </user> <key></key> </authorized_key> </authorized_keys> <regenerate_ssh_keys>true</regenerate_ssh_keys> <timezone>Asia/Jerusalem</timezone> <users> <user> <user_name>root</user_name> <password>mypass</password> </user> </users> <network_configuration> <nics> <nic> <name>eth0</name> <boot_protocol>STATIC</boot_protocol> <network> <ip address='' netmask='255.255.255.0' gateway='/> </network> <on_boot>true</on_boot> </nic> </nics> <dns> <servers> <host> <address></address> </host> <host> <address></address> </host> </servers> <search_domains> <host> <address></address> </host> </search_domains> </dns> </network_configuration> <files> <file> <name></name> <content></content> <type>PLAINTEXT</type> </file> </files> </cloud_init> </initialization> </vm>
could you please check if there any issues with the xml data ? i am able to create VM from the ovirt panel and its working but this problem is only when i use the REST Api to do this
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

You supply no ip address but a network mask the UI would block you from doing this, so I think this might be an error. but the rest api should return an error code for you as well, didn't you get any? Am 26.06.2014 12:11, schrieb Shanil S:
<name>eth0</name> <boot_protocol>STATIC</boot_protocol> <network> <ip address='' netmask='255.255.255.0' gateway='/> </network>
-- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
participants (4)
-
Oved Ourfali
-
Shahar Havivi
-
Shanil S
-
Sven Kieske