Hi Steven,<div><div><br><div class="gmail_quote">On 4 February 2011 05:22, Steven Timm <span dir="ltr"><<a href="mailto:timm@fnal.gov">timm@fnal.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">hOn Thu, 3 Feb 2011, Steven Timm wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I am trying to come up with a prescription for users that allows the<br>
following sequence:<br>
<br>
1) Launch a VM based on a standard VM repository template<br>
<br>
2) Save the contents of the VM back to the VM repositor\<br>
<br>
3) Relaunch the VM without modifying the template.<br>
<br>
I've tried the following thus far:<br>
<br>
1) Launch the VM initially from a VM OS file outside the VM repository<br>
with save=yes.  this does save the VM OS but just to<br>
/var/lib/one/<vmid>/disk.0, not back to the original file.<br>
User must copy that file somewhere and/or change their template.<br>
<br>
1a) Launch the VM and then execute a onevm saveas command.<br>
   this gets a copy of the image back to the image repository<br>
   but again user must modify the template to relaunch the VM.<br>
<br>
2) Make a public VM image in the repository, launch from that.<br>
Problems--even if image is public, other users (even oneadmin) can't read it and sometimes I myself can't read it, without going into<br>
the image repo and chmod'ing the file by hand.  And again<br>
you are forced to save back to something other than the original file.<br>
<br>
3) Make a persistent non-public image in the repository.<br>
Again there are permission problems launching, and it can only<br>
be used once by one user.  Even so I can't get it to save back to the<br>
repository.<br>
<br>
</blockquote></div>
If the user makes and saves the persistent non-public image<br>
in the repository, it is then necessary to go in and<br>
change the permissions on the file in the repository, otherwise<br>
the oneadmin user can't read it.  But once this is done,<br>
it is possible to start the VM from the repository and save it<br>
back to the same place in the repository when it is done.<br>
<br></blockquote><div><br></div><div><meta charset="utf-8"><div>When OpenNebula is installed, the images directory is set up with the sticky bit. From install.sh:</div><div>chmod 3770 $DESTDIR$IMAGES_LOCATION</div><div><br>

</div><div>In [1], it says</div><div><br></div><br>"The IMAGE_REPOSITORY_PATH can be changed to another administrator defined folder. This folder will need to be created with special permissions to ensure its consistency. It will need full permissions for writting new files for any user, and:<br>

<br>* the sticky bit, so other users are allowed to read other user files, but aren't allowed to erase them<br>* the setgid, so all the files copied to the image repository end up with oneadmin group<br><br>This can be achieved with “chmod 3770 /path/to/image/repository/”."<br>

<br><div><br></div><div>If you changed the images path, or if for some reason you deleted the var directory, you'll need to recreate the sticky bit configuration.<br><div>In order to let other users register images, you have to either let anyone write in the images path, or add all your OpenNebula regular users to oneadmin's group.</div>

</div></div><div><br></div><div>Could you please check your configuration? If you continue having troubles, please send us your installation directory permissions.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


Next step--to make a public non-persistent generic image<br>
in the repo, and then have a "clone" function such that<br>
a user can make a non-public persistent image from it and<br>
fork off their VM and save it from there on.  Anyone else interested?<br>
<br></blockquote><div><br></div><div>What's your goal? to control it somehow in the VM template, or rather create a new command such as:</div><div>oneimage clone "Original_public_image" "My_private_copy" ?</div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Steve Timm<div><div></div><div class="h5"><br>
<br>
<br></div></div></blockquote><div><br></div><div>Best regards,</div><div>Carlos.</div><div><meta charset="utf-8"><div><br></div><div>[1] <a href="http://opennebula.org/documentation:rel2.0:oned_conf#image_repository">http://opennebula.org/documentation:rel2.0:oned_conf#image_repository</a></div>

<div><br></div><div>Carlos Martín, Cloud Technology Engineer/Researcher<br>DSA Research Group: web <a href="http://dsa-research.org/" target="_blank">http://dsa-research.org</a> and blog <a href="http://blog.dsa-research.org/" target="_blank">http://blog.dsa-research.org</a><br>

OpenNebula Open Source Toolkit for Cloud Computing: <a href="http://www.opennebula.org/" target="_blank">http://www.OpenNebula.org</a><br></div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div class="h5">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Everything that we need to do is doable, but it takes hacking around<br>
with the template every time to be able to launch where we<br>
left off.  We need a way to make things more seamless.<br>
<br>
Steve Timm<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
-- <br>
------------------------------------------------------------------<br>
Steven C. Timm, Ph.D  (630) 840-8525<br>
<a href="mailto:timm@fnal.gov" target="_blank">timm@fnal.gov</a>  <a href="http://home.fnal.gov/~timm/" target="_blank">http://home.fnal.gov/~timm/</a><br>
Fermilab Computing Division, Scientific Computing Facilities,<br>
Grid Facilities Department, FermiGrid Services Group, Group Leader.<br>
Lead of FermiCloud project.<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>
</div></div></blockquote></div><br></div></div>