mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8263: KVM - use virsh instead of libvirt for resizing qcow2, as libvirt bindings are insufficient
Change-Id: I08246219cb1469a46dc6a9ec76a8c3a67b0b8bf6
This commit is contained in:
parent
61a50ce5e4
commit
e77b4ae8e8
|
|
@ -1877,8 +1877,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
|
||||
s_logger.debug("Resizing volume: " + path + "," + currentSize + "," + newSize + "," + type + "," + vmInstanceName + "," + shrinkOk);
|
||||
|
||||
/* libvirt doesn't support resizing (C)LVM devices, so we have to do that via a Bash script */
|
||||
if (pool.getType() != StoragePoolType.CLVM) {
|
||||
/* libvirt doesn't support resizing (C)LVM devices, and corrupts QCOW2 in some scenarios, so we have to do these via Bash script */
|
||||
if (pool.getType() != StoragePoolType.CLVM && vol.getFormat() != PhysicalDiskFormat.QCOW2) {
|
||||
s_logger.debug("Volume " + path + " can be resized by libvirt. Asking libvirt to resize the volume.");
|
||||
try {
|
||||
Connect conn = LibvirtConnection.getConnection();
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ then
|
|||
resizelvm
|
||||
elif [ "$ptype" == "QCOW2" ]
|
||||
then
|
||||
resizeqcow2
|
||||
notifyqemu
|
||||
elif [ "$ptype" == "NOTIFYONLY" ]
|
||||
then
|
||||
notifyqemu
|
||||
|
|
|
|||
Loading…
Reference in New Issue