Created attachment 1668836 [details] rhel8-qemu-ga.log Description of problem: Virt-v2v cannot install qemu-guest-agent to guest from virtio-win directory Version-Release number of selected component (if applicable): 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 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 c)Setup export VIRTIO_WIN=/usr/share/virtio-win/ 2.Convert a rhel8 guest which removed default qemu-guest-agent in esx6.7. 2.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: 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 2.2 Conversion can be finished successfully,and boot guest on rhv 2.3 Check if the guest has installed qume-guest-agent and the service is running normally. Virt-v2v can not install qemu-guest-agent in the guest during conversion. 2.4 Check conversion log about warning info. # 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-qemu-ga.log.
requires patch: https://github.com/libguestfs/virt-v2v/commit/6f804792d3a40540360c8cfd3d3309087aab3e78
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:Test without setting VIRTIO_WIN=/usr/share/virtio-win/ 4.1 Removed VIRTIO_WIN set in conversion server # echo $VIRTIO_WIN 4.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 4:virt-v2v will give a warning info about cannot find guest tools directory. As above testing, virt-v2v can install qemu-guest-agent to guest from virtio-win directory,so change the bug from ON_QA to VERIFIED.
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