[pve-devel] [PATCH qemu-server 0/2] set write threshold logic

Fiona Ebner f.ebner at proxmox.com
Mon Aug 4 11:14:34 CEST 2025


Am 02.08.25 um 6:42 PM schrieb Tiago Sousa via pve-devel:
> 
> Hello,
> 
> I'm looking for some assistance in understanding why the block_write_threshold
> is not being set as expected.
> 
> When the VM starts and I run the query-named-block-nodes command, the
> write_threshold value always appears as the default 0. However, if I set it
> manually through the QMP socket after startup, the threshold is applied
> correctly.
> 
> Is the attach function not the appropriate place to set this value? If not,
> could you clarify the correct point in the VM startup sequence to set it? I
> had assumed it would be applied during blockdev_add, but that doesn't seem
> to be the case.
> 
> Any guidance would be appreciated.

Hi,

blockdev_add()/Blockdev::attach() are only called for hot-plugged disks,
not disks already present at start-up time. You either need to set the
threshold as part of the blockdev options in the generate_*_blockdev()
functions (if that is possible, would be preferred) or issue the QMP
commands for the initially present disks right after VM start (in
vm_start_nolock(), we already do something similar for ballooning).

Best Regards,
Fiona




More information about the pve-devel mailing list