[one-users] putting OS images in the image repository

Steven Timm timm at fnal.gov
Tue Nov 30 12:56:14 PST 2010


In
http://www.opennebula.org/documentation:rel2.0:img_guide

it says

"When images are published they are always cloned, and persistent images 
are never cloned. Therefore, an image cannot be public and persistent at 
the same time. To manage a public image that won't be cloned, unpublish it 
first and make it persistent. "

I have stored a 10GB OS image in the repository
and made it public

-bash-3.2$ oneimage show 8
IMAGE  INFORMATION
ID             : 8
NAME           : new-2.6.18-194.26.1.img
TYPE           : OS
REGISTER TIME  : 11/29 14:15:13
PUBLIC         : Yes
PERSISTENT     : No
SOURCE         : 
/var/lib/one/image-repo/920301ec2fcc29f9c621c3ebe2a8f5ac6b27fca6
STATE          : used
RUNNING_VMS    : 2

IMAGE TEMPLATE
DEV_PREFIX=vd
NAME=new-2.6.18-194.26.1.img
-bash-3.2$


I would like to have this available as a template image for
many users to be able to use.
I have successfully been able to have 2 users
use it as part of a VM with the following syntax

DISK   = [ image = "new-2.6.18-194.26.1.img" ]


However, I find that this automatically implies a
SAVE=NO once the VM is launched, with no way to override it.
>From output of onevm show:

DISK=[
   CLONE=YES,
   DISK_ID=0,
   IMAGE=new-2.6.18-194.26.1.img,
   IMAGE_ID=8,
   READONLY=NO,
   SAVE=NO,
   SOURCE=/var/lib/one/image-repo/920301ec2fcc29f9c621c3ebe2a8f5ac6b27fca6,
   TARGET=vda,
   TYPE=DISK ]


-----------------------------------------

So is there any way to do the following:

1) have the VM registered in the repository for all to see
2) be launched public and cloned on launch so it can be used
    in multiple VM's at once
3) have the result be saved in an image-specific file when
    each VM is shut down, and not back to the repository?

***I know that if I execute the onevm saveas command I can
get this done on a machine-by-machine basis but would
prefer a way to make it automatic.
---------------------------------------------------------

The second question is closely related, namely:
Once a public image is declared in the database, is there any way
to actually update the content of that image, such that for instance
Name = "latest kernel template image"

could be periodically updated with the latest kernel
and all new VM's would pick it up?


Thanks

Steve Timm

------------------------------------------------------------------
Steven C. Timm, Ph.D  (630) 840-8525
timm at fnal.gov  http://home.fnal.gov/~timm/
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader.



More information about the Users mailing list