]> git.proxmox.com Git - qemu-server.git/commitdiff
Revert "resize_vm: request new size from storage after resizing"
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 4 Mar 2020 09:51:12 +0000 (10:51 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 May 2020 15:35:21 +0000 (17:35 +0200)
This reverts commit b5490d8a98e5e7328eb4cebb0ae0b60e6d406c38.

When resizing a volume of a running VM, a qmp block_resize command
is issued. This is non-blocking, so the size on the storage immediately
after issuing the command might still be the old one.

This is part of the issue reported in bug #2621.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/Qemu.pm

index 867e245ab9a649922d195141a5009acb9034b26b..be5e2fc31e5239c3443b1c397e4ee17b3ecaa427 100644 (file)
@@ -3692,8 +3692,7 @@ __PACKAGE__->register_method({
 
            PVE::QemuServer::qemu_block_resize($vmid, "drive-$disk", $storecfg, $volid, $newsize);
 
-           my $effective_size = eval { PVE::Storage::volume_size_info($storecfg, $volid, 3); };
-           $drive->{size} = $effective_size // $newsize;
+           $drive->{size} = $newsize;
            $conf->{$disk} = PVE::QemuServer::print_drive($drive);
 
            PVE::QemuConfig->write_config($vmid, $conf);