On Tue, Aug 25, 2020 at 16:28:12 +0100, Daniel P. Berrangé wrote: > On Tue, Aug 25, 2020 at 07:47:12AM +0200, Martin Kletzander wrote: > > Adds new typed param for migration and uses this as a UNIX socket path that > > should be used for the NBD part of migration. And also adds virsh support. > > > > Partially resolves: https://bugzilla.redhat.com/1638889 > > > > Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> > > --- > > docs/manpages/virsh.rst | 8 +++ > > include/libvirt/libvirt-domain.h | 12 ++++ > > src/qemu/qemu_domain.h | 1 + > > src/qemu/qemu_driver.c | 33 ++++++++-- > > src/qemu/qemu_migration.c | 110 ++++++++++++++++++++++--------- > > src/qemu/qemu_migration.h | 3 + > > src/qemu/qemu_migration_cookie.c | 22 +++++-- > > src/qemu/qemu_migration_cookie.h | 1 + > > tools/virsh-domain.c | 12 ++++ > > 9 files changed, 160 insertions(+), 42 deletions(-) > > > > diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst > > index 9187037a5615..75f475eea6ad 100644 > > --- a/docs/manpages/virsh.rst > > +++ b/docs/manpages/virsh.rst > > @@ -3113,6 +3113,7 @@ migrate > > [--postcopy-bandwidth bandwidth] > > [--parallel [--parallel-connections connections]] > > [--bandwidth bandwidth] [--tls-destination hostname] > > + [--disks-socket socket-path] > > For the primary migration connection we have a proper URI, so we can > support new schemes without adding new parameters for each one. > > For the NBD connetion we have the "disk port" parameter only, not a > full URI. > > Adding "disks socket" makes this design mistake worse. > > IMHO we should add a "disks uri" accepting the exact same syntax > as the migration URI. Oh yeah, thanks for mentioning this. I originally thought about generic disks-uri too, but forgot about it when getting back to the review after lunch :-/ Just beware the migration URI is basically passed through to QEMU, while we use nbd or nbd+unix URIs for disks when talking to QEMU and we should not use these in the API. Just tcp:// or unix:// and translate them to the correct QEMU nbd URI internally. Jirka