Description of problem: Error msg like "Domain not found" will pop up, although it is due to missing "-f" in v2v command. It's better to point the problem is the missing parameter or virt-v2v.conf rather than "Domain not found" which will mislead users. Version-Release number of selected component (if applicable): v2v-libvirt-0.8.1-2.el5 virt-v2v-0.6.0-3.el5 How reproducible: always Steps to Reproduce: 1. scenario 1: # virsh list --all Id Name State ---------------------------------- 0 Domain-0 running - floppy shut off #virt-v2v /etc/virt-v2v.conf -ic xen:/// -o rhev -osd 10.66.90.115:/vol/v2vwulinglu/wulingluv2v/fcp_export floppy libvirt error code: 42, message: Domain not found: xenUnifiedDomainLookupByName 2. scenario 2: # virt-v2v -i libvirtxml /etc/virt-v2v.conf -ic xen:/// -o rhev -osd 10.66.90.115:/vol/v2vwulinglu/wulingluv2v/fcp_export floppy.xml Use of uninitialized value in -e at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 150. Use of uninitialized value in string eq at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 180. Use of uninitialized value in string eq at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 180. Use of uninitialized value in string eq at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 180. Use of uninitialized value in string eq at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 180. Use of uninitialized value in string eq at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 180. Use of uninitialized value in string eq at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Sys/Guestfs/Lib.pm line 180. {imagename} is not the name of an inactive libvirt domain Error removing /tmp/eqOzTs2y84.virt-v2v at /usr/lib/perl5/5.8.8/File/Temp.pm line 890. Actual results: As steps mentioned. Expected results: It's better to point the problem is the missing parameter or virt-v2v.conf Additional info:
Moving this over to libguestfs. The specific error you get relates to the way libguestfs tries to guess whether something is an image file or a libvirt domain.
There's another confusing thing here: > {imagename} is not the name of an inactive libvirt domain and yet the code looks fine to me: http://git.annexia.org/?p=libguestfs.git;a=blob;f=perl/lib/Sys/Guestfs/Lib.pm;h=128f7c9fa26b39d71f07544172e42b1d95171538;hb=HEAD#l193
I think this is a virt-v2v problem. It seems you are calling my $g = open_guest($storage, rw => 1, interface => $interface); with $storage == \undef (ie a reference to scalar undef). This also explains comment 2 since we try to substitute imagename with undef, and that confuses __x so it prints the original variable name. The answer is, don't call open_guest with \undef as the first parameter... I'm very confused by the code in Connection.pm vs Connection/LibvirtXML.pm since the former uses $self->{paths} and the latter only sets $self->{path}, so I'm not sure how this is supposed to work. Strong typing FTW.
(In reply to comment #3) > I'm very confused by the code in Connection.pm vs Connection/LibvirtXML.pm > since the former uses $self->{paths} and the latter only sets $self->{path}, > so I'm not sure how this is supposed to work. Strong typing FTW. $self->{path} in Connection::LibvirtXML refers to the path to the file containing the libvirt xml. $self->{paths} is populated by _storage_iterate in the superclass which iterates over a parsed domain extracting the paths to underlying storage.
This is fixed upstream.
Hi Matt, I verified it on virt-v2v-0.6.1-1.el5.It's better than ever. Now, v2v will consider virt-v2v.conf as domain or domain XML file if missing "-f". But could the error message be more specified? scenario 1: # virt-v2v /etc/virt-v2v.conf -o rhev -osd 10.66.90.115:/vol/v2vwulinglu/wulingluv2v/fcp_export xenfv-rhel48-32 libvirt error code: 42, message: Domain not found: no domain with matching name '/etc/virt-v2v.conf' scenario 2: # virt-v2v -i libvirtxml /etc/virt-v2v.conf -o rhev -osd 10.66.90.115:/vol/v2vwulinglu/wulingluv2v/fcp_export cleankvm-RHEL-5.4-32.raw.xml virt-v2v: /etc/virt-v2v.conf doesn't look like a libvirt domain XML file
Communicate with Matt, the current result is clear enough for users to debug. So set it as verified.
Hi Matt, I am experiencing a similar issue when trying to run virt-v2v even with the -f option: # virt-v2v -f /etc/virt-v2v.conf -ic esx://X.X.X.X/?no_verify=1 -o rhev -osd Y.Y.Y.Y:/export/v2v Webserver04 libvirt error code: 42, message: Domain not found: No domain with name 'Webserver04' Please let me know if you have any suggestions on how to resolve this issue. Regards, Das
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0566.html