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 1963701 - [Machines]cockpit-machine: vnc and spice listen address is hardcoded to 127.0.0.1, ignoring qemu.conf #See 1833829
Summary: [Machines]cockpit-machine: vnc and spice listen address is hardcoded to 127.0...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit-appstream
Version: 8.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: beta
: 8.5
Assignee: Martin Pitt
QA Contact: YunmingYang
URL:
Whiteboard:
Depends On: 1833829
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-23 14:54 UTC by Strahil Nikolov
Modified: 2021-11-09 21:23 UTC (History)
3 users (show)

Fixed In Version: cockpit-appstream-250-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 17:53:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4178 0 None None None 2021-11-09 17:53:55 UTC

Description Strahil Nikolov 2021-05-23 14:54:36 UTC
Description of problem:
When creating a VM via the cockpit interface, the listening address for external SPICE and VNC viewers will always be 127.0.0.1. Setting the default listen address in qemu.conf has no effect on this, because the 127.0.0.1 address is hardcoded in machines.min.js.gz . 

Version-Release number of selected component (if applicable):
cockpit-machines-238.2-1.el8.noarch

How reproducible:
Always

Steps to Reproduce:
1. Update vnc_listen and spice_listen to the IP of the system
2. Restart the relevant services or just reboot the machine
3. Reach cockpit interface
4. Create new VM
5. Select "Desktop Viewer"

Actual results:
The IP address in the Manual Connection section of the console is '127.0.0.1' .

Expected results:
The address in the Manual Connection settings and the VM definition xml should point to the one defined in qemu.conf

Additional info:
See bug 1833829 which was raised for Fedora.

Comment 1 Katerina Koukiou 2021-07-29 17:36:09 UTC
Upstream PR https://github.com/cockpit-project/cockpit-machines/pull/156

Comment 2 Martin Pitt 2021-07-30 08:39:46 UTC
Fixed upstream in https://github.com/cockpit-project/cockpit-machines/pull/156

@yunyang can you please QE-ack?

Comment 3 YunmingYang 2021-07-30 08:42:58 UTC
Sure

Comment 4 Martin Pitt 2021-08-04 08:49:40 UTC
Fixed in version 249. Pre-tested by check-machines-create which runs in gating.

Comment 7 YunmingYang 2021-08-15 18:13:00 UTC
Test Versions:
cockpit-machines-250-1.el8.noarch
cockpit-250-1.el8.x86_64
libvirt-dbus-1.3.0-2.module+el8.3.0+6423+e4cb6418.x86_64


Test Steps:
1 Modify /etc/libvirt/qemu.conf to add "spice_listen = "${host_IP}"", then save and restart libvirtd
2 Log in cockpit, and create a runnig VM
3 Go to the VM detail page
4 Switch console type to "Desktop viewer", check the information
5 Click "Launch remote viewer", then use the downloaded file by remote-viewer to connect the console
6 Modify /etc/libvirt/qemu.conf to add "spice_password = "${password}"", then save and restart libvirtd
7 Re-create a running VM, then go to the VM detail page and Switch console type to "Desktop viewer"
8 Check the information
9 Click "Launch remote viewer", then use the downloaded file by remote-viewer to connect the console
10 Remove "spice_listen = "${host_IP}"" and "spice_password = "${password}", and add "vnc_listen = "${host_IP}" to /etc/libvirt/qemu.conf, then restart libvirtd
11 Re-create a running VM, then go to the VM detail page and Switch console type to "Desktop viewer"
12 Check the information
13 Click "Launch remote viewer", then use the downloaded file by remote-viewer to connect the console
14 Add "VNC_password = "${password}" to /etc/libvirt/qemu.conf, then restart libvirtd
15 Re-create a running VM, then go to the VM detail page and Switch console type to "Desktop viewer"
16 Check the information
17 Click "Launch remote viewer", then use the downloaded file by remote-viewer to connect the console
18 Re-add "spice_listen = "${host_IP}"" and "spice_password = "${password}", then restart libvirtd
19 Re-create a running VM, then go to the VM detail page and Switch console type to "Desktop viewer"
20 Check the information
21 Click "Launch remote viewer", then use the downloaded file by remote-viewer to connect the console


Test Results:
1 In step 4, there are two address shown, spice is "${host_IP}", vnc is "127.0.0.1"
2 In step 5, remote-viewer can connect successfully 
3 In step 8, IP addresses is shown the same with step 4
4 In step 9, when connecting, there will be a dialog for inputting ${spice_password}, after inputting, connecting is successful
5 In step 12, vnc address is shown as "${host_IP}", spice address is "127.0.0.1"
6 In step 13, connecting is successful
7 In step 16, IP addresses is shown the same with step 12
8 In step 17, when connecting, there will be a dialog for inputting ${vnc_password}, after inputting, connecting is successful
9 In step 20, there is only "Address" shown as "${host_IP}"
10 In step 21, when connecting, there will be a dialog for inputting ${spice_password}, after inputting, connecting is successful

According to the results, move status to VERIFIED.

Comment 9 errata-xmlrpc 2021-11-09 17:53: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 (cockpit-appstream 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/RHBA-2021:4178


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