Hi,<div><br></div><div><br class="Apple-interchange-newline">On Wed, Apr 25, 2012 at 2:16 PM, José Valerio <span dir="ltr"><<a href="mailto:jose.valerio@unine.ch" target="_blank">jose.valerio@unine.ch</a>></span> wrote:<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">- how can I add new VN MAD? (I don't want to modify dummy, vmware, etc). i tried just creating a new directory inside the remotes/vnm dir but it didn't work. Maybe I need to do something else.<br>
</div></blockquote><div> </div><div>To create a new VNM driver, you need to create a new directory inside /var/lib/one/remotes/vnm, and execute 'onehost sync' as oneadmin in the front-end. OpenNebula will copy the new files to each Host in the next monitorization cycle. </div>
<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">- how can I use on the script things that are related to the actual VM being deployed? (like the MAC address of the VM, etc.)<br></div></blockquote></div><div><br></div><div>You have the complete VM xml information accesible trough the ruby class VM, see src/vnm_mad/remotes/OpenNebulaNetwork.rb. The operator [] lets you get the text value of any element using an expath expression.</div>
<div>The XML contents are documented in the xsd files that can be downloaded from the api documentation [1].</div><div><br></div><div>The files src/vnm_mad/remotes/*.rb should provide you a base to start your own driver.</div>
<div><br></div><div>Regards.</div><div><br></div><div>[1] <a href="http://opennebula.org/documentation:rel3.4:api">http://opennebula.org/documentation:rel3.4:api</a></div><div>--</div>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 Wed, Apr 25, 2012 at 2:16 PM, José Valerio <span dir="ltr"><<a href="mailto:jose.valerio@unine.ch" target="_blank">jose.valerio@unine.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi Jaime<br>
<br>
Thanks for the prompt answer!<br>
<br>
Now I have 2 more questions:<br>
<br>
- how can I add new VN MAD? (I don't want to modify dummy, vmware,
etc). i tried just creating a new directory inside the remotes/vnm
dir but it didn't work. Maybe I need to do something else.<br>
<br>
- how can I use on the script things that are related to the actual
VM being deployed? (like the MAC address of the VM, etc.)<br>
<br>
Thanks again.<span class="HOEnZb"><font color="#888888"><br>
<br>
José</font></span><div><div class="h5"><br>
<br>
On 04/25/2012 01:35 PM, Jaime Melis wrote:
<blockquote type="cite">
<div class="gmail_extra">Hello José,</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">of course: pre, post and clean scripts
can be any executable script you want. You may write them in
python, ruby, bash or whichever languague you may choose.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">In particular, if you want to run another
script from the existing pre/post/clean scripts you can add
lines similar to the following to them:</div>
<div class="gmail_extra">
<br>
</div>
<div class="gmail_extra">
system("/path/to/another/script.sh")</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Regards,</div>
<div class="gmail_extra">Jaime<br>
<br>
<div class="gmail_quote">
On Wed, Apr 25, 2012 at 1:29 PM, José Valerio <span dir="ltr"><<a href="mailto:jose.valerio@unine.ch" target="_blank">jose.valerio@unine.ch</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I would like to see some examples of the "pre", "post" and
"clean" scripts that one can make on VNM, I saw for example
the scripts on /var/lib/one/remotes/vnm/ebtables and they
are ruby scripts...<br>
<br>
let's say for example that I want to execute some shell
commands before deploying my VM, how could write this on the
"pre" script?<br>
<br>
I'm using OpenNebula 3.4<br>
<br>
thanks in advance<span><font color="#888888"><br>
<br>
José Valerio<br>
Université de Neuchâtel<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">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>
</font></span></blockquote>
</div>
<br>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
Jaime Melis<br>
Project Engineer<br>
OpenNebula - The Open Source Toolkit for Cloud Computing<br>
<a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>
</blockquote>
<br>
</div></div></div>
<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>
<br></blockquote></div><br>