Skip to content

Commit 3535f88

Browse files
author
Marcus Sorensen
committed
Summary: Disallow shrinking volume type QCOW2 to fail with better message
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360093176 -0700
1 parent 4f274d0 commit 3535f88

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,8 @@ public Answer execute(ResizeVolumeCommand cmd) {
14291429
if (type == null) {
14301430
return new ResizeVolumeAnswer(cmd, false, "Unsupported volume format: pool type '"
14311431
+ pool.getType() + "' and volume format '" + vol.getFormat() + "'");
1432+
} else if (type.equals("QCOW2") && shrinkOk) {
1433+
return new ResizeVolumeAnswer(cmd, false, "Unable to shrink volumes of type " + type);
14321434
}
14331435

14341436
s_logger.debug("got to the stage where we execute the volume resize, params:"

0 commit comments

Comments
 (0)