<div dir="ltr">Hello Kerry,<div><br></div><div>Do you have a registered image of type CONTEXT with the name of `test.sh`</div><div>in the files datastore?</div><div><br></div><div>The file you specify in FILES_DS can be found in the contextualization CDROM</div><div>on the VM (/dev/disk/by-label/CONTEXT). </div><div><br></div><div>The following would run a `test.sh` script when the VM is spun up at the end</div><div>of the contextualization routine [1].</div><div><br></div><div>CONTEXT = [</div><div>  <span style="font-size:13px;font-family:arial,sans-serif">FILES_DS="$FILE[IMAGE=\"test.</span><span style="font-size:13px;font-family:arial,sans-serif">sh\"]",</span></div><div><span style="font-size:13px;font-family:arial,sans-serif">  INIT_SCRIPTS="test.sh",</span></div><div><span style="font-size:13px;font-family:arial,sans-serif">  ...</span></div><div><font face="arial, sans-serif">]</font></div><div><br></div><div><font face="arial, sans-serif">[1]: <a href="https://github.com/OpenNebula/addon-context-linux/blob/master/base/etc/one-context.d/99-execute-scripts">https://github.com/OpenNebula/addon-context-linux/blob/master/base/etc/one-context.d/99-execute-scripts</a></font></div><div><br></div><div>Best,</div><div>Valentin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 8, 2014 at 11:09 PM, kerryhall . <span dir="ltr"><<a href="mailto:kerryhall@gmail.com" target="_blank">kerryhall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks! I'm still having issues here unfortunately. I tried putting:<br><br><div>FILES_DS="$FILE[IMAGE=\"test.sh\"]"<br><br></div><div>into my template context section, but I get:<br><br></div><div>"User 0 does not own an image with name: test.sh"<br><br></div><div>I'm not trying to include an image, I just want test.sh (a file in my file datastore) to get copied to anywhere on my vm's filesystem. (And eventually, I want test.sh to get run on vm creation, or failing that, every time the vm starts)<br><br>Thanks!!<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 11:18 PM, Valentin Bud <span dir="ltr"><<a href="mailto:valentin.bud@gmail.com" target="_blank">valentin.bud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Kerry,<div><br></div><div>Under "Defining Context" [1] there is an example how to use FILES_DS.</div><div><br></div><div>FILES_DS="$FILE[IMAGE=\"test.sh\"]</div><div><br></div>


<div>[1]: <a href="http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html" target="_blank">http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html</a></div><div><br></div><div>Best,</div><div>Valentin</div>

<div><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Fri, Jul 25, 2014 at 11:29 PM, kerryhall . <span dir="ltr"><<a href="mailto:kerryhall@gmail.com" target="_blank">kerryhall@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div><div><div><div>Hi folks,<br><br>I am trying to run a bash script on a vm as it gets spun up. I've read:<br>


<a href="http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html" target="_blank">http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html</a><br>
<br></div>but there isn't too much to go on there. <br><br></div>I have created "test.sh" and put it into the "files" datastore on the head node. <br><br></div>The issue I am having is that the syntax in the "Defining Context" section of <a href="http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html" target="_blank">http://docs.opennebula.org/4.6/user/virtual_machine_setup/cong.html</a> is ambiguous, specifically the "files_ds" section. I have tried:<br>



<br></div>FILES_DS="$FILE[\"test.sh\"]"<br><br></div>and <br></div>FILES_DS="/var/lib/one/datastores/2/test.sh"<br><br></div><div>As a first step, I'm just trying to get this file included in my vm at all.<br>



</div><div><br></div>Thanks!<br></div>Kerry<br><div><div><div><div><div><div><br></div></div></div></div></div></div></div>
<br></div></div>_______________________________________________<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>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>