Skip Menu |

This queue is for tickets about the Sys-Virt CPAN distribution.

Report information
The Basics
Id: 48987
Status: resolved
Priority: 0/
Queue: Sys-Virt

People
Owner: Nobody in particular
Requestors: simon [...] simon-cozens.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: migrate doesn't work - doesn't pass NULLs (with fix)
Trying to use $dom->migrate to move a domain consistently returns: Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl/5.10.0/Sys/Virt/Error.pm line 54. Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl/5.10.0/Sys/Virt/Error.pm line 54. libvirt error code: 0, message: This is because the "dname" and "uri" parameters are being passed from Perl as an empty string, even if they are undef. However, the C API requires these parameters to be passed as NULLs, not empty strings. Perhaps you need something like if (!strlen(dname)) dname = NULL; if (!strlen(uri)) uri = NULL; before the call to virDomainMigrate; I made this change locally and now it works for me.
Various APIs (migrate included) were not correctly checking SvOK on variables. This is addressed in the 0.2.1 release of Sys-Virt