On 2/27/23 12:15, Christian Nautze wrote:
Currently it's only possible to set this parameter during
domain
creation via QEMU commandline passthrough feature.
With the new delay attribute it's also possible to set this
parameter if you want to attach a new NBD disk
using "virsh attach-device domain device.xml" e.g.:
<disk type='network' device='disk'>
<driver name='qemu' type='raw'/>
<source protocol='nbd' name='foo'>
<host name='example.org' port='6000'/>
<reconnect delay='10'/>
</source>
<target dev='vdb' bus='virtio'/>
</disk>
Signed-off-by: Christian Nautze <christian.nautze(a)exoscale.ch>
---
Changes: schema reconnect element: drop mandatory 'enabled' attribute when using
'delay'
reconnect element: use choice for attributes
---
docs/formatdomain.rst | 11 +++++++--
src/conf/domain_conf.c | 12 ++++++++++
src/conf/schemas/domaincommon.rng | 3 +++
src/conf/schemas/storagecommon.rng | 19 ++++++++++-----
src/conf/storage_source_conf.c | 1 +
src/conf/storage_source_conf.h | 4 ++++
src/qemu/qemu_block.c | 4 +++-
src/qemu/qemu_domain.c | 9 ++++++++
.../disk-network-nbd.x86_64-latest.args | 23 +++++++++++--------
tests/qemuxml2argvdata/disk-network-nbd.xml | 8 +++++++
tests/qemuxml2xmloutdata/disk-network-nbd.xml | 9 ++++++++
11 files changed, 84 insertions(+), 19 deletions(-)
Sorry for delayed review.
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
and pushed. Congratulations on your first libvirt contribution!
Michal