RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1358142 - Some info will show when convert guest to libvirt by virt-v2v with parameter --quiet
Summary: Some info will show when convert guest to libvirt by virt-v2v with parameter ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1358181
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-20 07:37 UTC by mxie@redhat.com
Modified: 2016-11-03 18:02 UTC (History)
9 users (show)

Fixed In Version: libguestfs-1.32.6-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:02:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2576 0 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 12:06:51 UTC

Description mxie@redhat.com 2016-07-20 07:37:23 UTC
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.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 09:27:34 UTC
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 11:27:20 UTC
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 12:09:36 UTC
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-29 03:05:31 UTC
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.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 08:28:39 UTC
(In reply to mxie 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 05:46:33 UTC
(In reply to Pino Toscano from comment #7)
> (In reply to mxie 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 13:25:32 UTC
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 13:26:37 UTC
(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 10:21:08 UTC
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 10:21:49 UTC
(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 18:02:47 UTC
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.