[pve-devel] [PATCH qemu-server 1/2] fix #517: api: allow resizing qcow2 disk with snapshots

Fiona Ebner f.ebner at proxmox.com
Tue May 30 15:52:03 CEST 2023


Support for this was added in QEMU 5.1 by commit 7fa140abf6 ("qcow2:
Allow resize of images with internal snapshots").

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Qemu.pm | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 587bb222..a80eefc9 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -4719,9 +4719,6 @@ __PACKAGE__->register_method({
 	    my (undef, undef, undef, undef, undef, undef, $format) =
 		PVE::Storage::parse_volname($storecfg, $drive->{file});
 
-	    die "can't resize volume: $disk if snapshot exists\n"
-		if %{$conf->{snapshots}} && $format eq 'qcow2';
-
 	    my $volid = $drive->{file};
 
 	    die "disk '$disk' has no associated volume\n" if !$volid;
-- 
2.39.2






More information about the pve-devel mailing list