Hi,
On Wed, Apr 25, 2012 at 2:16 PM, José Valerio <jose.vale...@unine.ch> wrote: > > - 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. > 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. - 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.) > 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. The XML contents are documented in the xsd files that can be downloaded from the api documentation [1]. The files src/vnm_mad/remotes/*.rb should provide you a base to start your own driver. Regards. [1] http://opennebula.org/documentation:rel3.4:api -- Carlos Martín, MSc Project Engineer OpenNebula - The Open-source Solution for Data Center Virtualization www.OpenNebula.org | cmar...@opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmar...@opennebula.org> On Wed, Apr 25, 2012 at 2:16 PM, José Valerio <jose.vale...@unine.ch> wrote: > Hi Jaime > > Thanks for the prompt answer! > > Now I have 2 more questions: > > - 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. > > - 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.) > > Thanks again. > > José > > > On 04/25/2012 01:35 PM, Jaime Melis wrote: > > Hello José, > > 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. > > 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: > > system("/path/to/another/script.sh") > > Regards, > Jaime > > On Wed, Apr 25, 2012 at 1:29 PM, José Valerio <jose.vale...@unine.ch>wrote: > >> Hello, >> >> 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... >> >> 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? >> >> I'm using OpenNebula 3.4 >> >> thanks in advance >> >> José Valerio >> Université de Neuchâtel >> _______________________________________________ >> Users mailing list >> Users@lists.opennebula.org >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> > > > > -- > Jaime Melis > Project Engineer > OpenNebula - The Open Source Toolkit for Cloud Computing > www.OpenNebula.org | jme...@opennebula.org > > > > _______________________________________________ > Users mailing list > Users@lists.opennebula.org > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org