[ovirt-users] Issues in IP Assigning using API

Shahar Havivi shaharh at redhat.com
Tue Jul 1 14:41:05 UTC 2014


When you run the VM with cloud-init you get a cdrom with the cloud-init
content.
Try to mount the cdrom something like:
$ mount /dev/sr1 mydir
and look at the content of the network file at:
$ cat mydir/openstack/content/0000


On 01.07.14 17:10, Shanil S wrote:
> Hi Seven,
> 
> okay.. Thanks..
> 
> 
> On Tue, Jul 1, 2014 at 4:31 PM, Sven Kieske <S.Kieske at mittwald.de> wrote:
> 
> > CC'ed michal, maybe he finds an error in your xml.
> >
> > Am 30.06.2014 12:31, schrieb Shanil S:
> > > 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
> > >
> > > 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
> > >
> >
> > --
> > Mit freundlichen Grüßen / Regards
> >
> > Sven Kieske
> >
> > Systemadministrator
> > Mittwald CM Service GmbH & Co. KG
> > Königsberger Straße 6
> > 32339 Espelkamp
> > T: +49-5772-293-100
> > F: +49-5772-293-333
> > https://www.mittwald.de
> > Geschäftsführer: Robert Meyer
> > St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
> > Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
> > _______________________________________________
> > Users mailing list
> > Users at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> >

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




More information about the Users mailing list