Bug 1967716
| Summary: | RFE: rebuild guest agent to include public ssh injection api support | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | David Vossel <dvossel> |
| Component: | qemu-kvm | Assignee: | Marc-Andre Lureau <marcandre.lureau> |
| qemu-kvm sub component: | Guest Agent | QA Contact: | dehanmeng <demeng> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | danken, demeng, fdeutsch, jinzhao, juzhang, mprivozn, virt-maint |
| Version: | 8.5 | Keywords: | FutureFeature, Triaged |
| Target Milestone: | beta | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-4.2.0-56.module+el8.5.0+12039+0434c559 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-11-09 18:01:39 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
David Vossel
2021-06-03 17:05:02 UTC
Looks like we need backports for RHEL 8.5.0 and then eventually a zstream for 8.4.0 backport patches ready to be submitted: https://gitlab.com/marcandre.lureau-rh/qemu-kvm/-/tree/rhbz-1967716 Quick q: How is the guest agent delivered these days on RHEL?Using an RPM or container? Changing to ASSIGNED since patches aren't posted downstream yet I believe Fabian's question was answered in the Virt/CNV meeting by Martin - essentially it was a RHV mechanism until RHCOS added guest agent. Once patches are posted to rhvirt-patches the DTM would need to be adjusted please qa ack sent "[RHEL-8.5.0 qemu-kvm PATCH 0/4] qga: public ssh injection api support" QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass. Verify with version qemu-kvm-4.2.0-56.module+el8.5.0+12039+0434c559
Steps to Verify:
1.Start guest with virtio serial and start guest agent inside the guest
2.Connect to the chardev socket in host side for sending following command to the guest:
# nc -U /tmp/qga.sock
{"execute":"guest-ping"}
{"return": {}}
3.Off the selinux permission in guest:
#setenforce 0
4.create a user in guest:
#useradd fedora
5.issue cmds in the unix socked,cmds like following items:
{"execute": "guest-ssh-add-authorized-keys", "arguments": { "username": "fedora", "keys": ["ssh-rsa aaa"]}}
{"return": {}}
$cat .ssh/authorized_keys
ssh-rsa aaa
{"execute":"guest-ssh-get-authorized-keys","arguments":{"username":"fedora" }}
{"return": {"keys": ["ssh-rsa aaa"]}}
{"execute": "guest-ssh-add-authorized-keys", "arguments": { "username": "fedora", "keys": [ "ssh-rsa aaa", "ssh-rsa bbb" ] } }
{"return": {}}
$cat .ssh/authorized_keys
ssh-rsa aaa
ssh-rsa bbb
{"execute": "guest-ssh-remove-authorized-keys", "arguments": { "username": "fedora", "keys": [ "ssh-rsa bbb", "ssh-rsa ccc" ] } }
{"return": {}}
$cat .ssh/authorized_keys
ssh-rsa aaa
{"execute":"guest-ssh-add-authorized-keys","arguments":{"username": "fedora", "keys": ["aaa"], "reset": true }}
{"return": {}}
$cat .ssh/authorized_keys
aaa
{"execute":"guest-ssh-get-authorized-keys","arguments":{"username":"fedora" }}
{"return": {"keys": ["aaa"]}}
Actual result:
Commands running well and no errors.
Expected result:
Commands running well and no errors.
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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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/RHSA-2021:4191 |