[ovirt-users] Issues in IP Assigning using API

Shanil S xielesshanil at gmail.com
Mon Jun 30 11:02:26 UTC 2014


Hi Shahar,

I am using cent os for creating vm


On Mon, Jun 30, 2014 at 4:18 PM, Shahar Havivi <shaharh at redhat.com> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140630/93393a68/attachment-0001.html>


More information about the Users mailing list