[pve-devel] [PATCH qemu-server 13/31] blockdev: resize: query and use node name for resize operation

Fiona Ebner f.ebner at proxmox.com
Mon Jun 30 09:52:10 CEST 2025


Am 30.06.25 um 08:23 schrieb DERUMIER, Alexandre via pve-devel:
> 
> Hi Fiona,
> 
> from my test, I needed to use the top throttle node to have to new
> resize correctly reported to guest
> https://lore.proxmox.com/all/mailman.947.1741688963.293.pve-devel@lists.proxmox.com/

Yes, you're right! I originally queried and used the top node (I think
your version doesn't work for legacy "-drive", because the node name is
auto-generated then), but switched to using the
get_node_name_below_throttle() helper after introducing it and didn't
check within the VM anymore.

So we'll need to switch to something like

>     my $block_info = get_block_info($vmid);
>     my $drive_id = $deviceid =~ s/^drive-//r;
>     my $inserted = $block_info->{$drive_id}->{inserted}
>         or die "no block node inserted for drive '$drive_id'\n";
> 
>     my $padding = (1024 - $size % 1024) % 1024;
>     $size = $size + $padding;
> 
>     mon_cmd(
>         $vmid,
>         "block_resize",
>         'node-name' => "$inserted->{'node-name'}",
>         size => int($size),
>         timeout => 60,

Still, it feels like a QEMU bug. I'd expect the filter node to also
report the updated size when its child node is resized. I'll see if that
is easily fixed upstream/ask what they think.




More information about the pve-devel mailing list