<div dir="ltr">Thanks for quick response.<div>we already knew this and we are passing following xml when calling Start action.</div><div><br></div><div><div>&lt;action&gt;</div><div>&lt;vm&gt;</div><div>  &lt;initialization&gt;</div><div>     &lt;cloud_init&gt;</div><div>       &lt;host&gt;</div><div>         &lt;address&gt;vm-cloud-init-restapi&lt;/address&gt;</div><div>       &lt;/host&gt;</div><div>       &lt;authorized_keys&gt;</div><div>         &lt;authorized_key&gt;</div><div>           &lt;user&gt;</div><div>             &lt;user_name&gt;root&lt;/user_name&gt;</div><div>           &lt;/user&gt;</div><div>           &lt;key&gt;ssh-rsa restapi-cloud-init-ssh-key root@localdomain&lt;/key&gt;</div><div>         &lt;/authorized_key&gt;</div><div>       &lt;/authorized_keys&gt;</div><div>       &lt;regenerate_ssh_keys&gt;true&lt;/regenerate_ssh_keys&gt;</div><div>       &lt;timezone&gt;Atlantic/Reykjavik&lt;/timezone&gt;</div><div>       &lt;users&gt;</div><div>         &lt;user&gt;</div><div>           &lt;user_name&gt;root&lt;/user_name&gt;</div><div>           &lt;password&gt;SuperSecretPassword!&lt;/password&gt;</div><div>         &lt;/user&gt;</div><div>       &lt;/users&gt;</div><div>       &lt;network_configuration&gt;</div><div>         &lt;nics&gt;</div><div>           &lt;nic&gt;</div><div>             &lt;name&gt;eth0&lt;/name&gt;</div><div>             &lt;boot_protocol&gt;STATIC&lt;/boot_protocol&gt;</div><div>             &lt;network&gt;</div><div>               &lt;ip address=&quot;192.168.2.11&quot; netmask=&quot;255.255.255.0&quot; gateway=&quot;192.168.2.254&quot; /&gt;</div><div>             &lt;/network&gt;</div><div>             &lt;on_boot&gt;true&lt;/on_boot&gt;</div><div>           &lt;/nic&gt;</div><div>           &lt;nic&gt;</div><div>             &lt;name&gt;eth1&lt;/name&gt;</div><div>             &lt;boot_protocol&gt;DHCP&lt;/boot_protocol&gt;</div><div>             &lt;on_boot&gt;true&lt;/on_boot&gt;</div><div>           &lt;/nic&gt;</div><div>         &lt;/nics&gt;</div><div>         &lt;dns&gt;</div><div>           &lt;servers&gt;</div><div>             &lt;host&gt;</div><div>               &lt;address&gt;10.20.30.100&lt;/address&gt;</div><div>             &lt;/host&gt;</div><div>           &lt;/servers&gt;</div><div>           &lt;search_domains&gt;</div><div>             &lt;host&gt;</div><div>               &lt;address&gt;<a href="http://domain.your.rhevm.com">domain.your.rhevm.com</a>&lt;/address&gt;</div><div>             &lt;/host&gt;</div><div>           &lt;/search_domains&gt;</div><div>         &lt;/dns&gt;</div><div>       &lt;/network_configuration&gt;</div><div>       &lt;files&gt;</div><div>         &lt;file&gt;</div><div>           &lt;name&gt;/tmp/file1.txt&lt;/name&gt;</div><div>           &lt;content&gt;line 1</div><div>line 2</div><div>and now something special</div><div>!@#$%^&amp;amp;*()_+&lt;/content&gt;</div><div>           &lt;type&gt;PLAINTEXT&lt;/type&gt;</div><div>         &lt;/file&gt;</div><div>       &lt;/files&gt;</div><div>     &lt;/cloud_init&gt;</div><div>  &lt;/initialization&gt;</div><div>&lt;/vm&gt;</div><div>&lt;/action&gt;</div></div><div><br></div><div>we also found following link . is this related to my issue?</div><div><br></div><div><a href="https://gerrit.ovirt.org/#/c/50240/2">https://gerrit.ovirt.org/#/c/50240/2</a><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="text-align:left"><font size="2">Regards,</font></div><div style="text-align:left"><font size="2"><b>Arpit Makhiyaviya</b></font></div><div><span style="font-size:12.8000001907349px">Software Engineer</span><br></div><div>+91-79-40038284</div><div>+91-971-437-6669</div><div><a href="http://www.sculptsoft.com" target="_blank"><img src="http://sculptsoft.com/images/logo3.png" width="96" height="24"></a><br></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Mar 29, 2016 at 6:24 PM, Renout Gerrits <span dir="ltr">&lt;<a href="mailto:mail@renout.nl" target="_blank">mail@renout.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>In the more recent versions you have to use &#39;use_cloud_init=True&#39; in the api, which isn&#39;t described in most documentation yet. Maybe thats the reason it isn&#39;t working?<br><br></div>Here&#39;s a working snippet:<br><br>vm = api.vms.get(name=vm_name)<br><br>action = params.Action(<br>    use_cloud_init=True,<br>    vm=params.VM(<br>      initialization=params.Initialization(<br>        regenerate_ssh_keys=True,<br>        host_name=vm_fqdn,<br>        nic_configurations=params.GuestNicsConfiguration(<br>          nic_configuration=[<br>            params.GuestNicConfiguration(<br>              name=&quot;eth0&quot;,<br>              boot_protocol=&quot;static&quot;,<br>              on_boot=True,<br>              ip=params.IP(<br>                address=vm_address,<br>                netmask=vm_netmask,<br>                gateway=vm_gateway,<br>                ),<br>              ),<br>            ],<br>          ),<br>        ),<br>      ),<br>    )<br><br>vm.start(action)<br><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 29, 2016 at 2:03 PM, Arpit Makhiyaviya <span dir="ltr">&lt;<a href="mailto:arpit.icreate@gmail.com" target="_blank">arpit.icreate@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>we are using ovirt api with json data format.</div><div>we have create vm from template and i want to set ip,macaddress,user and password for that we are using cloud_init for that we it can&#39;t set any options.</div><div><br></div><div><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div style="text-align:left"><font size="2">Regards,</font></div><div style="text-align:left"><font size="2"><b>Arpit Makhiyaviya</b></font></div><div><span style="font-size:12.8000001907349px">Software Engineer</span><br></div><div><a href="tel:%2B91-79-40038284" value="+917940038284" target="_blank">+91-79-40038284</a></div><div>+91-971-437-6669</div><div><a href="http://www.sculptsoft.com" target="_blank"><img src="http://sculptsoft.com/images/logo3.png" height="24" width="96"></a><br></div></div></div></div></div></div>
</div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div>