while trying a live migration for KVM with libvirt I call virDomainMigrate
() with the following parameters
virDomainMigrate (localDomain,
(virConnectPtr)dconn,
VIR_MIGRATE_LIVE,
"vm_mig_dubi",
"tcp:9.148.4.95:4444",
0
);
The connection with the target VM was established ok
Still I get the following error:
libvir: QEMU error : invalid argument in only tcp URIs are supported for
KVM migrations
looking at the code of qemu_driver.c /qemudDomainMigratePrepare2() is
see the following code (for version2 case):
if (!STREQLEN (uri_in, "tcp:", 6)) {
qemudReportError (dconn, NULL, NULL, VIR_ERR_INVALID_ARG,
"%s", _("only tcp URIs are supported for KVM
migrations"));
goto cleanup;
}
why is the strncmp using length 6 and not 4 . I think this is the reason
for the failure . If I put a NULL af ter the "tcp:" then
I do not fail here (strncmp stop at the first NULL) but I fail one step
later pasrsing the port because the NULL terminates the string
Do we need a fix here ?
thanks
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
Show replies by date
Zvi Dubitzky schrieb:
(...)
why is the strncmp using length 6 and not 4 . I think this is the reason
for the failure . If I put a NULL af ter the "tcp:" then
I do not fail here (strncmp stop at the first NULL) but I fail one step
later pasrsing the port because the NULL terminates the string
Do we need a fix here ?
(...)
This is fixed in the current libvirt-0.6.2 release and a fix is
available for libvirt-0.6.1 here:
https://www.redhat.com/archives/libvir-list/2009-March/msg00503.html
Kind regards Gerrit Slomma