[ovirt-users] Issues in IP Assigning using API

Shahar Havivi shaharh at redhat.com
Mon Jun 30 10:48:49 UTC 2014


On 30.06.14 16:01, Shanil S wrote:
> Hi,
> 
> I am assigning IP using the REST API as like
> http://www.ovirt.org/Features/Cloud-Init_Integration but it seems the IP is
> not assigning to the vm. But the other details like host address etc are
> correctly saving. I am using cloud init to assign IP address
What is the guest os that you are using?
> 
> 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 ?

> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users




More information about the Users mailing list