On Wed, Jan 25, 2017 at 11:47:45AM -0600, David Z. Dai wrote: > In Previous test, I changed libvirtd code in src/util/viruri.c file, > virURIParse() routine to block > "virStringStripIPv6Brackets(ret->server);" call. It caused ssh ipv6 > authentication failure. > > You said libvirt needs to be changed to pass correct data to QEMU. > > As one of the solution on libvirt side: if I add this condition in > virURIParse() routine: > + if (strcmp(ret->scheme, "rdma")) { > /* Strip square bracket from an IPv6 address. > * The function modifies the string in-place. Even after such > * modification, it is OK to free the URI with xmlFreeURI. */ > virStringStripIPv6Brackets(ret->server); > + } > > Now both the virsh live migration with tcp and rdma via ipv6 address > work fine. > > Do you think this is the acceptable solution?
No, the viruri code is a general purpose URI parsing API and should not be hacked with QEMU specific knowledge in this way. You need to modify the QEMU driver code in libvirt to adding [] when calling the QEMU migrate monitor command, and when creating the -incoming CLI arg. eg modify various places in the src/qemu/qemu_*.c files Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|