To do this you can create a new datastore or modify the one that already exists. You can take a look at fs datastore that is located at /var/lib/remotes/datastore/fs. This directory holds the scripts that manage the fs datastore. For example, the clone script takes the source path (or url) and stores it in the destination (path generated by OpenNebula). After the copy is done it prints the path of the new image. Here you can create a new file ($DST) that contains the url of the image and then in the tm read back the url to download it.
Another way could be exporting a datastore by http and changing tm's to wget instead of cp/scp from a base directory. TM's are located at /var/lib/one/remotes/tm. More info at http://opennebula.org/documentation:rel3.6:sd These are just ideas and they are maybe a bit cumbersome. On Tue, Jul 3, 2012 at 9:44 AM, KC LO <kclo2...@gmail.com> wrote: > Dear all, > > From /var/lib/one/remotes/tm/ssh directory, it has a clone script which is > used to transfer the source VM image to the destination host for VM creation > through ssh/scp. Under this script, I found that it will check the $SRC > whether it has "http" and use wget to get the image. Where in SunStone or > oneadmin command to create a image repository as a Web server? I think that > wget is more efficient and faster than ssh/scp. > > Thanks! > > case $SRC in > http://*) > log "Downloading $SRC" > RMT_CMD="$WGET -O $DST_PATH $SRC" > ssh_exec_and_log "$DST_HOST" "$RMT_CMD" "Error downloading $SRC" > ;; > > *) > log "Cloning $SRC in $DST_PATH" > exec_and_log "$SCP -r $SRC $DST" "Error copying $SRC to $DST" > ;; > esac > > > > _______________________________________________ > Users mailing list > Users@lists.opennebula.org > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > -- Javier Fontán Muiños Project Engineer OpenNebula - The Open Source Toolkit for Data Center Virtualization www.OpenNebula.org | jfon...@opennebula.org | @OpenNebula _______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org