You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2018/10/05 13:06:03 UTC
[cloudstack] branch 4.11 updated: kvm: Fixes #2868 libvirt resize
notify failure (#2878)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.11 by this push:
new 5db65a6 kvm: Fixes #2868 libvirt resize notify failure (#2878)
5db65a6 is described below
commit 5db65a63632f971c89961057ae974dbb36a1470b
Author: Simon Weller <si...@gmail.com>
AuthorDate: Fri Oct 5 08:05:09 2018 -0500
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 da77cb1..136abd1 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