mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-05 10:50:32 +00:00
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.
This commit is contained in:
parent
681e12ba37
commit
b572a6065a
@ -2745,6 +2745,7 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
|
$rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
|
||||||
|
|
||||||
|
PVE::Storage::activate_volumes($storecfg, [$volid]);
|
||||||
my $size = PVE::Storage::volume_size_info($storecfg, $volid, 5);
|
my $size = PVE::Storage::volume_size_info($storecfg, $volid, 5);
|
||||||
|
|
||||||
die "internal error" if $sizestr !~ m/^(\+)?(\d+(\.\d+)?)([KMGT])?$/;
|
die "internal error" if $sizestr !~ m/^(\+)?(\d+(\.\d+)?)([KMGT])?$/;
|
||||||
|
Loading…
Reference in New Issue
Block a user