mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
bug #1973: SSH drivers handle corerectly CDROMs for VMware
This commit is contained in:
1 parent
b56032db5e
commit
5a019a805e
1 file changed
+20
@@ -51,6 +51,21 @@ DST_DIR=`dirname $DST_PATH`
|
||||
|
||||
ssh_make_path $DST_HOST $DST_DIR
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Get image information
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin"
|
||||
|
||||
unset i XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <(onevm show -x $VMID| $XPATH \
|
||||
/VM/TEMPLATE/DISK[DISK_ID=$DISK_ID]/TYPE )
|
||||
|
||||
DISK_TYPE="${XPATH_ELEMENTS[0]}"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Copy files to the remote host
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -66,3 +81,8 @@ http://*)
|
||||
exec_and_log "$SCP -r $SRC $DST" "Error copying $SRC to $DST"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$DISK_TYPE" = "CDROM" ]; then
|
||||
ssh_exec_and_log "$DST_HOST" "ln -s $DST_PATH $DST_PATH.iso" \
|
||||
"Error soft linking CDROM $DST.iso"
|
||||
fi
|
||||
Reference in new issue
Block a user