mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
8950f89525
commit
d245a0fe9b
@ -30,13 +30,16 @@ VM_ID=$4
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
|
||||
LIB_LOCATION=/usr/lib/one
|
||||
else
|
||||
TMCOMMON=$ONE_LOCATION/var/remotes/tm/tm_common.sh
|
||||
LIB_LOCATION=$ONE_LOCATION/lib
|
||||
fi
|
||||
|
||||
DRIVER_PATH=$(dirname $0)
|
||||
|
||||
source $TMCOMMON
|
||||
source $LIB_LOCATION/sh/scripts_common.sh
|
||||
source ${DRIVER_PATH}/../../datastore/libfs.sh
|
||||
source ${DRIVER_PATH}/../../etc/tm/fs_lvm/fs_lvm.conf
|
||||
source ${DRIVER_PATH}/../../etc/datastore/datastore.conf
|
||||
@ -63,7 +66,7 @@ unset i j XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <(onevm show -x $VMID | $XPATH \
|
||||
done < <(onevm show -x $VM_ID | $XPATH \
|
||||
/VM/TEMPLATE/DISK[DISK_ID=$DISK_ID]/FS)
|
||||
|
||||
FS="${XPATH_ELEMENTS[j++]}"
|
||||
@ -90,6 +93,9 @@ exclusive "${LOCK}" 120 ssh_exec_and_log "$DST_HOST" "$CREATE_CMD" \
|
||||
"Error creating LV named $LV_NAME"
|
||||
|
||||
MKIMAGE_CMD=$(cat <<EOF
|
||||
# prints function content
|
||||
$(type contains| grep -v 'is a function')
|
||||
|
||||
set -e -o pipefail
|
||||
export PATH=/usr/sbin:/sbin:\$PATH
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user