]> git.proxmox.com Git - qemu-server.git/commitdiff
fix #517: api: allow resizing qcow2 disk with snapshots
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 30 May 2023 13:52:03 +0000 (15:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jun 2023 17:22:17 +0000 (19:22 +0200)
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@proxmox.com>
PVE/API2/Qemu.pm

index 4cc6a47cbb3b4f643c707103dca89c07f4d283a5..e2285afab1ee3cec18c6de221b17af6d2a7f38b6 100644 (file)
@@ -4739,9 +4739,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;