mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
* F #2320 Migrate images to/from KVM / vCenter DS * Update downloader.sh * Update downloader.sh
This commit is contained in:
1 parent
09880ab5ce
commit
8ca5a4b7b4
1 file changed
+10
-6
@@ -224,7 +224,7 @@ function get_rbd_cmd
|
||||
echo "ssh '$(esc_sq "$DST_HOST")' \"$RBD export '$(esc_sq "$SOURCE")' -\""
|
||||
}
|
||||
|
||||
TEMP=`getopt -o m:s:l:c:n -l md5:,sha1:,limit:,max-size:,nodecomp -- "$@"`
|
||||
TEMP=`getopt -o m:s:l:c:n -l md5:,sha1:,limit:,max-size:,convert:,nodecom -- "$@"`
|
||||
|
||||
if [ $? != 0 ] ; then
|
||||
echo "Arguments error" >&2
|
||||
@@ -428,9 +428,13 @@ if [ ! -z "$CONVERT" ]; then
|
||||
original_type=$(get_original_type)
|
||||
convert_type=$CONVERT
|
||||
|
||||
convert="qemu-img convert -f "$original_type" -O "$convert_type" "$TO" "$tmpimage""
|
||||
# if the type of the image differs from the target type we need to convert the image
|
||||
if [ "$original_type" != "$convert_type" ]; then
|
||||
convert="qemu-img convert -f "$original_type" -O "$convert_type" "$TO" "$tmpimage""
|
||||
eval "$convert"
|
||||
|
||||
# Move tmp image to get the final image
|
||||
mvcommand="mv "$tmpimage" "$TO""
|
||||
eval "$mvcommand"
|
||||
fi
|
||||
# Move tmp image to get the final image
|
||||
mvcommand="mv "$tmpimage" "$TO""
|
||||
eval "$mvcommand"
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user