Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1726494

Summary: rhv-guest-tools-iso should update qemu-guest-agent package for suse guests
Product: [oVirt] ovirt-guest-tools Reporter: liuzi <zili>
Component: QEMU-Guest-AgentAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3-3CC: bugs, emarcus, gzaidman, juzhou, lleistne, mxie, mzhan, ptoscano, rbarry, rjones, tzheng, xiaodwan
Target Milestone: ovirt-4.4.0Flags: sbonazzo: ovirt-4.4?
sbonazzo: planning_ack?
sbonazzo: devel_ack+
lleistne: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
qemu-guest-agent for OpenSUSE guests has been updated to qemu-guest-agent-3.1.0-lp151.6.1 build.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:03:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description liuzi 2019-07-03 03:40:29 UTC
Description of problem:
rhv-guest-tools-iso should update qemu-guest-agent package to qemu-guest-agent-2.11.2-lp150.7.22.1.x86_64 for suse guests

Backgroud:
1.Virt-v2v will install qemu-guest-agent in linux guests during converting guests to RHV,pls refer to https://bugzilla.redhat.com/show_bug.cgi?id=1619665#c4.
2.After conversion,suse guest cannot start qemu-ga@ service,pls refer to https://bugzilla.redhat.com/show_bug.cgi?id=1619665#c19
3.For 2,it's a suse system bug,pls refer to https://bugzilla.novell.com/show_bug.cgi?id=1106828 and https://bugzilla.novell.com/show_bug.cgi?id=1094898


Steps to Reproduce: 
1.Prepare a opensuse 15 guest without qemu-guest-agent on vmware,
2.Use virt-v2v convert the guest to rhv.
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-opensuse15-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os p2v_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=p2v
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.73.141/data/10.73.75.219/?no_verify=1 esx6.7-opensuse15-x86_64
[   2.6] Creating an overlay to protect the source from being modified
[   3.3] Opening the overlay
[  18.9] Inspecting the overlay
[ 209.6] Checking for sufficient free disk space in the guest
[ 209.6] Estimating space required on target for each disk
[ 209.6] 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.
[1310.1] Mapping filesystem data to avoid copying unused and blank areas
[1313.4] Closing the overlay
[1313.7] Assigning disks to buses
[1313.7] Checking if the guest needs BIOS or UEFI to boot
[1313.7] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os p2v_data
[1315.1] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.3ULehZ/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[2166.4] Creating output metadata
[2191.2] Finishing off

3.After conversion,check if the guest has correctly installed qume-guest-agent and the service is running normally.
The package is installed and the guest has guest-agent channel,but the service is disabled. 
# rpm -q qemu-guest-agent
qemu-guest-agent-2.11.1-lp151.8.2.x86_64

# ls /dev/virtio-ports/
com.redhat.spice.0  org.qemu.guest_agent.0  ovirt-guest-agent.0

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

#  cat /usr/lib/udev/rules.d/80-qemu-ga.rules 
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service"

# systemctl status 'qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service'
● qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-ga@.service; disabled; vendor preset: disable>
   Active: inactive (dead)
     Docs: http://wiki.qemu.org/Features/GuestAgent

Jul 02 06:07:21 dhcp-66-145-89 systemd[1]: Started QEMU Guest Agent.
Jul 02 23:01:11 dhcp-66-145-89 systemd[1]: Stopping QEMU Guest Agent...
Jul 02 23:01:11 dhcp-66-145-89 systemd[1]: Stopped QEMU Guest Agent.

4.Login on rhvh and via libvirt check the guest info.
#virsh dumpxml esx6.7-opensuse15-x86_64 
<channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/8d70ef27-88d0-484e-bdcf-d0a2c9e5c3bf.ovirt-guest-agent.0'/>
      <target type='virtio' name='ovirt-guest-agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/8d70ef27-88d0-484e-bdcf-d0a2c9e5c3bf.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>

5.Update the qemu-guest-agent package on the guest and reboot the guest.
# rpm -q qemu-guest-agent 
qemu-guest-agent-2.11.2-lp150.7.22.1.x86_64

# systemctl status 'qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service'
● qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-ga@.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-07-02 23:20:03 EDT; 51s ago
     Docs: http://wiki.qemu.org/Features/GuestAgent
 Main PID: 661 (qemu-ga)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/system-qemu\x2dga.slice/qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service
           └─661 /usr/bin/qemu-ga -p /dev/virtio-ports/org.qemu.guest_agent.0

6.Login on rhvh and via libvirt check the guest info
#virsh dumpxml esx6.7-opensuse15-x86_64 
 <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/8d70ef27-88d0-484e-bdcf-d0a2c9e5c3bf.ovirt-guest-agent.0'/>
      <target type='virtio' name='ovirt-guest-agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/8d70ef27-88d0-484e-bdcf-d0a2c9e5c3bf.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>
# qemu-agent-command esx6.7-opensuse15-x86_64 '{"execute": "guest-info"}'
{"return":{"version":"2.11.2","supported_commands":[{"enabled":true,"name":"guest-sync-delimited","success-response":true}...

Actual results:
After updating the package to qemu-guest-agent-2.11.2-lp150.7.22.1.x86_64,the guest-agent service can auto boot and work normally.

Expected results:


Additional info:

Comment 1 Pino Toscano 2019-07-03 06:11:11 UTC
(In reply to liuzi from comment #0)
> 3.For 2,it's a suse system bug,pls refer to
> https://bugzilla.novell.com/show_bug.cgi?id=1106828 and
> https://bugzilla.novell.com/show_bug.cgi?id=1094898

And https://bugzilla.novell.com/show_bug.cgi?id=1105279 too.

Comment 2 Sandro Bonazzola 2019-07-08 14:08:32 UTC
I see latest qemu-guest-agent in Leap 15.1 is qemu-guest-agent-3.1.0-lp151.6.1.x86_64.rpm.
Can you please verify if this build is functional for you?
Here's the rpm's url: http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/qemu-guest-agent-3.1.0-lp151.6.1.x86_64.rpm

Comment 3 liuzi 2019-07-09 07:55:54 UTC
Test bug with qemu-guest-agent-3.1.0-lp151.6.1.x86_64.rpm.

Steps to test: 
1.Prepare a opensuse 15 guest without qemu-guest-agent on rhv
2.Install the qemu-guest-agent-3.1.0-lp151.6.1.x86_64.rpm on the guest 
3.Reboot the guest and  check the service qemu.ga status
# rpm -q qemu-guest-agent
qemu-guest-agent-3.1.0-lp151.6.1.x86_64

# systemctl status qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0.service ● qemu-ga@virtio\x2dports-org.qemu.guest_agent.0.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-ga@.service; disabled; vendor preset: disable>
   Active: active (running) since Tue 2019-07-09 02:57:39 EDT; 55min ago
     Docs: http://wiki.qemu.org/Features/GuestAgent
 Main PID: 668 (qemu-ga)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/system-qemu\x2dga.slice/qemu-ga@virtio\x2dports-org.qemu.guest_agent>
           └─668 /usr/bin/qemu-ga -p /dev/virtio-ports/org.qemu.guest_agent.0

Jul 09 02:57:39 linux-mffv systemd[1]: Started QEMU Guest Agent

Result:
For the package qemu-guest-agent-3.1.0-lp151.6.1.x86_64.rpm,the qemu-ga.service can auto start during the guest's first-boot.

Comment 4 Sandro Bonazzola 2019-07-09 10:01:42 UTC
Thanks for the verification, including qemu-guest-agent-3.1.0-lp151.6.1.x86_64.rpm in 4.4.

Comment 5 Petr Matyáš 2020-01-07 10:46:27 UTC
Verified on oVirt-toolsSetup-4.4-0.20190709153118.gitd30b479.el7.iso

Comment 6 Sandro Bonazzola 2020-05-20 20:03:37 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.