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

B #6689: append --block to change-media call in reconfigure

when the $ISO_PATH is a block device

(cherry picked from commit bf43d43bec4a87c61d1b600fedada6cb1279b09e)
(cherry picked from commit d5b5a4d5a42729d7eb2895739a6b91cf7e821205)
This commit is contained in:
Anton Todorov 2024-08-09 11:29:46 +03:00 committed by Ruben S. Montero
parent 0f8d43a4be
commit 9f92eabab1
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -25,8 +25,9 @@ ISO_PATH=$3
if [[ -n "$DOMAIN" ]] && [[ -n "$TARGET_DEVICE" ]] && [[ -n "$ISO_PATH" ]]
then
test -b "$ISO_PATH" && EXTRA_ARGS="--block" || EXTRA_ARGS=""
CMD="virsh --connect $LIBVIRT_URI \
change-media $DOMAIN $TARGET_DEVICE $ISO_PATH --insert"
change-media $DOMAIN $TARGET_DEVICE $ISO_PATH --insert $EXTRA_ARGS"
exec_and_log "$CMD" "Could not insert CDROM $ISO_PATH to $TARGET_DEVICE"
fi