mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 11:10:24 +00:00
resize_vm: request new size from storage after resizing
Because of alignment and rounding in the storage backend, the effective size might not match the 'newsize' parameter we passed along. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
65af8c312e
commit
b5490d8a98
@ -3586,7 +3586,8 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
PVE::QemuServer::qemu_block_resize($vmid, "drive-$disk", $storecfg, $volid, $newsize);
|
PVE::QemuServer::qemu_block_resize($vmid, "drive-$disk", $storecfg, $volid, $newsize);
|
||||||
|
|
||||||
$drive->{size} = $newsize;
|
my $effective_size = eval { PVE::Storage::volume_size_info($storecfg, $volid, 3); };
|
||||||
|
$drive->{size} = $effective_size // $newsize;
|
||||||
$conf->{$disk} = PVE::QemuServer::print_drive($drive);
|
$conf->{$disk} = PVE::QemuServer::print_drive($drive);
|
||||||
|
|
||||||
PVE::QemuConfig->write_config($vmid, $conf);
|
PVE::QemuConfig->write_config($vmid, $conf);
|
||||||
|
Loading…
Reference in New Issue
Block a user