1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #1437: Pick the right host

This commit is contained in:
Tino Vazquez 2012-09-20 16:17:42 +02:00
parent 4841c62481
commit 82e4b46aab

View File

@ -42,13 +42,6 @@ fi
source $(dirname $0)/tm_vmfsrc
if [ "$USE_SSH" != "yes" ]; then
DST_HOST=`arg_host $DST`
USERNAME=`echo $(cat $VMWARERC |grep ":username:"|cut -d":" -f 3|tr -d '"')`
PASSWORD=`echo $(cat $VMWARERC |grep ":password:"|cut -d":" -f 3|tr -d '"')`
VI_PARAMS="--server $DST_HOST --username $USERNAME --password $PASSWORD"
fi
set_ds_location
#-------------------------------------------------------------------------------
@ -59,6 +52,12 @@ DST_PATH=`arg_path $DST`
DST_PATH="$RMT_DS_DIR/${DST_PATH##"$DS_DIR/"}/disk.vmdk"
SRC_HOST=`arg_host $SRC`
if [ "$USE_SSH" != "yes" ]; then
USERNAME=`echo $(cat $VMWARERC |grep ":username:"|cut -d":" -f 3|tr -d '"')`
PASSWORD=`echo $(cat $VMWARERC |grep ":password:"|cut -d":" -f 3|tr -d '"')`
VI_PARAMS="--server $SRC_HOST --username $USERNAME --password $PASSWORD"
fi
#-------------------------------------------------------------------------------
# Move the image back to the datastore
#-------------------------------------------------------------------------------