From b572a6065ab4849e4f185b219ae1155e6c204d44 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 13 Apr 2016 15:59:43 +0200 Subject: [PATCH] Fix #643: activate volumes before resizing The volume_size_info() call was what actually failed, but the error reported to the gui came from afterwards trying to resize the disk to a garabge size. --- PVE/API2/Qemu.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index cdc4d21d..3a3c71a4 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2745,6 +2745,7 @@ __PACKAGE__->register_method({ $rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']); + PVE::Storage::activate_volumes($storecfg, [$volid]); my $size = PVE::Storage::volume_size_info($storecfg, $volid, 5); die "internal error" if $sizestr !~ m/^(\+)?(\d+(\.\d+)?)([KMGT])?$/;