<div dir="ltr"><div>Hi Juan,<br><br></div>These are the xml details which i used for the vm start function, please check it<br><br><br><br><br><br><br><action><br> <vm><br> <os><br>
<boot dev='cdrom'/> <br> </os><br> <initialization><br> <cloud_init><br> <br>
<users><br> <user><br> <user_name>root</user_name><br> <password></password><br>
</user><br> </users><br> <network_configuration><br> <nics><br> <nic><br>
<interface>virtio</interface> <br> <name>eth0</name><br> <boot_protocol>static</boot_protocol><br>
<mac address='xx:xx:xx:xx:xx:xx'/><br> <network><br> <ip address='xx.xx.xx.xx' netmask='255.255.255.0' gateway='xx.xx.xx.xx'/><br>
</network><br> <on_boot>true</on_boot><br> <vnic_profile id='bbabc471-667d-4221-bc8e-4ab30b3dcc34' /><br>
</nic><br> <nic><br> <interface>virtio</interface> <br> <name>eth1</name><br>
<mac address='xx:xx:xx:xx:xx:xx'/><br> <network><br> <ip address='xx.xx.xx.xx' netmask='255.255.255.0' gateway=''/><br>
</network><br> <on_boot>true</on_boot><br> <vnic_profile id='bbabc471-667d-4221-bc8e-4ab30b3dcc34' /><br>
</nic><br> </nics><br> <dns><br> <servers><br> <host><br>
<address>8.8.8.8</address><br> </host><br> </servers><br> </dns><br>
</network_configuration><br> </cloud_init><br> </initialization><br> </vm><br> </action><br><br>
<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span>-- <br></span>Regards
<br>Shanil
</div></div>
<br><br><div class="gmail_quote">On Fri, Aug 29, 2014 at 2:15 PM, Juan Hernandez <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On 08/29/2014 05:30 AM, Shanil S wrote:<br>
> Hi Dan,<br>
><br>
> Please ignore the previous screenshot and check this.<br>
><br>
> --<br>
> Regards<br>
> Shanil<br>
><br>
><br>
> On Fri, Aug 29, 2014 at 8:49 AM, Shanil S <<a href="mailto:xielesshanil@gmail.com">xielesshanil@gmail.com</a><br>
</div><div class="">> <mailto:<a href="mailto:xielesshanil@gmail.com">xielesshanil@gmail.com</a>>> wrote:<br>
><br>
> Hi Dan,<br>
><br>
> I have attached the screenshot of the console, please check it.<br>
><br>
> --<br>
> Regards<br>
> Shanil<br>
><br>
><br>
> On Thu, Aug 28, 2014 at 4:46 PM, Dan Kenigsberg <<a href="mailto:danken@redhat.com">danken@redhat.com</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:danken@redhat.com">danken@redhat.com</a>>> wrote:<br>
><br>
> On Thu, Aug 28, 2014 at 01:50:22PM +0530, Shanil S wrote:<br>
> > Hi Aill,<br>
> ><br>
> > We are creating two nics using the api, but it seems the<br>
> second network is<br>
> > not come up and the first one is working. The following xml is<br>
> used to for<br>
> > the nic creation<br>
> ><br>
> > <nic><br>
> > <interface>virtio</interface><br>
> > <name>eth0</name><br>
> > <boot_protocol>static</boot_protocol><br>
> > <mac address='".$ip->mac_address."'/><br>
> > <network><br>
> > <ip address='".$ip->mac_ip."' netmask='255.255.255.0'<br>
> > gateway='".$ip->mac_gateway."'/><br>
> > </network><br>
> > <on_boot>true</on_boot><br>
> > <vnic_profile id='bbabc471-667d-4221-bc8e-4ab30b3dcc34' /><br>
> > </nic><br>
> ><br>
> > <nic><br>
> > <interface>virtio</interface><br>
> > <name>eth1</name><br>
> > <boot_protocol>static</boot_protocol><br>
> > <mac address='".$ip->mac_address."'/><br>
> > <network><br>
> > <ip address='".$ip->mac_ip."' netmask='255.255.255.0'<br>
> > gateway='".$ip->mac_gateway."'/><br>
> > </network><br>
> > <on_boot>true</on_boot><br>
> > <vnic_profile id='037d806f-d76b-4da3-84b6-ac7a5087f836' /><br>
> > </nic><br>
> ><br>
> > When i checked the configuration file<br>
> > (/etc/sysconfig/network-scripts/ifcfg-eth1) after creating...i<br>
> find it<br>
> > seems the ONBOOT=no.....eventhough we set it true from the<br>
> api. Is this a<br>
> > bug ?<br>
><br>
> I do not know what "on_boot" means in oVirt API, but it<br>
> certainly is not<br>
> passed to Vdsm or the guest, and as such cannot control what's<br>
> in the<br>
> guest's /etc/sysconfig/network-scripts/ifcfg-eth1.<br>
><br>
> The guest may have ifcfg files, it may run NetworkManager, or it<br>
> may be<br>
> Ubunto or Windows. oVirt is responsible to exposing a (virtual)<br>
> NIC to<br>
> the guest, but does not interfere with its configuration.<br>
><br>
> Dan<br>
><br>
<br>
</div></div>The on_boot parameter that you pass when creating the NIC is completely<br>
ignored, like all the other IP configuration parameters.<br>
<br>
But looking at your screenshot it looks like you are already using<br>
cloud-init to solve this. Are you using those <nic>...</nic> XML<br>
documents as part of larger request to create a VM? In that case we need<br>
to check the complete XML document in order to see if there is something<br>
wrong. Can you share it?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.<br>
</font></span></blockquote></div><br></div>