From 5db65a63632f971c89961057ae974dbb36a1470b Mon Sep 17 00:00:00 2001 From: Simon Weller Date: Fri, 5 Oct 2018 08:05:09 -0500 Subject: [PATCH] kvm: Fixes #2868 libvirt resize notify failure (#2878) Incorrect diskpath information was being sent to virsh blockresize, so the block device size was never refreshed to reflect the new disk size. Fixes #2868 --- scripts/storage/qcow2/resizevolume.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/storage/qcow2/resizevolume.sh b/scripts/storage/qcow2/resizevolume.sh index da77cb1adca..136abd1e496 100755 --- a/scripts/storage/qcow2/resizevolume.sh +++ b/scripts/storage/qcow2/resizevolume.sh @@ -92,7 +92,8 @@ notifyqemu() { if `virsh domstate $vmname >/dev/null 2>&1` then sizeinkb=$(($newsize/1024)) - virsh blockresize --domain $vmname --path $path --size $sizeinkb >/dev/null 2>&1 + devicepath=$(virsh domblklist $vmname | grep $path | awk '{print $1}') + virsh blockresize --path $devicepath --size $sizeinkb $vmname >/dev/null 2>&1 retval=$? if [ -z $retval ] || [ $retval -ne 0 ] then