Bug 1791802 - virt-v2v does not install qemu-ga on EL8 guest
Summary: virt-v2v does not install qemu-ga on EL8 guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libguestfs
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Pino Toscano
QA Contact: liuzi
URL:
Whiteboard: V2V
Depends On: 1811940
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-16 13:57 UTC by Tomáš Golembiovský
Modified: 2020-05-05 09:56 UTC (History)
8 users (show)

Fixed In Version: libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:55:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
conversion log (1.51 MB, text/plain)
2020-03-04 03:02 UTC, liuzi
no flags Details
Conversion log after setup (1.45 MB, text/plain)
2020-03-05 03:44 UTC, liuzi
no flags Details
rhel8-export2 conversion log (1.45 MB, text/plain)
2020-03-06 02:33 UTC, liuzi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:56:49 UTC

Description Tomáš Golembiovský 2020-01-16 13:57:35 UTC
virt-v2v can install Linux qemu-ga into the guest during conversion if an appropriate package is available. However, on EL it wokrks only for EL6 and EL7 guests, but not for EL8 guests.

Comment 1 Tomáš Golembiovský 2020-01-16 14:05:08 UTC
possible solution posted upstream: https://www.redhat.com/archives/libguestfs/2020-January/msg00131.html

Comment 2 Richard W.M. Jones 2020-01-16 16:28:18 UTC
This is the good fix I think:
https://www.redhat.com/archives/libguestfs/2020-January/msg00135.html

Comment 6 liuzi 2020-03-02 12:04:06 UTC
Test bug with builds:
virt-v2v-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
rhv-guest-tools-iso-4.3-10.el7ev.noarch

Steps:
Set environment for the conversion server:
1.Download latest rhv-guest-tools package from brewweb,

2.Install the rhv-guest-tools-iso-4.3-6.el7ev.noarch on the conversion server, and set the following environment variable:
export VIRTIO_WIN=/usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso

3.Mount /usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso to /mnt,and check which linux os are supported in /mnt/linux directory.
# ls
debian  el6  el7  fc28  lp151

Hi, tgolembi
Now I have 2 problem to verify the bug:
1.I cannot find rhv-guest-tools-iso for rhel8 conversion server;
2.I cannot find qemu-guest-agent package for rhel8 guest.

Comment 7 Tomáš Golembiovský 2020-03-02 14:16:24 UTC
You can verify that by placing the RPMs on your host:

1) create directory /usr/share/virtio-win/linux/el8
2) download qemu-ga RPM into this directory
3) run virt-v2v conversion as before but do *NOT* set the VIRTIO_WIN variable

That way virt-v2v will look on your filesystem instead of teh ISO.

Comment 9 liuzi 2020-03-03 11:02:24 UTC
Test bug with builds:
virt-v2v-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
qemu-guest-agent-4.1.0-14.module+el8.1.0+5346+c31201bb.1.x86_64.rpm

Steps:
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

scenario 1:Convert a rhel8 guest which removed default qemu-guest-agent in esx6.7.
# 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: warning: guest tools directory ‘linux/el8’ is missing from 
the virtio-win directory or ISO.


Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
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

1.2 Conversion can be finished successfully,and boot guest on rhv

1.3 Check if the guest has installed qume-guest-agent and the service is running normally.

Result: Virt-v2v can not install qemu-guest-agent in rhel8 guest during conversion.


Hi, tgolembi
As above test and refer to https://bugzilla.redhat.com/show_bug.cgi?id=1619665,I think v2v only can use rhv-guest-tools-iso to install qemu-guest-agent during the conversion.

Comment 10 Tomáš Golembiovský 2020-03-03 12:04:09 UTC
Can you share the complete virt-v2v log with -v -x, please?

Comment 11 liuzi 2020-03-04 03:02:53 UTC
Created attachment 1667359 [details]
conversion log

Comment 12 Tomáš Golembiovský 2020-03-04 11:08:17 UTC
I see. I didn't realize virt-v2v picks the ISO automatically when it is present on disk.
Add this step before starting virt-v2v to use the directory:

    export VIRTIO_WIN=/usr/share/virtio-win/

Comment 13 liuzi 2020-03-05 03:41:33 UTC
Test bug with builds:
virt-v2v-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
qemu-guest-agent-4.1.0-14.module+el8.1.0+5346+c31201bb.1.x86_64.rpm

Steps:
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
c)Setup export VIRTIO_WIN=/usr/share/virtio-win/

scenario 1:Convert a rhel8 guest which removed default qemu-guest-agent in esx6.7.
1.1 # 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

1.2 Conversion can be finished successfully,and boot guest on rhv

1.3 Check if the guest has installed qume-guest-agent and the service is running normally.

Result: Virt-v2v can not install qemu-guest-agent in rhel8 guest during conversion.


Hi, tgolembi
Virt-v2v still cannot install qemu-guest-agent during conversion,pls refer to log.

Comment 14 liuzi 2020-03-05 03:44:07 UTC
Created attachment 1667630 [details]
Conversion log after setup

Comment 15 Tomáš Golembiovský 2020-03-05 11:26:49 UTC
Could you please make sure you did: 

    export VIRTIO_WIN=/usr/share/virtio-win/

The message from logs
> windows: copy_from_virtio_win: guest tools source directory /usr/share/virtio-win/linux/el8
suggests you actually did 

    export VIRTIO_WIN=/usr/share/virtio-win/linux/el8

which is wrong.

Comment 16 liuzi 2020-03-06 02:31:09 UTC
I can make sure I did:export VIRTIO_WIN=/usr/share/virtio-win/
And I test again ,it has same result.

Steps:
#  export VIRTIO_WIN=/usr/share/virtio-win/
# echo $VIRTIO_WIN
/usr/share/virtio-win/
#  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  -v -x |& tee > rhel8-export2.log
# cat rhel8-export2.log|grep virtio_win  -A4
windows: copy_from_virtio_win: guest tools source directory /usr/share/virtio-win/linux/el8
virt-v2v: warning: guest tools directory ‘linux/el8’ is missing from 
the virtio-win directory or ISO.


Details pls refer to log named  rhel8-export2.log.

And after several testing,I still think,Only when the following two conditions are met,virt-v2v can install qemu-guest-agent to linux guest:
1.Conversion server has installed rhv-guest-tools-iso and export VIRTIO_WIN=/usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso
2.Required packages exist in iso

Comment 17 liuzi 2020-03-06 02:33:01 UTC
Created attachment 1667978 [details]
rhel8-export2 conversion log

Comment 18 Tomáš Golembiovský 2020-03-08 18:53:19 UTC
Ok this is really broken in the build, but already fixed in upstream. We need to include this patch

https://github.com/libguestfs/virt-v2v/commit/6f804792d3a40540360c8cfd3d3309087aab3e78

Comment 19 Pino Toscano 2020-03-09 10:15:00 UTC
(In reply to Tomáš Golembiovský from comment #18)
> Ok this is really broken in the build, but already fixed in upstream. We
> need to include this patch
> 
> https://github.com/libguestfs/virt-v2v/commit/
> 6f804792d3a40540360c8cfd3d3309087aab3e78

Strictly speaking:
- this bug is about virt-v2v not looking for el8 qemu-guest-agent in virtio-win, and it *was* fixed the build currently available in AV 8.2.0
- the patch above is a different issue, unrelated to this bug, and it is a general issue when looking up files from "virtio-win as directory"
- a RHV Tools ISO with the el8 qemu-guest-agent RPM should be good to validate this bug as it is; sadly the RHV Tools ISO is deprecated, and RHV people are not even fixing what is there in RHV 4.3...

So IMHO the best thing to do is:
- open a *new* bug tracking the virtio-win directory issue (the patch above), explaining what is the actual issue, and how QE can test it
- flip this to ON_QA, making it blocked by the new bug

Comment 20 Tomáš Golembiovský 2020-03-10 10:08:47 UTC
There is one more issue that influences testing. Currently EL8 qemu-guest-agent requires pixman package which may not be always installed in the guest. It may be required to place the pixman RPM into 'linux/el8' directory alongside the qemu-guest-agent RPM.

Comment 21 Tomáš Golembiovský 2020-03-10 10:09:47 UTC
The related pixman bug is bug 1811670

Comment 22 Pino Toscano 2020-03-10 10:18:57 UTC
(In reply to Tomáš Golembiovský from comment #20)
> There is one more issue that influences testing. Currently EL8
> qemu-guest-agent requires pixman package which may not be always installed
> in the guest. It may be required to place the pixman RPM into 'linux/el8'
> directory alongside the qemu-guest-agent RPM.

FWIW, this shows once again how the idea of picking random distribution packages, placing them on the ISO and installing manually offline is more troublesome than the potential benefits it brings.

The next time an issue related to this feature shows up, my resolution will be "get rid of the qemu-guest-agent installation from ISO".

Comment 23 liuzi 2020-03-19 10:59:08 UTC
Test bug with builds:
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

steps:
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.

Scenario 1:
Convert a rhel8.1 guest which removed default qemu-guest-agent in esx6.7.
1.1 # 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

1.2 Conversion can be finished successfully,and boot guest on rhv

1.3 Check if the guest has installed qume-guest-agent and the service is running normally.
#rpm -q qemu-guest-agent
qemu-guest-agent-4.2.0-15.module+el8.2.0+6029+618ef2ec.x86_64.rpm
# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; disabled>
   Active: active (running) since Wed 2020-03-18 22:51:13 EDT; 2min 54s ago
 Main PID: 842 (qemu-ga)
    Tasks: 1 (limit: 11072)
   Memory: 3.3M
   CGroup: /system.slice/qemu-guest-agent.service
           └─842 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-p>

Mar 18 22:51:13 localhost.localdomain systemd[1]: Started QEMU Guest Agent.

Result 1:Virt-v2v installed the latest version qemu-guest-agent to guest,and the qemu-ga service works well.


Scenario 2:
Convert a rhel8.0 guest which has installed qemu-guest-agent in esx6.7.
2.1 Prepare a rhel8.0 guest in esx6.7 and install qemu-guest-agent in guest.
#rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-63.module+el8+2833+c7d6d092.x86_64
2.2 Use virt-v2v convert the guest to rhv
#  virt-v2v -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.0-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.0-x86_64
[   1.6] Creating an overlay to protect the source from being modified
[   2.0] Opening the overlay
[  23.8] Inspecting the overlay
[ 118.3] Checking for sufficient free disk space in the guest
[ 118.3] Estimating space required on target for each disk
[ 118.3] Converting Red Hat Enterprise Linux 8.0 Beta (Ootpa) to run on KVM
virt-v2v: warning: ignoring kernel /vmlinuz-4.18.0-40.el8.x86_64 in 
bootloader, as it does not exist.
virt-v2v: This guest has virtio drivers installed.
[1377.9] Mapping filesystem data to avoid copying unused and blank areas
[1380.4] Closing the overlay
[1380.5] Assigning disks to buses
[1380.5] Checking if the guest needs BIOS or UEFI to boot
[1380.5] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[1380.7] Copying disk 1/1 to /tmp/v2v.MgpfaP/5792ab14-7746-4340-a27d-845dc12b8db9/images/e44ac81f-48fc-4262-b98e-602d6732ebac/507cbf8a-2df5-4866-9c7b-abf16459f6fe (raw)
    (100.00/100%)
[1845.7] Creating output metadata
[1845.9] Finishing off

2.3 Conversion can be finished successfully,and boot guest on rhv

2.4 Check if the guest has updated qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
qemu-guest-agent-4.2.0-15.module+el8.2.0+6029+618ef2ec.x86_64
# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; disabled; vendor preset:>
   Active: active (running) since Thu 2020-03-19 04:16:34 EDT; 1h 2min ago
 Main PID: 711 (qemu-ga)
    Tasks: 1 (limit: 11098)
   Memory: 2.2M
   CGroup: /system.slice/qemu-guest-agent.service
           └─711 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-ports/org.qemu.gu>

Mar 19 04:16:34 localhost.localdomain systemd[1]: Started QEMU Guest Agent.

Result 2:virt-v2v can update qemu-guest-agent to the latest version and qemu-ga service works well.


Scenario3:
Convert a rhel8.2 guest which removed default qemu-guest-agent in esx6.5.
3.1 #virt-v2v -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel8.2-x86_64  --password-file /tmp/passwd -o rhv  -os 10.66.144.40:/home/nfs_export
# virt-v2v -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel8.2-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.196.89/?no_verify=1 esx6.5-rhel8.2-x86_64
[   1.9] Creating an overlay to protect the source from being modified
[   2.4] Opening the overlay
[  22.4] Inspecting the overlay
[ 104.8] Checking for sufficient free disk space in the guest
[ 104.8] Estimating space required on target for each disk
[ 104.8] Converting Red Hat Enterprise Linux 8.2 Beta (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 740.9] Mapping filesystem data to avoid copying unused and blank areas
[ 742.2] Closing the overlay
[ 742.2] Assigning disks to buses
[ 742.2] Checking if the guest needs BIOS or UEFI to boot
[ 742.2] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[ 742.4] Copying disk 1/1 to /tmp/v2v.EaqJgZ/5792ab14-7746-4340-a27d-845dc12b8db9/images/d90c5810-6e98-47c1-88c6-e47d41c25770/a5a07a53-1017-4ec6-ba19-32e98422fe9d (raw)
    (100.00/100%)
[1014.9] Creating output metadata
[1015.0] Finishing off

3.2 Conversion can be finished successfully,and boot guest on rhv

3.3 Check if the guest has installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
qemu-guest-agent-4.2.0-15.module+el8.2.0+6029+618ef2ec.x86_64
[root@unused ~]# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; disabled; vendor preset:>
   Active: active (running) since Thu 2020-03-19 04:50:11 EDT; 33min ago
 Main PID: 815 (qemu-ga)
    Tasks: 1
   Memory: 3.7M
   CGroup: /system.slice/qemu-guest-agent.service
           └─815 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-ports/org.qemu.gu>

Mar 19 04:50:11 localhost.localdomain systemd[1]: Started QEMU Guest Agent.

Result 3:Virt-v2v installed the latest version qemu-guest-agent to guest,and the qemu-ga service works well.

Scenario 4:Convert a rhel7 guest to rhv
# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw --mac 00:50:56:ac:c3:1f:bridge:ovirtmgmt esx6.5-rhel7.7-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib/ -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.4] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel7.7-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib/ -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA
[   1.9] Creating an overlay to protect the source from being modified
[   5.2] Opening the overlay
[  11.2] Inspecting the overlay
[  26.0] Checking for sufficient free disk space in the guest
[  26.0] Estimating space required on target for each disk
[  26.0] Converting Red Hat Enterprise Linux Server 7.7 (Maipo) to run on KVM
virt-v2v: warning: failed to install QEMU Guest Agent: command: 	package 
qemu-guest-agent-10:2.12.0-3.el7.x86_64 is already installed
virt-v2v: This guest has virtio drivers installed.
[ 102.6] Mapping filesystem data to avoid copying unused and blank areas
[ 103.0] Closing the overlay
[ 103.1] Assigning disks to buses
[ 103.1] Checking if the guest needs BIOS or UEFI to boot
[ 103.1] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[ 104.2] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.5pFQGa/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 612.9] Creating output metadata
[ 614.4] Finishing off

4.2 Conversion can be finished successfully,and virt-v2v will give an info about qemu-guest-agent installation.

4.3 Check if the guest has installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-3.el7.x86_64
[root@unused ~]# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-03-19 18:39:02 CST; 10min ago
 Main PID: 728 (qemu-ga)
    Tasks: 1
   CGroup: /system.slice/qemu-guest-agent.service
           └─728 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-p...

Mar 19 18:39:02 localhost.localdomain systemd[1]: Started QEMU Guest Agent.

Result 4:RHEL8  conversion server can install qemu-guest-agent to rhel7 guest and service works normally.

Scenario 5:Test without setting VIRTIO_WIN=/usr/share/virtio-win/
5.1 Removed VIRTIO_WIN set in conversion server
# echo $VIRTIO_WIN

5.2 Convert a rhel8 guest to rhv
# 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.6] Creating an overlay to protect the source from being modified
[   2.1] Opening the overlay
[  23.2] Inspecting the overlay
[ 146.6] Checking for sufficient free disk space in the guest
[ 146.6] Estimating space required on target for each disk
[ 146.6] Converting Red Hat Enterprise Linux 8.1 Beta (Ootpa) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el8’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
^C

Result 5:virt-v2v will give a warning info about cannot find guest tools directory.


Hi, tgolembi
Based on the above test results,virt-v2v can install qemu-guest-agent to rhel8 guest,but I still have 2 problem:
1.I think we should improve the log info:
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: package qemu-guest-agent-xx-xx is already installed

2. I want to confirm:Which linux guest version is supported by rhel 8 to install qemu-guest-agent during the v2v conversion?
Is it same as rhel7 conversion server?

Comment 24 Tomáš Golembiovský 2020-03-24 10:03:28 UTC
> Hi, tgolembi
> Based on the above test results,virt-v2v can install qemu-guest-agent to
> rhel8 guest,but I still have 2 problem:
> 1.I think we should improve the log info:
> 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.

yes, we can do that

> 
> 2>If the guest already installed the latest version qemu-guest-agent,
> virt-v2v: package qemu-guest-agent-xx-xx is already installed

If there is any qemu-guest-agent RPM installed (older or newer) virt-v2v will not attempt to install anything. But yes, we can inform about that too.

I will post the patches for these two things later but I don't think we should block this BZ on this.

> 
> 2. I want to confirm:Which linux guest version is supported by rhel 8 to
> install qemu-guest-agent during the v2v conversion?
> Is it same as rhel7 conversion server?

Yes, rhel8 virt-v2v can also install el6/7 and suse if the packages are available.

Comment 25 liuzi 2020-03-24 11:08:42 UTC
File a new bug to track the log problem.
Bug 1816603 - virt-v2v should improve the log info for install qemu-guest-agent on rhel8 guest

As comment 23 and comment24,now change the bug from ON_QA to VERIFIED.

Comment 27 errata-xmlrpc 2020-05-05 09:55:54 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://access.redhat.com/errata/RHBA-2020:2017


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