Red Hat Bugzilla – Bug 1358142
Some info will show when convert guest to libvirt by virt-v2v with parameter --quiet
Last modified: 2016-11-03 14:02:47 EDT
Description of problem: Some info will show when convert guest to libvirt by virt-v2v with parameter --quiet Version-Release number of selected component (if applicable): libvirt-2.0.0-2.el7.x86_64 virt-v2v-1.32.6-1.el7.x86_64 libguestfs-1.32.6-1.el7.x86_64 qemu-kvm-rhev-2.6.0-13.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Check parameter -q in virsh manual page and virt-v2v manual page #man virsh -q, --quiet Avoid extra informational messages. #man virt-v2v -q, --quiet This disables progress bars and other unnecessary output 2.Convert guest from vmware to libvirt with parameter -q # virt-v2v -ic vpx://root@10.66.145.47/data/10.73.3.19/?no_verify=1 esx5.5-win7-x86_64 --password-file /tmp/passwd -q Pool default refreshed Domain esx5.5-win7-x86_64 defined from /tmp/v2vlibvirt05fd58.xml You have new mail in /var/spool/mail/root Actual results: Some info will show when convert guest to libvirt by virt-v2v with parameter --quiet Expected results: should no info printed out if using parameter -q Additional info: there is no info printed out if convert guest to rhev by virt-v2v with parameter --quiet
The patch itself is easy, although virsh does not seem to always respect the -q/--quiet flag -- see bug #1358181. https://www.redhat.com/archives/libguestfs/2016-July/msg00185.html
I have ACKed this, and we can add Pino's patch to RHEL 7.3. However it won't have any effect until the dependent bug is fixed in virsh.
Note this is only fixed from the libguestfs point of view. It still requires a fix to libvirt which is not scheduled to happen until RHEL 7.4.
Verify the bug with builds: libvirt-2.0.0-3.el7.x86_64 libguestfs-1.32.6-2.el7.x86_64 qemu-kvm-rhev-2.6.0-13.el7.x86_64 Steps: 1.Convert guest from vmware to libvirt with parameter -q # virt-v2v -ic vpx://root@10.66.145.47/data/10.73.3.19/?no_verify=1 esx5.5-win7-x86_64 --password-file /tmp/passwd -q -on quite Pool default refreshed Domain quite defined from /tmp/v2vlibvirtb235b2.xml Hi rjones, There are still some info displayed, could you help to check this? Thanks
(In reply to mxie@redhat.com from comment #6) > There are still some info displayed, could you help to check this? See comment #2, comment #3, and comment #4. Without a libvirt fix the fix of this bug will not have a practical effect.
(In reply to Pino Toscano from comment #7) > (In reply to mxie@redhat.com from comment #6) > > There are still some info displayed, could you help to check this? > > See comment #2, comment #3, and comment #4. Without a libvirt fix the fix > of this bug will not have a practical effect. Hi rjones, Yes, I got the comments,but I can't verify this bug now because the problem still show out, could we move this bug to rhel7.4 until a libvirt fix? thanks.
It should actually be possible to verify just the libvirt side of the fix, like this: $ virt-builder fedora-24 $ strace -e execve -o /tmp/log virt-v2v -i disk fedora-24.img -os tmp --quiet (You might need to change the `-os tmp' parameter to another libvirt pool name. See `virsh pool-list'). $ virsh undefine fedora-24 Now examine the strace log file (/tmp/log) looking to see if the virsh pool-refresh command was called with the -q parameter: $ grep 'virsh.*pool-refresh.*= 0' /tmp/log 12006 execve("/usr/bin/virsh", ["virsh", "-q", "pool-refresh", "tmp"], [/* 67 vars */]) = 0 ^^^^^ You can see in this case the -q flag has been added by virt-v2v. Libvirt does not yet obey this flag, but we are passing it to virsh.
(In reply to Richard W.M. Jones from comment #9) > It should actually be possible to verify just the libvirt side I mean "just the *libguestfs* side ..."
Verify the bug with builds again: libvirt-2.0.0-4.el7.x86_64 libguestfs-1.32.6-2.el7.x86_64 qemu-kvm-rhev-2.6.0-17.el7.x86_64 Steps: 1.# strace -f -e execve -o /tmp/f.log virt-v2v -i disk /var/lib/libvirt/images/esx5.1-win10-i386-sda -os mxie --quiet -on f virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 i386). virt-v2v looks for this driver in /usr/share/virtio-win The guest will be configured to use a basic VGA display driver. Pool mxie refreshed Domain f defined from /tmp/v2vlibvirta34bbf.xml 2.Check log, there is info as below # grep 'virsh.*pool-refresh.*= 0' /tmp/f.log 3555 execve("/usr/bin/virsh", ["virsh", "-q", "pool-refresh", "mxie"], [/* 37 vars */]) = 0 Result now: According to above steps and comment 9,-q flag has been added by virt-v2v, so this bug has been fixed at libguestfs side So move this bug from ON_QA to VERIFIED
(In reply to Richard W.M. Jones from comment #9) > $ strace -e execve -o /tmp/log virt-v2v -i disk fedora-24.img -os tmp --quiet This is missing the '-f' parameter. The corrected command is: strace -f -e execve -o /tmp/log virt-v2v -i disk fedora-24.img -os tmp --quiet
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2576.html