From d5b5a4d5a42729d7eb2895739a6b91cf7e821205 Mon Sep 17 00:00:00 2001 From: Anton Todorov Date: Fri, 9 Aug 2024 11:29:46 +0300 Subject: [PATCH] B #6689: append --block to change-media call in reconfigure when the $ISO_PATH is a block device (cherry picked from commit bf43d43bec4a87c61d1b600fedada6cb1279b09e) --- src/vmm_mad/remotes/kvm/reconfigure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vmm_mad/remotes/kvm/reconfigure b/src/vmm_mad/remotes/kvm/reconfigure index 81e4b18a2a..78ddbe8833 100755 --- a/src/vmm_mad/remotes/kvm/reconfigure +++ b/src/vmm_mad/remotes/kvm/reconfigure @@ -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