Bug 1619665 - RFE: virt-v2v: Install ovirt-guest-agent-common on Linux guests being migrated to RHV
Summary: RFE: virt-v2v: Install ovirt-guest-agent-common on Linux guests being migrate...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1620569 1621895
Blocks: 1620594
TreeView+ depends on / blocked
 
Reported: 2018-08-21 12:33 UTC by Richard W.M. Jones
Modified: 2019-08-06 12:45 UTC (History)
10 users (show)

Fixed In Version: libguestfs-1.40.2-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1620594 (view as bug list)
Environment:
Last Closed: 2019-08-06 12:44:27 UTC
Target Upstream Version:


Attachments (Terms of Use)
suse-qemu-agent (99.02 KB, image/png)
2019-03-20 10:43 UTC, liuzi
no flags Details
suse-man-start (56.92 KB, image/png)
2019-03-20 10:44 UTC, liuzi
no flags Details
suse-service-manager (338.16 KB, image/png)
2019-03-20 10:45 UTC, liuzi
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:2096 None None None 2019-08-06 12:45:45 UTC

Description Richard W.M. Jones 2018-08-21 12:33:48 UTC
Description of problem:

virt-v2v currently installs RHV-APT on Windows guests.  We should
install rhevm-guest-agent-common on Linux guests.

Version-Release number of selected component (if applicable):

virt-v2v 1.38.4

Comment 3 Tomáš Golembiovský 2018-08-21 13:57:08 UTC
The package is called ovirt-guest-agent-common. We don't call it rhevm-* anymore.
Also, as dependency, we will need to install qemu-guest-agent RPM too.

From where is yet to be determined. Based on email discussion RHV Tools ISO seems to be the preferred source of it.

Comment 4 Tomáš Golembiovský 2018-08-21 14:00:36 UTC
Actually, we're in a process of moving features from oVirt Guest Agent into QEMU Guest Agent. And since we're talking about RHEL 7.7 time-frame it may be just good enough to install just QEMU Guest Agent... but let's not rush this decision.

Comment 5 Pino Toscano 2018-08-21 14:06:41 UTC
Is this a duplicate of bug 1463693 (which should be reopened, then)?

Comment 6 Tomáš Golembiovský 2018-08-21 14:14:08 UTC
Not exactly. At that time, bug 1463693 was considering only the Windows guests. What has been said there still holds and for Windows there is no pressing need to install anything else (assuming RHV environment is configured properly).

This bug focuses on Linux guests where RHV-Apt is not available.

Comment 7 Pino Toscano 2018-08-21 14:32:43 UTC
(In reply to Tomáš Golembiovský from comment #6)
> Not exactly. At that time, bug 1463693 was considering only the Windows
> guests.

Hm ok, then I will copy most of what I said there, since it applies for Linux guests:

> https://access.redhat.com/solutions/261763
> " How to install the RHEV Guest Agent in a virtual machine"

According to these instructions, the procedure is like the following:
1) make sure the VM is subscribed to a "common" channel (which I think is available for any customer)
2) install a package from there
3) enable the service of the agent

Random unordered thoughts I have about this:
a) this is specific for RHEL, so surely per-distro procedures (and for Windows too) will need to be implemented
b) the guest agent is composed by various files: Python sources, PAM configurations, oVirt/RHV hooks, udev rules, and so on; for this reason, copying it from the v2v conversion server is too unpractical, and anyway using distro packages on the guest gives the great benefit of automatic in-guest updates
c) I don't think doing the procedure during the conversion is the best idea, especially since v2v generally does not install new packages on Linux [1]; thus IMHO the best option is a firstboot script
d) there may be a number of failures during general distro installation, e.g. installation failing for some reason
e) in addition to (d), there may be a number of failures on RHEL, e.g. the guest not subscribed with subscription-manager, not attached to a valid pool, not able to subscribe to the "common" channel

[1] except when replacing old VMware tools RPMs which provide replacements for system libraries, but this is a very niche (and possibly no more happening) scenario

Comment 8 Richard W.M. Jones 2018-08-21 15:01:21 UTC
> especially since v2v generally does not install new packages on Linux [1]

This isn't a rule.

Old virt-v2v used to install new kernels, but I dropped that because
it was incredibly complex and required the user to do a bunch of
complex custom setup which no one ever did.

However that was specifically for installing new kernels.  It doesn't
apply generally.  If we can install an RPM or two, which we bundle,
then I don't see a problem.

> d) there may be a number of failures during general distro
> installation, e.g. installation failing for some reason

I'd much rather have this fail during conversion than during
first boot.  Anything which requires network access at boot
is also very hairy.

Comment 9 Pino Toscano 2019-01-17 11:39:44 UTC
This bug will be fixed by the rebase scheduled for RHEL 7.7, see bug 1621895.

Comment 12 liuzi 2019-03-20 10:41:57 UTC
Test bug with builds:
rhv-guest-tools-iso-4.3-3.el7ev.noarch
libguestfs-1.40.2-1.el7.x86_64
virt-v2v-1.40.2-1.el7.x86_64
libvirt-4.5.0-10.el7_6.4.x86_64

Step:
Set environment for the conversion server:
a)According to https://bugzilla.redhat.com/show_bug.cgi?id=1619665#c4,the finally package name is qemu-guest-agent.Download package from:https://brewweb.engineering.redhat.com/brew/packageinfo?packageID=64501

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

c)Mount /usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso to /mnt,and check which linux os are supported in /mnt/linux directory.
debian:
qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb

el6:
qemu-guest-agent-0.12.1.2-2.506.el6_10.1.x86_64.rpm

el7:
qemu-guest-agent-2.12.0-2.el7.x86_64.rpm

fc28:
qemu-guest-agent-2.11.2-4.fc28.x86_64.rpm

lp151:
qemu-guest-agent-2.11.1-lp151.8.2.x86_64.rpm


scenario 1:Convert a rhel6-x86_64 guest:
1.1 # virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.4] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-x86_64
[ 2.5] Creating an overlay to protect the source from being modified
[ 3.3] Opening the overlay
[ 23.6] Inspecting the overlay
[ 144.4] Checking for sufficient free disk space in the guest
[ 144.4] Estimating space required on target for each disk
[ 144.4] Converting Red Hat Enterprise Linux Server release 6.10 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1198.8] Mapping filesystem data to avoid copying unused and blank areas
[1201.7] Closing the overlay
[1202.2] Assigning disks to buses
[1202.2] Checking if the guest needs BIOS or UEFI to boot
[1202.2] 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
[1203.7] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.QCZqh3/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2158.3] Creating output metadata
[2174.0] Finishing off

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

1.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
qemu-guest-agent-0.12.1.2-2.506.el6_10.1.x86_64
# service qemu-ga status
qemu-ga (pid 1073) is running...
#service network restart

1.4 RHV GUI will show guest's ipv4 and ipv6 address on network interfaces page

Result 1:virt-v2v can install qemu-guest-agent on rhel6-x86_64 guests during conversion.

scenario 2:Convert a rhel6-i386 guest:
2.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-i386 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.9] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-i386
[ 3.0] Creating an overlay to protect the source from being modified
[ 4.0] Opening the overlay
[ 55.7] Inspecting the overlay
[ 181.4] Checking for sufficient free disk space in the guest
[ 181.4] Estimating space required on target for each disk
[ 181.4] Converting Red Hat Enterprise Linux Server release 6.10 (Santiago) to run on KVM
virt-v2v: warning: failed to install QEMU Guest Agent: command: error:
Failed dependencies:
libc.so.6()(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.10)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.2.5)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.3)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.3.4)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.4)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libc.so.6(GLIBC_2.9)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libglib-2.0.so.0()(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libgmodule-2.0.so.0()(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libpthread.so.0()(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
libpthread.so.0(GLIBC_2.2.5)(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
librt.so.1()(64bit) is needed by
qemu-guest-agent-2:0.12.1.2-2.506.el6_10.1.x86_64
virt-v2v: This guest has virtio drivers installed.
[1074.5] Mapping filesystem data to avoid copying unused and blank areas
[1077.8] Closing the overlay
[1078.4] Assigning disks to buses
[1078.4] Checking if the guest needs BIOS or UEFI to boot
[1078.4] 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
[1080.2] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.aMYmsu/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2106.4] Creating output metadata
[2130.2] Finishing off

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

2.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 2:virt-v2v doesn't support install qemu-guest-agent on rhel6-i386 guests during conversion.but virt-v2v conversion can be finished and the guest can be boot normally.

scenario 3:Convert a rhel7.5 uefi guest which installed qemu-guest-agent-2.8.0-2.el7.x86_64 by default:
3.1 # virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.5-uefi-encrypt --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs -of raw
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.4] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.5-uefi-encrypt
[ 2.7] Creating an overlay to protect the source from being modified
[ 3.5] Opening the overlay
Enter key or passphrase ("/dev/sda3"):
[ 43.1] Inspecting the overlay
[ 295.4] Checking for sufficient free disk space in the guest
[ 295.4] Estimating space required on target for each disk
[ 295.4] Converting Red Hat Enterprise Linux Server 7.5 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1876.3] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem /dev/rhel/root failed.
Usually you can ignore this message. To find out more read "Trimming" in
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not
supported
virt-v2v: warning: fstrim on guest filesystem /dev/sda1 failed. Usually
you can ignore this message. To find out more read "Trimming" in
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not
supported
[1883.0] Closing the overlay
[1883.7] Assigning disks to buses
[1883.7] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[1883.7] 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
[1885.4] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.tSwjgY/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[3587.1] Creating output metadata
[3605.8] Finishing off

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

3.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-2.el7.x86_64
# 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 Mon 2019-03-18 17:13:21 CST; 20min ago
Main PID: 1107 (qemu-ga)
Tasks: 1
CGroup: /system.slice/qemu-guest-agent.service
└─1107 /usr/bin/qemu-ga -method=virtio-serial --path=/dev/virtio...
(100.00/100%)
#service network restart

3.4 RHV GUI will show guest's ipv4 and ipv6 address on network interfaces page

Result 3:virt-v2v can update low version qemu-guest-agent on guests during conversion and the service is running normally

scenario 4:Convert a rhel7.6 guest which installed qemu-guest-agent-2.12.0-2.el7.x86_64 by default:
4.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-multi-network --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-multi-network
[ 2.8] Creating an overlay to protect the source from being modified
[ 3.7] Opening the overlay
[ 27.0] Inspecting the overlay
[ 232.7] Checking for sufficient free disk space in the guest
[ 232.7] Estimating space required on target for each disk
[ 232.7] Converting Red Hat Enterprise Linux Server 7.6 (Maipo) to run on KVM
virt-v2v: warning: failed to install QEMU Guest Agent: command: package
qemu-guest-agent-10:2.12.0-2.el7.x86_64 is already installed
virt-v2v: This guest has virtio drivers installed.
[1795.3] Mapping filesystem data to avoid copying unused and blank areas
[1797.2] Closing the overlay
[1797.6] Assigning disks to buses
[1797.6] Checking if the guest needs BIOS or UEFI to boot
[1797.6] 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
[1799.0] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.f8SD58/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2795.7] Creating output metadata
[2818.6] Finishing off

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

4.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-2.el7.x86_64
# 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 Mon 2019-03-18 17:13:21 CST; 20min ago
Main PID: 1107 (qemu-ga)
Tasks: 1
CGroup: /system.slice/qemu-guest-agent.service
└─1107 /usr/bin/qemu-ga -method=virtio-serial --path=/dev/virtio...
(100.00/100%)
#service network restart

4.4 RHV GUI will show guest's ipv4 and ipv6 address on network interfaces page

Result 4:Virt-v2v can detect guest-agent's version already installed in the guest and start tools normally in the guest.

scenario 5:Convert a debian9 guest
5.1 # virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs -of raw
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64
[ 3.0] Creating an overlay to protect the source from being modified
[ 3.8] Opening the overlay
[ 22.1] Inspecting the overlay3.3.2 Conversion can be finished successfully,and boot guest on rhv
[ 40.7] Checking for sufficient free disk space in the guest
[ 40.7] Estimating space required on target for each disk
[ 40.7] Converting 9.6 to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of
Grub2
virt-v2v: warning: don't know how to install guest tools on debian-9
virt-v2v: This guest has virtio drivers installed.
[ 973.5] Mapping filesystem data to avoid copying unused and blank areas
[ 976.1] Closing the overlay
[ 976.4] Assigning disks to buses
[ 976.4] Checking if the guest needs BIOS or UEFI to boot
[ 976.4] 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
[ 977.8] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.kWFESUSEAy/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2189.3] Creating output metadata
[2207.1] Finishing off

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

5.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none
Result 5:irt-v2v doesn't support install qemu-guest-agent on debian9.6 guests during conversion.

Scenario 6:Convert a opensuse leap15 guest:
6.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-suse15-x86_64-xfs --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
[ 0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-suse15-x86_64-xfs
[ 2.5] Creating an overlay to protect the source from being modified
[ 3.3] Opening the overlay
[ 19.5] Inspecting the overlay
[ 202.2] Checking for sufficient free disk space in the guest
[ 202.2] Estimating space required on target for each disk
[ 202.2] Converting openSUSE Leap 15.0 to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1298.4] Mapping filesystem data to avoid copying unused and blank areas
[1303.3] Closing the overlay
[1303.8] Assigning disks to buses
[1303.8] Checking if the guest needs BIOS or UEFI to boot
[1303.8] 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
[1305.3] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.PMkkhn/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2459.7] Creating output metadata
[2482.6] Finishing off

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

6.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
The package is installed,but the service is disabled.pls refer to screenshot named suse-qemu-agent: 
The command line startup service also failed, please refer to the screenshot named suse-man-start:
Can't find any service about qume-guest-agent in suse service-manager please refer to the screenshot named suse-service-manager:

Result 6:virt-v2v can install qemu-guest-agent on opensuse leap15 guests during conversion,but the service cannot running normally.


Scenario7:Convert a SLES11 guest:
7.1# virt-v2v -ic xen+ssh://10.73.3.21 xen-hvm-sles11sp4-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs -of raw -b ovirtmgmt
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.5] Opening the source -i libvirt -ic xen+ssh://10.73.3.21 xen-hvm-sles11sp4-x86_64
[ 1.2] Creating an overlay to protect the source from being modified
[ 1.9] Opening the overlay
[ 8.0] Inspecting the overlay
[ 41.3] Checking for sufficient free disk space in the guest
[ 41.3] Estimating space required on target for each disk
[ 41.3] Converting SUSE Linux Enterprise Server 11 SP4 to run on KVM
virt-v2v: warning: failed to install QEMU Guest Agent: command: warning:
/var/tmp/qemu-guest-agent-2.11.1-lp151.8.2.x86_64.rpm: Header V3 RSA/SHA256
signature: NOKEY, key ID 3dbdc284
error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by
qemu-guest-agent-2.11.1-lp151.8.2.x86_64
libpthread.so.0(GLIBC_2.12)(64bit) is needed by
qemu-guest-agent-2.11.1-lp151.8.2.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by
qemu-guest-agent-2.11.1-lp151.8.2.x86_64
systemd is needed by qemu-guest-agent-2.11.1-lp151.8.2.x86_64
virt-v2v: This guest has virtio drivers installed.
[ 100.0] Mapping filesystem data to avoid copying unused and blank areas
[ 101.5] Closing the overlay
[ 101.8] Assigning disks to buses
[ 101.8] Checking if the guest needs BIOS or UEFI to boot
[ 101.8] 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
[ 977.8] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.kWFEAy/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2189.3] Creating output metadata
[2207.1] Finishing off

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

7.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 7:virt-v2v doesn't support install qemu-guest-agent on SLSE11 guest during conversion

Scenario 8:Convert a rhel5 guest:
8.1、# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel5.11-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.8] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel5.11-x86_64
[ 3.0] Creating an overlay to protect the source from being modified
[ 3.8] Opening the overlay
[ 22.9] Inspecting the overlay
[ 116.4] Checking for sufficient free disk space in the guest
[ 116.4] Estimating space required on target for each disk
[ 116.4] Converting Red Hat Enterprise Linux Server release 5.11 (Tikanga) to run on KVM
virt-v2v: warning: don't know how to install guest tools on rhel-5
virt-v2v: This guest has virtio drivers installed.
[1305.1] Mapping filesystem data to avoid copying unused and blank areas
[1314.3] Closing the overlay
[1314.6] Assigning disks to buses
[1314.6] Checking if the guest needs BIOS or UEFI to boot
[1314.6] 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
[1316.0] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.AsK7GW/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2224.9] Creating output metadata
[2242.7] Finishing off

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

8.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 8:virt-v2v doesn't support install qemu-guest-agent on rhel5 guest during conversion

Scenario 9:Convert a linux guest when conversion server doesn't install rhv-guest-tools-iso-4.3-3.el7ev.noarch :
9.1# virt-v2v -ic xen+ssh://10.73.3.21 xen-hvm-sles11sp4-x86_64  -o rhv -os 10.66.144.40:/home/nfs_export  -on xen-hvm-sles11sp4-x86_64-bug1679960  -of qcow2 -b ovirtmgmt
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.73.3.21 xen-hvm-sles11sp4-x86_64
[   0.6] Creating an overlay to protect the source from being modified
[   1.4] Opening the overlay
[   7.1] Inspecting the overlay
[  30.3] Checking for sufficient free disk space in the guest
[  30.3] Estimating space required on target for each disk
[  30.3] Converting SUSE Linux Enterprise Server 11 SP4 to run on KVM
virt-v2v: warning: guest tools directory ‘linux/lp151’ 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.
[  83.0] Mapping filesystem data to avoid copying unused and blank areas
[  84.5] Closing the overlay
[  84.6] Assigning disks to buses
[  84.7] Checking if the guest needs BIOS or UEFI to boot
[  84.7] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[  85.2] Copying disk 1/1 to /tmp/v2v.o8NTjH/c980b640-cb59-47f7-a0fe-90312d33deae/images/1e964376-34c4-44d6-9492-316fdc1291db/d7036f47-2c30-4439-99e0-72059dcaaab6 (qcow2)
    (100.00/100%)
[ 328.8] Creating output metadata
[ 328.9] Finishing off

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

9.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 9:When conversion server doesn't install rhv-guest-tools-iso-4.3-3.el7ev.noarch,virt-v2v will give warning info during conversion.

Hi Rjones:
  Virt-v2v can install qemu-guest-agent to some special guests during conversion, but I have some questions:

1.For result 2 and result7:
a)virt-v2v cannot install qemu-guest-agent to these guests,because there is no package for rhel6-i386 and slse 11 in rhv-tools-setup.iso.so I want to confirm if virt-v2v support install qemu-guest-agent for these linux os.
b)I think the virt-v2v warning info "failed to install QEMU Guest Agent...Failed dependencies" is not accurate, Should we provide the warning message more clear? such as "virt-v2v can't find guest tools package in the virtio-win directory or ISO." or "virt-v2v doesn't support to install qemu-guest-agent to XXXX guests"

2.For result 5,the provided package for debian is qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb,but I cannot find kernel version with deb9u4 in those pages:https://packages.debian.org/stable/kernel/, https://packages.debian.org/testing/kernel/, https://packages.debian.org/unstable/kernel/. so the package for debian in rhv-tools-setup.iso is invalid.
a)Should we rebulid the qemu-guest-agent to debian?
b)If only one version of debian is supported, should we support the latest one?

3.For result 6,virt-v2v can install qemu-guest-agent on opensuse leap15 guests during conversion,but the service cannot running normally.

4.For result 8,I think the warning info should be more clear,such as "virt-v2v doesn't support to install qemu-guest-agent to rhel5 guests"

5.Do we need to add documentation about installing qemu-guest-agent? The document needs to contain:
a)How to set conversion server's env;
b)Which linux os are supported and which are not;
c)How to use qemu-guest-agent
...

Comment 13 liuzi 2019-03-20 10:43:25 UTC
Created attachment 1546000 [details]
suse-qemu-agent

Comment 14 liuzi 2019-03-20 10:44:09 UTC
Created attachment 1546001 [details]
suse-man-start

Comment 15 liuzi 2019-03-20 10:45:00 UTC
Created attachment 1546002 [details]
suse-service-manager

Comment 16 Richard W.M. Jones 2019-03-20 11:55:12 UTC
I think you want to ask Pino or Tomas about this.

Comment 17 Pino Toscano 2019-03-20 15:16:02 UTC
(In reply to liuzi from comment #12)
> 1.For result 2 and result7:
> a)virt-v2v cannot install qemu-guest-agent to these guests,because there is
> no package for rhel6-i386 and slse 11 in rhv-tools-setup.iso.so I want to
> confirm if virt-v2v support install qemu-guest-agent for these linux os.

Regarding architectures: we currently copy all the files in the directory of a distro, and try to install them.
We need to filter them by architecture, so at least we attempt to install packages for the same architecture.
I will look into that.

> 3.For result 6,virt-v2v can install qemu-guest-agent on opensuse leap15
> guests during conversion,but the service cannot running normally.

Regard the guest agent package: right now the SUSE package is considered supported for all the SUSE versions.
Tomáš: do you know which SUSE version is it for? It looks like it needs system (so not on SLES 11), and fails to start on Leap 15.0.

> b)I think the virt-v2v warning info "failed to install QEMU Guest
> Agent...Failed dependencies" is not accurate, Should we provide the warning
> message more clear? such as "virt-v2v can't find guest tools package in the
> virtio-win directory or ISO." or "virt-v2v doesn't support to install
> qemu-guest-agent to XXXX guests"

> 4.For result 8,I think the warning info should be more clear,such as
> "virt-v2v doesn't support to install qemu-guest-agent to rhel5 guests"

There are two messages:
1) there are actual installation failures, like when virt-v2v tried to install the x86_64 package on an i386 RHEL; this message is correct
2) lack of tools when the RHV Tools ISO is not available, or when the ISO does not have the agent for the converted Linux distribution

(1) will be partially solved by fixing the architecture issue, and figuring out which SUSE versions are supported by the provided package in the ISO

(2) can be improved indeed

> 2.For result 5,the provided package for debian is
> qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb,but I cannot find kernel
> version with deb9u4 in those

deb9u4 is just a suffix for the version, to indicate it is the 4th update of Debian 9 of the package qemu-guest-agent_2.8+dfsg-6.

Also: you used "rpm" on a Debian system, to check whether the qemu-guest-agent package is installed after the conversion.
This is obviously not working, and you must use "dpkg" (which is the Debian package manager).

> 5.Do we need to add documentation about installing qemu-guest-agent? The
> document needs to contain:
> a)How to set conversion server's env;
> b)Which linux os are supported and which are not;
> c)How to use qemu-guest-agent

This is needed mostly for RHV, and conversions done in RHV set up all of this automatically.
In addition, the RHV Tools ISO is only available for RHV, not for oVirt, so this can be documented only in Red Hat's Knowledge Base (and not in the upstream documentation).

Comment 18 liuzi 2019-03-21 10:19:31 UTC
(In reply to Pino Toscano from comment #17)

> > 3.For result 6,virt-v2v can install qemu-guest-agent on opensuse leap15
> > guests during conversion,but the service cannot running normally.
> 
> Regard the guest agent package: right now the SUSE package is considered
> supported for all the SUSE versions.
> Tomáš: do you know which SUSE version is it for? It looks like it needs
> system (so not on SLES 11), and fails to start on Leap 15.0.

Currently the package only supported for the opensuse and the service cannot start.so we need to confirm two things:
1)The service cannot start whether it is a bug.
2)Which SUSE versions are supported

> There are two messages:
> 1) there are actual installation failures, like when virt-v2v tried to
> install the x86_64 package on an i386 RHEL; this message is correct
> 2) lack of tools when the RHV Tools ISO is not available, or when the ISO
> does not have the agent for the converted Linux distribution
> 
> (1) will be partially solved by fixing the architecture issue, and figuring
> out which SUSE versions are supported by the provided package in the ISO
> 
> (2) can be improved indeed

The conclusion after discussing with Pino in Irc is:
1) virt-v2v will show a message when tools installed successfully,
2) In case a package is available and the installation fails, then there will be a warning
3) When the rhv tools iso is used, but it does not have the package for the guest,virt-v2v will not show any messa

> > 2.For result 5,the provided package for debian is
> > qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb,but I cannot find kernel
> > version with deb9u4 in those
> 
> deb9u4 is just a suffix for the version, to indicate it is the 4th update of
> Debian 9 of the package qemu-guest-agent_2.8+dfsg-6.
> 
> Also: you used "rpm" on a Debian system, to check whether the
> qemu-guest-agent package is installed after the conversion.
> This is obviously not working, and you must use "dpkg" (which is the Debian
> package manager).

Sorry for the test process description is not accurate.
I have tried to convert debian9.6 and debian 9.4,they are all failed to install qemu-guest-agent,and warning info is "virt-v2v: warning: don't know how to install guest tools on debian-9"
After conversion
1)for debian 9.6:
#dpkg -l|grep linux-image
ii linux-image-4.9.0-8-amd64   4.9.130-2              amd64  Linux 4.9 for 64-bit PCs
ii linux-image-amd64           4.9+80+deb9u6          amd64  Linux for 64-bit PCs (meta-package)
#dpkg -l|grep qemu-guest-agent
none

2)for debian 9.4:
#dpkg -l|grep linux-image
ii linux-image-4.9.0-8-amd64   4.9.110-3+deb9u6        amd64  Linux 4.9 for 64-bit PCs
ii linux-image-amd64           4.9+80+deb9u6           amd64  Linux for 64-bit PCs (meta-package)
#dpkg -l|grep qemu-guest-agent
none

Additionally,I think the warning info "virt-v2v: warning: don't know how to install guest tools on debian-9" is not correct.

Thanks!

Comment 19 liuzi 2019-04-30 02:27:52 UTC
Verify bug with builds:
virt-v2v-1.40.2-3.el7.x86_64
libvirt-4.5.0-12.el7.x86_64
libguestfs-1.40.2-3.el7.x86_64
qemu-kvm-rhev-2.12.0-26.el7.x86_64
rhv-guest-tools-iso-4.3-6.el7ev.noarch

Steps:
Set environment for the conversion server:
a)Download package from:https://brewweb.engineering.redhat.com/brew/packageinfo?packageID=64501

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

c)Mount /usr/share/rhv-guest-tools-iso/rhv-tools-setup.iso to /mnt,and check which linux os are supported in /mnt/linux directory.

debian:
qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb

el6:
qemu-guest-agent-0.12.1.2-2.506.el6_10.1.x86_64.rpm

el7:
qemu-guest-agent-2.12.0-2.el7.x86_64.rpm

fc28:
qemu-guest-agent-2.11.2-4.fc28.x86_64.rpm

lp151:
qemu-guest-agent-2.11.1-lp151.8.2.x86_64.rpm

e)According to bug1691659,virt-v2v will only show a message when qemu-guest-agent is installed in guest successfully during conversion,and hide warning info about rhv-guest-tools for other cases.


scenario 1:Convert a rhel6-x86_64 guest:
1.1 #  virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os rhvh_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=rhvh
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.4] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-x86_64
[   2.3] Creating an overlay to protect the source from being modified
[   3.2] Opening the overlay
[  24.3] Inspecting the overlay
[ 145.1] Checking for sufficient free disk space in the guest
[ 145.1] Estimating space required on target for each disk
[ 145.1] Converting Red Hat Enterprise Linux Server release 6.10 (Santiago) to run on KVM
virt-v2v: QEMU Guest Agent installed for this guest.
virt-v2v: This guest has virtio drivers installed.
[1153.0] Mapping filesystem data to avoid copying unused and blank areas
[1155.6] Closing the overlay
[1156.4] Assigning disks to buses
[1156.4] Checking if the guest needs BIOS or UEFI to boot
[1156.4] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os rhvh_data
[1157.9] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.1OalwR/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[2272.6] Creating output metadata
[2295.6] Finishing off

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

1.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
qemu-guest-agent-0.12.1.2-2.506.el6_10.1.x86_64
# service qemu-ga status
qemu-ga (pid 1073) is running...
#service network restart

1.4 RHV GUI will show guest's ipv4 and ipv6 address on network interfaces page

Result 1:virt-v2v can install qemu-guest-agent on rhel6-x86_64 guests during conversion.

scenario 2:Convert a rhel6-i386 guest:
2.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-i386 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.6] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-i386
[   2.8] Creating an overlay to protect the source from being modified
[   3.8] Opening the overlay
[  27.6] Inspecting the overlay
[ 170.4] Checking for sufficient free disk space in the guest
[ 170.4] Estimating space required on target for each disk
[ 170.4] Converting Red Hat Enterprise Linux Server release 6.10 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1078.7] Mapping filesystem data to avoid copying unused and blank areas
[1082.1] Closing the overlay
[1082.7] Assigning disks to buses
[1082.7] Checking if the guest needs BIOS or UEFI to boot
[1082.7] 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
[1084.1] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.wbHuM4/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[2374.2] Creating output metadata
[2395.9] Finishing off

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

2.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 2:virt-v2v doesn't support install qemu-guest-agent on rhel6-i386 guests during conversion.

scenario 3:Convert a rhel7.5 uefi guest which installed qemu-guest-agent-2.8.0-2.el7.x86_64 by default:
3.1 # virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.5-uefi-encrypt --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs -of raw
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.4] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.5-uefi-encrypt
[ 2.7] Creating an overlay to protect the source from being modified
[ 3.5] Opening the overlay
Enter key or passphrase ("/dev/sda3"):
[ 43.1] Inspecting the overlay
[ 295.4] Checking for sufficient free disk space in the guest
[ 295.4] Estimating space required on target for each disk
[ 295.4] Converting Red Hat Enterprise Linux Server 7.5 (Maipo) to run on KVM
virt-v2v: QEMU Guest Agent installed for this guest.
virt-v2v: This guest has virtio drivers installed.
[1876.3] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem /dev/rhel/root failed.
Usually you can ignore this message. To find out more read "Trimming" in
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not
supported
virt-v2v: warning: fstrim on guest filesystem /dev/sda1 failed. Usually
you can ignore this message. To find out more read "Trimming" in
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not
supported
[1883.0] Closing the overlay
[1883.7] Assigning disks to buses
[1883.7] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[1883.7] 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
[1885.4] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.tSwjgY/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[3587.1] Creating output metadata
[3605.8] Finishing off

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

3.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-2.el7.x86_64
# 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 Mon 2019-04-28 15:13:21 CST; 20min ago
Main PID: 1107 (qemu-ga)
Tasks: 1
CGroup: /system.slice/qemu-guest-agent.service
└─1107 /usr/bin/qemu-ga -method=virtio-serial --path=/dev/virtio...
(100.00/100%)
#service network restart

3.4 RHV GUI will show guest's ipv4 and ipv6 address on network interfaces page

Result 3:virt-v2v can update low version qemu-guest-agent on guests during conversion and the service is running normally

scenario 4:Convert a rhel7.6 guest which installed qemu-guest-agent-2.12.0-2.el7.x86_64 by default:
4.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-multi-network --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-multi-network
[ 2.8] Creating an overlay to protect the source from being modified
[ 3.7] Opening the overlay
[ 27.0] Inspecting the overlay
[ 232.7] Checking for sufficient free disk space in the guest
[ 232.7] Estimating space required on target for each disk
[ 232.7] Converting Red Hat Enterprise Linux Server 7.6 (Maipo) to run on KVM
virt-v2v: warning: failed to install QEMU Guest Agent: command: package
qemu-guest-agent-10:2.12.0-2.el7.x86_64 is already installed
virt-v2v: This guest has virtio drivers installed.
[1795.3] Mapping filesystem data to avoid copying unused and blank areas
[1797.2] Closing the overlay
[1797.6] Assigning disks to buses
[1797.6] Checking if the guest needs BIOS or UEFI to boot
[1797.6] 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
[1799.0] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.f8SD58/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2795.7] Creating output metadata
[2818.6] Finishing off

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

4.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-2.el7.x86_64
# 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 Mon 2019-04-29 17:13:21 CST; 20min ago
Main PID: 1107 (qemu-ga)
Tasks: 1
CGroup: /system.slice/qemu-guest-agent.service
└─1107 /usr/bin/qemu-ga -method=virtio-serial --path=/dev/virtio...
(100.00/100%)
#service network restart

4.4 RHV GUI will show guest's ipv4 and ipv6 address on network interfaces page

Result 4:Virt-v2v can detect guest-agent's version already installed in the guest and start tools normally in the guest.

scenario 5:Convert a debian9 guest
5.1 # virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs -of raw
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64
[ 3.0] Creating an overlay to protect the source from being modified
[ 3.8] Opening the overlay
[ 22.1] Inspecting the overlay3.3.2 Conversion can be finished successfully,and boot guest on rhv
[ 40.7] Checking for sufficient free disk space in the guest
[ 40.7] Estimating space required on target for each disk
[ 40.7] Converting 9.6 to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of
Grub2
virt-v2v: This guest has virtio drivers installed.
[ 973.5] Mapping filesystem data to avoid copying unused and blank areas
[ 976.1] Closing the overlay
[ 976.4] Assigning disks to buses
[ 976.4] Checking if the guest needs BIOS or UEFI to boot
[ 976.4] 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
[ 977.8] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.kWFESUSEAy/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2189.3] Creating output metadata
[2207.1] Finishing off

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

5.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# dpkg -l|grep qemu-guest-agent
none

Result 5:irt-v2v doesn't support install qemu-guest-agent on debian9.6 guests during conversion.

Scenario 6:Convert a opensuse leap15 guest:
6.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-suse15-x86_64-xfs --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
[ 0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-suse15-x86_64-xfs
[ 2.5] Creating an overlay to protect the source from being modified
[ 3.3] Opening the overlay
[ 19.5] Inspecting the overlay
[ 202.2] Checking for sufficient free disk space in the guest
[ 202.2] Estimating space required on target for each disk
[ 202.2] Converting openSUSE Leap 15.0 to run on KVM
virt-v2v: QEMU Guest Agent installed for this guest.
virt-v2v: This guest has virtio drivers installed.
[1298.4] Mapping filesystem data to avoid copying unused and blank areas
[1303.3] Closing the overlay
[1303.8] Assigning disks to buses
[1303.8] Checking if the guest needs BIOS or UEFI to boot
[1303.8] 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
[1305.3] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.PMkkhn/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2459.7] Creating output metadata
[2482.6] Finishing off

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

6.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
The package is installed,but the service is disabled.
The command line startup service also failed, 
# rpm -q qemu-guest-agent
qemu-guest-agent-2.11.1-lp151.8.2.x86_64

# systemctl list-unit-files|grep qemu
qemu-ga@.service                          enabled  

# systemctl enable qemu-ga@

# systemctl start qemu-ga@
Failed to start qemu-ga@.service: Unit name qemu-ga@.service is missing the instance name.
See system logs and 'systemctl status qemu-ga@.service' for details.

# systemctl status qemu-ga@.service
Failed to get properties: Unit name qemu-ga@.service is neither a valid invocation ID nor unit name

Result 6:virt-v2v can install qemu-guest-agent on opensuse leap15 guests during conversion,but the service cannot running normally.


Scenario7:Convert a SLES15 guest:
7.1# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-sles15-x86_64-GUI --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.5] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-sles15-x86_64-GUI
[   2.3] Creating an overlay to protect the source from being modified
[   3.1] Opening the overlay
[  24.9] Inspecting the overlay
[ 177.0] Checking for sufficient free disk space in the guest
[ 177.0] Estimating space required on target for each disk
[ 177.0] Converting SUSE Linux Enterprise Server 15 to run on KVM
virt-v2v: QEMU Guest Agent installed for this guest.
virt-v2v: This guest has virtio drivers installed.
[1344.7] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem /dev/sda1 failed.  Usually 
you can ignore this message.  To find out more read "Trimming" in 
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not 
supported
[1349.1] Closing the overlay
[1349.9] Assigning disks to buses
[1349.9] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[1349.9] 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
[1351.3] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.BcbeXA/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[2207.0] Creating output metadata
[2225.7] Finishing off

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

7.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
The package is installed,but the service is disabled.The command line startup service also failed, 
# rpm -q qemu-guest-agent
qemu-guest-agent-2.11.1-lp151.8.2.x86_64

# systemctl list-unit-files|grep qemu
qemu-ga@.service                          enabled  

# systemctl enable qemu-ga@

# systemctl start qemu-ga@
Failed to start qemu-ga@.service: Unit name qemu-ga@.service is missing the instance name.
See system logs and 'systemctl status qemu-ga@.service' for details.

# systemctl status qemu-ga@.service
Failed to get properties: Unit name qemu-ga@.service is neither a valid invocation ID nor unit name

Result 7:virt-v2v can install qemu-guest-agent on SLSE15 guests during conversion,but the service cannot running normally.

Scenario 8:Convert a rhel5 guest:
8.1、# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel5.11-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=nfs
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.8] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.196.89/?no_verify=1 esx6.5-rhel5.11-x86_64
[ 3.0] Creating an overlay to protect the source from being modified
[ 3.8] Opening the overlay
[ 22.9] Inspecting the overlay
[ 116.4] Checking for sufficient free disk space in the guest
[ 116.4] Estimating space required on target for each disk
[ 116.4] Converting Red Hat Enterprise Linux Server release 5.11 (Tikanga) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1305.1] Mapping filesystem data to avoid copying unused and blank areas
[1314.3] Closing the overlay
[1314.6] Assigning disks to buses
[1314.6] Checking if the guest needs BIOS or UEFI to boot
[1314.6] 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
[1316.0] Copying disk 1/1 to qemu URI json:
{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.AsK7GW/nbdkit0.sock", "file.export": "/" }

(raw)
(100.00/100%)
[2224.9] Creating output metadata
[2242.7] Finishing off

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

8.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 8:virt-v2v doesn't support install qemu-guest-agent on rhel5 guest during conversion

Scenario 9:Convert a linux guest when conversion server doesn't install rhv-guest-tools-iso-4.3-3.el7ev.noarch :
9.1# virt-v2v -ic xen+ssh://10.73.3.21 xen-hvm-sles11sp4-x86_64  -o rhv -os 10.66.144.40:/home/nfs_export  -on xen-hvm-sles11sp4-x86_64-bug1679960  -of qcow2 -b ovirtmgmt
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.73.3.21 xen-hvm-sles11sp4-x86_64
[   0.6] Creating an overlay to protect the source from being modified
[   1.4] Opening the overlay
[   7.1] Inspecting the overlay
[  30.3] Checking for sufficient free disk space in the guest
[  30.3] Estimating space required on target for each disk
[  30.3] Converting SUSE Linux Enterprise Server 11 SP4 to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  83.0] Mapping filesystem data to avoid copying unused and blank areas
[  84.5] Closing the overlay
[  84.6] Assigning disks to buses
[  84.7] Checking if the guest needs BIOS or UEFI to boot
[  84.7] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[  85.2] Copying disk 1/1 to /tmp/v2v.o8NTjH/c980b640-cb59-47f7-a0fe-90312d33deae/images/1e964376-34c4-44d6-9492-316fdc1291db/d7036f47-2c30-4439-99e0-72059dcaaab6 (qcow2)
    (100.00/100%)
[ 328.8] Creating output metadata
[ 328.9] Finishing off

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

9.3 Check if the guest has correctly installed qume-guest-agent and the service is running normally.
# rpm -q qemu-guest-agent
none

Result 9:When conversion server doesn't install rhv-guest-tools-iso-4.3-3.el7ev.noarch,virt-v2v will hide warning info about qemu-guest-agent during conversion.

Hi Pino:
  Virt-v2v can install qemu-guest-agent to some special guests during conversion, but I still have some questions:

1.For result 5,the tools iso provides a package qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb for debian guests,but the result shows that virt-v2v doesn't support install qemu-guest-agent on debian guests.Should we remove the package from tools iso?

2.For result 6 and result 7,virt-v2v can install qemu-guest-agent on suse guests during conversion,but the service cannot start on the guest.Should we file a bug for this?

Thanks!

Comment 20 Pino Toscano 2019-05-07 14:36:58 UTC
(In reply to liuzi from comment #19)
> 1.For result 5,the tools iso provides a package
> qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb for debian guests,but the
> result shows that virt-v2v doesn't support install qemu-guest-agent on
> debian guests.Should we remove the package from tools iso?

The directory where it is in has a too generic name, so virt-v2v will not use it for now.
Regarding the presence in the ISO: Tomáš?

> 2.For result 6 and result 7,virt-v2v can install qemu-guest-agent on suse
> guests during conversion,but the service cannot start on the guest.Should we
> file a bug for this?

I tried on openSUSE 15: there is no need to start the service manually.
The service is enabled for the first qemu guest agent channel available, i.e. org.qemu.guest_agent.0.
See also the udev rules for it: /usr/lib/udev/rules.d/80-qemu-ga.rules (part of the qemu-guest-agent package in SUSE).
So unless there is a QEMU guest agent channel (see [1] and [2]) the service will not start automatically.

[1] https://wiki.libvirt.org/page/Qemu_guest_agent
[2] https://access.redhat.com/solutions/732773

Comment 21 liuzi 2019-05-08 06:26:38 UTC
Hi Pino
Thank you for your patient explanation.
Refer to comment 19 and comment 20,now change the bug from ON_QA to Verified.

Comment 22 Tomáš Golembiovský 2019-07-01 12:05:13 UTC
(In reply to Pino Toscano from comment #20)
> (In reply to liuzi from comment #19)
> > 1.For result 5,the tools iso provides a package
> > qemu-guest-agent_2.8+dfsg-6+deb9u4_amd64.deb for debian guests,but the
> > result shows that virt-v2v doesn't support install qemu-guest-agent on
> > debian guests.Should we remove the package from tools iso?
> 
> The directory where it is in has a too generic name, so virt-v2v will not
> use it for now.
> Regarding the presence in the ISO: Tomáš?

I am for keeping those on the ISO. Ideally we should find a way to implement the feature for debian based systems. There are some technicalities blocking it at the moment.

Comment 23 Pino Toscano 2019-07-03 06:30:56 UTC
(In reply to liuzi from comment #19)
> 2.For result 6 and result 7,virt-v2v can install qemu-guest-agent on suse
> guests during conversion,but the service cannot start on the guest.Should we
> file a bug for this?

After a big of investigation, we found out that this was a bug in the qemu-guest-agent package of openSUSE Leap 15.
liuzi kindly open a bug to update it on the RHV Tools ISO:
https://bugzilla.redhat.com/show_bug.cgi?id=1726494
(contains also links to the openSUSE bugs about this)

Comment 25 errata-xmlrpc 2019-08-06 12:44:27 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/RHEA-2019:2096


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