From e29e5be6ef54b4be68fbcd277225858e09f1fe43 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Wed, 4 Mar 2020 10:51:12 +0100 Subject: [PATCH] Revert "resize_vm: request new size from storage after resizing" 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 --- PVE/API2/Qemu.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 867e245a..be5e2fc3 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -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);