Description of problem: virt-v2v should improve the log info for install qemu-guest-agent on rhel8 guest Version-Release number of selected component (if applicable): virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64 libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64 How reproducible: 100% Steps to Reproduce: 1.Set environment for the conversion server: a) create directory /usr/share/virtio-win/linux/el8 b) download qemu-ga RPM into this directory # ls /usr/share/virtio-win/linux/el8/ qemu-guest-agent-4.1.0-14.module+el8.1.0+5346+c31201bb.1.x86_64.rpm qemu-guest-agent-4.2.0-15.module+el8.2.0+6029+618ef2ec.x86_64.rpm c)Setup export VIRTIO_WIN=/usr/share/virtio-win/ Set environment to guest: Make sure guest has installed pixman before conversion because of bug 1811670. 2.Use virt-v2v to convert a rhel8 guest to rhv Scenario 1: Convert a rhel8.1 guest which removed default qemu-guest-agent in esx6.7. 2. # virt-v2v -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.1-x86_64 --password-file /tmp/passwd -o rhv -os 10.66.144.40:/home/nfs_export [ 0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.1-x86_64 [ 1.7] Creating an overlay to protect the source from being modified [ 2.3] Opening the overlay [ 24.2] Inspecting the overlay [ 151.7] Checking for sufficient free disk space in the guest [ 151.7] Estimating space required on target for each disk [ 151.7] Converting Red Hat Enterprise Linux 8.1 Beta (Ootpa) to run on KVM virt-v2v: This guest has virtio drivers installed. [1725.4] Mapping filesystem data to avoid copying unused and blank areas [1727.8] Closing the overlay [1727.8] Assigning disks to buses [1727.8] Checking if the guest needs BIOS or UEFI to boot [1727.8] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export [1728.1] Copying disk 1/1 to /tmp/v2v.WPNiET/5792ab14-7746-4340-a27d-845dc12b8db9/images/9824707d-d4cc-4113-998e-1a68c388e4b7/4a7b0ad4-96ca-4014-9c40-358052c85e48 (raw) (100.00/100%) [2287.4] Creating output metadata [2287.5] Finishing off 3. Conversion can be finished successfully,and boot guest on rhv 4. Check if the guest has installed qume-guest-agent and the service is running normally. Virt-v2v installed the latest version qemu-guest-agent to guest,and the qemu-ga service works well. Actual results: virt-v2v can install qemu-guest-agent to rhel 8 guest,but cannot inform about the install status. Expected results: 1> If virt-v2v install qemu-guest-agent successfully,virt-v2v should give a info like: virt-v2v: QEMU Guest Agent installed for this guest. 2>If the guest already installed the latest version qemu-guest-agent,virt-v2v should give an info like: virt-v2v: package qemu-guest-agent-xx-xx is already installed Additional info:
(In reply to liuzi from comment #0) > Expected results: > 1> If virt-v2v install qemu-guest-agent successfully,virt-v2v should give a > info like: > virt-v2v: QEMU Guest Agent installed for this guest. This was done upstream already for Linux guests: https://github.com/libguestfs/libguestfs/commit/cbf887ed90e0ecb5c52fd2c663acb5b9b2e3e14a https://github.com/libguestfs/virt-v2v/commit/5e44c941bd26f1c588a64b493f0e74c2b1369ede For Windows the "installation" is different: we copy the installer and create a firstboot script that will run the installer. Hence virt-v2v cannot say that the qemu guest agent was installed for Windows. > 2>If the guest already installed the latest version > qemu-guest-agent,virt-v2v should give an info like: > virt-v2v: package qemu-guest-agent-xx-xx is already installed I'm not sure about this one, as virt-v2v generally does not print anything in case there is nothing to change, or there was no change/error.
(In reply to Pino Toscano from comment #1) > (In reply to liuzi from comment #0) > > Expected results: > > 1> If virt-v2v install qemu-guest-agent successfully,virt-v2v should give a > > info like: > > virt-v2v: QEMU Guest Agent installed for this guest. > > This was done upstream already for Linux guests: > https://github.com/libguestfs/libguestfs/commit/ > cbf887ed90e0ecb5c52fd2c663acb5b9b2e3e14a > https://github.com/libguestfs/virt-v2v/commit/ > 5e44c941bd26f1c588a64b493f0e74c2b1369ede This is now available in virt-v2v 1.42.0, part of RHEL AV 8.3.0.
> I'm not sure about this one, as virt-v2v generally does not print anything > in case there is nothing to change, or there was no change/error. The error msg is generated by rpm and printed by v2v. Not sure why v2v doesn't print it following the step in bug description. Maybe somewhere is different from handling rhv-guest-tools-iso? # rpm --upgrade -v http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/qemu-guest-agent/2.10.0/2.el8+5/x86_64/qemu-guest-agent-2.10.0-2.el8+5.x86_64.rpm Retrieving http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/qemu-guest-agent/2.10.0/2.el8+5/x86_64/qemu-guest-agent-2.10.0-2.el8+5.x86_64.rpm Verifying packages... Preparing packages... package qemu-guest-agent-15:4.2.0-27.module+el8.2.1+7092+9d345e72.x86_64 (which is newer than qemu-guest-agent-10:2.10.0-2.el8+5.x86_64) is already installed
(In reply to Xiaodai Wang from comment #3) > > I'm not sure about this one, as virt-v2v generally does not print anything > > in case there is nothing to change, or there was no change/error. > > The error msg is generated by rpm and printed by v2v. Which error message? > Not sure why v2v > doesn't > print it following the step in bug description. Maybe somewhere is different > from > handling rhv-guest-tools-iso? > > # rpm --upgrade -v > http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/qemu-guest- > agent/2.10.0/2.el8+5/x86_64/qemu-guest-agent-2.10.0-2.el8+5.x86_64.rpm > Retrieving > http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/qemu-guest- > agent/2.10.0/2.el8+5/x86_64/qemu-guest-agent-2.10.0-2.el8+5.x86_64.rpm > Verifying packages... > Preparing packages... > package qemu-guest-agent-15:4.2.0-27.module+el8.2.1+7092+9d345e72.x86_64 > (which is newer than qemu-guest-agent-10:2.10.0-2.el8+5.x86_64) is already > installed virt-v2v inspects the guests, so it knows which packages are installed. In case qemu-guest-agent is already installed, virt-v2v does not even try to install it.
> virt-v2v inspects the guests, so it knows which packages are installed. > In case qemu-guest-agent is already installed, virt-v2v does not even try to > install it. I tried the process on rhel7.8, it reports the following warning if qemu-guest-agent is already installed and is newer than the version in rhv-guest-tools. I uploaded the whole v2v log, you can check it. libguestfs: trace: v2v: command "rpm --upgrade -v /var/tmp/qemu-guest-agent-2.12.0-2.el7.x86_64.rpm" guestfsd: error: \tpackage qemu-guest-agent-10:2.12.0-3.el7.x86_64 (which is newer than qemu-guest-agent-10:2.12.0-2.el7.x86_64) is already installed virt-v2v: warning: failed to install QEMU Guest Agent: command: package qemu-guest-agent-10:2.12.0-3.el7.x86_64 (which is newer than qemu-guest-agent-10:2.12.0-2.el7.x86_64) is already installed
Created attachment 1698279 [details] v2v qemu-guest-agent log on rhel7.8
This is fine, if the version installed is already newer, virt-v2v should not downgrade it and does not need to report any error or message.
(In reply to Richard W.M. Jones from comment #7) > This is fine, if the version installed is already newer, virt-v2v should not > downgrade it and does not need to report any error or message. Yes, I think this bug expects same warning message on rhel8.
I don't think this is a bug. If qemu-ga is already installed (or a higher version is installed) virt-v2v needs to do nothing and doesn't need to print messages about it.