[one-users] How to use wget to get source image during VM creation

KC LO kclo2000 at gmail.com
Tue Jul 3 00:44:25 PDT 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120703/435b2c92/attachment-0002.htm>


More information about the Users mailing list