The following is the xml which i used for assigning IP
$xml_data = "
<action>
<vm>
<os>
<boot dev='cdrom'/>
</os>
<initialization>
<cloud_init>
<host>
<address>TestMachine</address>
</host>
<users>
<user>
<user_name>username</user_name>
<password>adminpassw</password>
</user>
</users>
<network_configuration>
<nics>
<nic>
<name>eth0</name>
<boot_protocol>none</boot_protocol>
<network>
<ip address='x.x.x.x' netmask='255.255.0.0' gateway='x.x.x.x'/>
</network>
<on_boot>true</on_boot>
</nic>
</nics>
<dns>
<servers>
<host>
<address>8.8.8.8</address>
</host>
</servers>
</dns>
</network_configuration>
</cloud_init>
</initialization>
</vm>
</action>";
The above xml is called with the start function of API. IP is assigned from the ovirt portal and the issue is only when assigning it from the REST API. If anyone knows could you please check if any issues with the it ?