Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1358142 - Some info will show when convert guest to libvirt by virt-v2v with parameter --quiet
Some info will show when convert guest to libvirt by virt-v2v with parameter ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.3
x86_64 Unspecified
low Severity low
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
V2V
:
Depends On: 1358181
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-20 03:37 EDT by mxie@redhat.com
Modified: 2016-11-03 14:02 EDT (History)
9 users (show)

See Also:
Fixed In Version: libguestfs-1.32.6-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:02:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2576 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 08:06:51 EDT

  None (edit)
Description mxie@redhat.com 2016-07-20 03:37:23 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
Comment 2 Pino Toscano 2016-07-20 05:27:34 EDT
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
Comment 3 Richard W.M. Jones 2016-07-20 07:27:20 EDT
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.
Comment 4 Richard W.M. Jones 2016-07-28 08:09:36 EDT
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.
Comment 6 mxie@redhat.com 2016-07-28 23:05:31 EDT
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
Comment 7 Pino Toscano 2016-07-29 04:28:39 EDT
(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.
Comment 8 mxie@redhat.com 2016-08-01 01:46:33 EDT
(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.
Comment 9 Richard W.M. Jones 2016-08-02 09:25:32 EDT
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.
Comment 10 Richard W.M. Jones 2016-08-02 09:26:37 EDT
(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 ..."
Comment 11 mxie@redhat.com 2016-08-03 06:21:08 EDT
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
Comment 12 Richard W.M. Jones 2016-08-03 06:21:49 EDT
(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
Comment 14 errata-xmlrpc 2016-11-03 14:02:47 EDT
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

Note You need to log in before you can comment on or make changes to this bug.