<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">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>