[pve-devel] [PATCH qemu-server] Fix #643: activate volumes before resizing

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Apr 13 15:59:43 CEST 2016


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 f83d81f..9253629 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2769,6 +2769,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])?$/;
-- 
2.1.4





More information about the pve-devel mailing list