RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1101556 - [RFE] qemu-ga should have a config file
Summary: [RFE] qemu-ga should have a config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-guest-agent
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Depends On: 1297673
Blocks: 1100579 1110708 1191019
TreeView+ depends on / blocked
 
Reported: 2014-05-27 13:59 UTC by Ademar Reis
Modified: 2016-11-04 03:02 UTC (History)
19 users (show)

Fixed In Version: qemu-guest-agent-2.5.0-3.el7
Doc Type: Enhancement
Doc Text:
Clone Of: 1100579
Environment:
Last Closed: 2016-11-04 03:02:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2303 0 normal SHIPPED_LIVE qemu-guest-agent bug fix and enhancement update 2016-11-03 13:39:49 UTC

Description Ademar Reis 2014-05-27 13:59:29 UTC
+++ This bug was initially created as a clone of Bug #1100579 +++

Description of problem:
qemu-ga --help
...snip...
  -b, --blacklist   comma-separated list of RPCs to disable (no spaces, "?"
                    to list available RPCs)
qemu-ga -b?
guest-sync-delimited
guest-sync
guest-ping
guest-get-time
guest-set-time
guest-info
guest-shutdown
guest-file-open
guest-file-close
guest-file-read
guest-file-write
guest-file-seek
guest-file-flush
guest-fsfreeze-status
guest-fsfreeze-freeze
guest-fsfreeze-thaw
guest-fstrim
guest-suspend-disk
guest-suspend-ram
guest-suspend-hybrid
guest-network-get-interfaces
guest-get-vcpus
guest-set-vcpus

Because many blacklist values this is hell to put it directly on cmdline. qemu-ga should have feature to read a config file.

Version-Release number of selected component (if applicable):
qemu-guest-agent-0.12.1.2-2.415.el6_5.8.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from RHEL Product and Program Management on 2014-05-23 04:13:17 BRT ---

Since this bug report was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Jiri Belka on 2014-05-23 05:47:57 BRT ---

I meant real config file, not something like /etc/sysconfig/qemu-ga which would be sources into a RC script ;)

Comment 1 Marc-Andre Lureau 2015-07-01 13:48:44 UTC
sent patches:
https://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00139.html

Comment 2 Marc-Andre Lureau 2015-09-07 15:39:47 UTC
the patches have just been merged in upstream, delaying to rhel 7.3

Comment 3 Miroslav Rezanina 2016-04-18 09:27:19 UTC
Hi Marc,
do we want to have some default config file available in rhel 7.3? Or will we just go with supporting this feature?

Comment 4 Marc-Andre Lureau 2016-04-25 17:28:41 UTC
(In reply to Miroslav Rezanina from comment #3)
> Hi Marc,
> do we want to have some default config file available in rhel 7.3? Or will
> we just go with supporting this feature?

I don't think it's necessary, as qemu-ga rhel package ships with a sysconfig file. We would either have to break or duplicate this configuration and this could confuse users. Perhaps the next major rhel release could switch to the new configuration file and drop sysconfig file?

Comment 6 Xueqiang Wei 2016-07-05 10:09:26 UTC
Hi Marc,

I tested on kernel-3.10.0-422.el7.x86_64/qemu-guest-agent-2.5.0-2.el7.x86_64 as below steps:

Guest:
1. yum install qemu-gest-agent
2. systemctl stop qemu-guest-agent.service
3. cat >/etc/qemu/qemu-ga.conf <<EOF
[general]
blacklist=guest-info
4. qemu-ga

Host:
5: nc -U /home/chanel1
{"execute":"guest-info"}
6:
{"execute":"guest-ping"}
{"return": {}}

after step 5, the expected result:
{"error": {"class": "GenericError", "desc":
"The command guest-info has been disabled for this instance"}}

but the actual result: blacklist doesn't work
{"return": {"version": "2.5.0", "supported_commands": [{"enabled": true, "name": "guest-sync-delimited", "success-response": true}, {"enabled": true, "name": "guest-sync", "success-response": true}, {"enabled": true, "name": "guest-suspend-ram", "success-response": false}, {"enabled": true, "name": "guest-suspend-hybrid", "success-response": false}, {"enabled": true, "name": "guest-suspend-disk", "success-response": false}, {"enabled": true, "name": "guest-shutdown", "success-response": false}, {"enabled": true, "name": "guest-set-vcpus", "success-response": true}, {"enabled": true, "name": "guest-set-user-password", "success-response": true}, {"enabled": true, "name": "guest-set-time", "success-response": true}, {"enabled": true, "name": "guest-set-memory-blocks", "success-response": true}, {"enabled": true, "name": "guest-ping", "success-response": true}, {"enabled": true, "name": "guest-network-get-interfaces", "success-response": true}, {"enabled": true, "name": "guest-info", "success-response": true}, {"enabled": true, "name": "guest-get-vcpus", "success-response": true}, {"enabled": true, "name": "guest-get-time", "success-response": true}, {"enabled": true, "name": "guest-get-memory-blocks", "success-response": true}, {"enabled": true, "name": "guest-get-memory-block-info", "success-response": true}, {"enabled": true, "name": "guest-get-fsinfo", "success-response": true}, {"enabled": true, "name": "guest-fstrim", "success-response": true}, {"enabled": true, "name": "guest-fsfreeze-thaw", "success-response": true}, {"enabled": true, "name": "guest-fsfreeze-status", "success-response": true}, {"enabled": true, "name": "guest-fsfreeze-freeze-list", "success-response": true}, {"enabled": true, "name": "guest-fsfreeze-freeze", "success-response": true}, {"enabled": false, "name": "guest-file-write", "success-response": true}, {"enabled": false, "name": "guest-file-seek", "success-response": true}, {"enabled": false, "name": "guest-file-read", "success-response": true}, {"enabled": false, "name": "guest-file-open", "success-response": true}, {"enabled": false, "name": "guest-file-flush", "success-response": true}, {"enabled": false, "name": "guest-file-close", "success-response": true}, {"enabled": false, "name": "guest-exec-status", "success-response": true}, {"enabled": false, "name": "guest-exec", "success-response": true}]}}


I found this issue has fixed by commit e236d060cba8d2d6d26a7e076c895d2a6812dafb

And if the blacklist in /etc/sysconfig/qemu-ga, it works well.


I want to confirm with you:

1. if the test steps are ok?, if miss some steps, please tell me the correct steps
2. the config files /etc/sysconfig/qemu-ga and /etc/qemu/qemu-ga.conf are all in  use right? I fond if I start the qemu-guest-agent.service, /etc/sysconfig/qemu-ga will be used in the service.


Thank you very much.
Xueqiang

Comment 7 Marc-Andre Lureau 2016-07-05 10:27:55 UTC
(In reply to Xueqiang Wei from comment #6)

> 1. if the test steps are ok?, if miss some steps, please tell me the correct
> steps

The configuration location is wrong: /etc/qemu-ga/qemu-ga.conf

Comment 8 Xueqiang Wei 2016-07-05 12:16:08 UTC
(In reply to Marc-Andre Lureau from comment #7)
> (In reply to Xueqiang Wei from comment #6)
> 
> > 1. if the test steps are ok?, if miss some steps, please tell me the correct
> > steps
> 
> The configuration location is wrong: /etc/qemu-ga/qemu-ga.conf

Verified, the test result is passed. Thanks.

Comment 11 Miroslav Rezanina 2016-08-24 20:56:43 UTC
BZ moved to post due to missing documentation for the change. Adding missing man file will be handled with this BZ.

Comment 12 Marc-Andre Lureau 2016-08-30 16:03:29 UTC
to back the exception request:
this is very low risk, and easy to check

Comment 13 Miroslav Rezanina 2016-09-01 11:17:33 UTC
Fix included in qemu-guest-agent-2.5.0-3.el7

Comment 16 errata-xmlrpc 2016-11-04 03:02:43 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://rhn.redhat.com/errata/RHBA-2016-2303.html


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