Hi,<br><br><div class="gmail_quote">On Fri, Oct 19, 2012 at 10:35 AM, Valentin Bud <span dir="ltr"><<a href="mailto:valentin@hackaserver.com" target="_blank">valentin@hackaserver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im"><br></div>`onevnet` can also update the NETWORK_MASK. Can someone from OpenNebula<br>dev answer with a small explanation why can't other attributes be change<br>using `onevnet update`?</blockquote><div>

<br></div><div>The update command will only change the attributes of the VNet template, not the "internal" attributes . If you take a look at the xml output of 'onevnet show id -x', the bridge is VNET/BRIDGE, whereas the network mask is VNET/TEMPLATE/NETWORK_MASK</div>

<div><br></div><div><br></div><div>If it is really useful, we can add the option to update specific internal attributes. For example, the 'onedatastore update' command will let you update the internal DS_MAD and TM_MAD attributes.</div>

<div><br></div><div>Regards</div><div><br></div></div>--<br>Carlos Martín, MSc<br>Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization<div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>

<br>
<br><br><div class="gmail_quote">On Fri, Oct 19, 2012 at 10:35 AM, Valentin Bud <span dir="ltr"><<a href="mailto:valentin@hackaserver.com" target="_blank">valentin@hackaserver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello Alvaro,<br>
<div class="im"><br>
On Fri, Oct 19, 2012 at 10:02:16AM +0200, Alvaro Simon wrote:<br>
> Hi Valentin:<br>
><br>
> Thanks a lot for your quick answer<br>
> > On Thu, Oct 18, 2012 at 06:16:22PM +0200, Alvaro Simon wrote:<br>
> >> Dear OpenNebula developers<br>
> >><br>
> >> We have crated a fixed virtual network some time ago with a specific<br>
> >> bridge (virbrA).<br>
> >><br>
> >> Now we did some changes in our network, we are using a new IP rank but<br>
> >> for practical reasons we want to still use the same vnetid. We have<br>
> >> updated our vnet to change its bridge (by virbrB) but when we<br>
> >> instantiate new machines, the IP is assigned correctly but it still uses<br>
> >> the old bridge name (virbrA). How we can change the bridge name without<br>
> >> create a new vnet?<br>
> ><br>
> > I suppose you mean the name of the bridge from virtual network with ID,<br>
> > for example 7.<br>
> ><br>
><br>
> Yes, exactly and executing<br>
> '#onevnet update 294' is not enough<br>
<br>
</div>`onevnet` can also update the NETWORK_MASK. Can someone from OpenNebula<br>
dev answer with a small explanation why can't other attributes be change<br>
using `onevnet update`?<br>
<div class="im"><br>
><br>
> > If you use MySQL as a database the following steps work.<br>
> ><br>
> > $ onevnet list | grep 7<br>
> >    7 wiz          oneadmin     test            -               R test 0<br>
> ><br>
> > $ mysql -u root -p<br>
> > use opennebula;<br>
> > update network_pool set body='<VNET><ID>7</ID><UID>2</UID><GID>0</GID><UNAME>wiz</UNAME><GNAME>oneadmin</GNAME><NAME>test</NAME><PERMISSIONS><OWNER_U>1</OWNER_U><OWNER_M>1</OWNER_M><OWNER_A>0</OWNER_A><GROUP_U>0</GROUP_U><GROUP_M>0</GROUP_M><GROUP_A>0</GROUP_A><OTHER_U>0</OTHER_U><OTHER_M>0</OTHER_M><OTHER_A>0</OTHER_A></PERMISSIONS><CLUSTER_ID>-1</CLUSTER_ID><CLUSTER></CLUSTER><TYPE>0</TYPE><BRIDGE>*virbrB*</BRIDGE><VLAN>1</VLAN><PHYDEV/><VLAN_ID>3</VLAN_ID><RANGE><IP_START>192.168.18.50</IP_START><IP_END>192.168.18.254</IP_END></RANGE><TOTAL_LEASES>0</TOTAL_LEASES><TEMPLATE><NETWORK_MASK><![CDATA[255.255.255.0]]></NETWORK_MASK></TEMPLATE></VNET>' where oid=7;<br>


> > quit<br>
> ><br>
> > And the next step would be to check if that really changed things:<br>
> > $ onevnet list | grep 7<br>
> >    7 wiz          oneadmin     test            -               R virbrB 0<br>
> ><br>
> > I didn't come up with the `body` data. I just copied it using the<br>
> > following MySQL query:<br>
> ><br>
> > use opennebula;<br>
> > select body from network_pool where oid=7 \G<br>
><br>
><br>
> We have checked as you have suggested ON database, and yes the xml field<br>
> was not updated... (maybe is this an ON issue?)<br>
><br>
>  <VNET><ID>294</ID><UID>19</UID><GID>128</GID><UNAME>egitest</UNAME><GNAME>egi</GNAME><NAME>EGI fedcloud</NAME><PERMISSIONS><OWNER_U>1</OWNER_U><OWNER_M>1</OWNER_M><OWNER_A>0</OWNER_A><GROUP_U>1</GROUP_U><GROUP_M>0</GROUP_M><GROUP_A>0</GROUP_A><OTHER_U>0</OTHER_U><OTHER_M>0</OTHER_M><OTHER_A>0</OTHER_A></PERMISSIONS><TYPE>1</TYPE><BRIDGE>virbrA</BRIDGE><VLAN>0</VLAN><PHYDEV/><VLAN_ID/><TOTAL_LEASES>2</TOTAL_LEASES><TEMPLATE><BRIDGE><![CDATA[virbrB]]></BRIDGE><DNS><![CDATA[xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx]]></DNS><GATEWAY><![CDATA[xxx.xxx.xxx.xxx]]></GATEWAY><LEASES><IP><![CDATA[xxx.xxx.xxx.xxx]]></IP></LEASES><LEASES><IP><![CDATA[xxx.xxx.xxx.xxx]]></IP></LEASES><LEASES><IP><![CDATA[xxx.xxx.xxx.xxx]]></IP></LEASES><LEASES><IP><![CDATA[xxx.xxx.xxx.xxx]]></IP></LEASES><NAME><![CDATA[EGI fedcloud]]></NAME><TYPE><![CDATA[FIXED]]></TYPE></TEMPLATE></VNET><br>


><br>
><br>
> It was changed <BRIDGE><![CDATA[virbrB]]></BRIDGE>, but<br>
> <BRIDGE>virbrA</BRIDGE> is still the same so the VMs are not<br>
> instantiated correctly.<br>
><br>
> We have changed it (<BRIDGE>virbrB</BRIDGE><br>
> ..<BRIDGE><![CDATA[virbrB]]></BRIDGE>...) and now its working fine.<br>
<br>
</div>Thanks for pointing this out. I have never actually needed to do this<br>
but it was a nice OpenNebula exercise and now we know how we change<br>
stuff in the database if we need too :).<br>
<br>
><br>
><br>
> Cheers and thanks!<br>
> Alvaro<br>
><br>
<br>
Cheers & Goodwill,<br>
<div class="HOEnZb"><div class="h5">v<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</div></div></blockquote></div><br>