Bug 1833829 - cockpit-machine: vnc and spice listen address is hardcoded to 127.0.0.1, ignoring qemu.conf
Summary: cockpit-machine: vnc and spice listen address is hardcoded to 127.0.0.1, igno...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cockpit-machines
Version: 34
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Simon Kobyda
QA Contact: YunmingYang
URL:
Whiteboard:
Depends On:
Blocks: 1963701
TreeView+ depends on / blocked
 
Reported: 2020-05-10 23:02 UTC by Shawn Cresante
Modified: 2021-09-14 05:15 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-09-14 05:15:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Shawn Cresante 2020-05-10 23:02:01 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 . 

machines.js should read get the qemu.conf configuration for vnc_listen and spice_listen if those are defined.


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

217-1


How reproducible:

100%


Steps to Reproduce:
1. Install cockpit, libvirtd, cockpit-machines, and all other relevant packages.
2. Modify /etc/libvirt/qemu.conf to define vnc_listen and spice_listen as = "0.0.0.0"
3. Create a VM via the web interface.

Actual results:
A VM is created and VNC & SPICE are bound and listening to 127.0.0.1

Expected results:
VNC & SPICE should be listening as per qemu.conf

Additional info:
It's clear that this is hardcoded in machine.js in GRAPHICS_PARAM. 
In the upstream repo this is defined in pkg/machines/scripts/create_machine.sh
I'm unsure if this bug should be filed against the upstream git.

Comment 1 Martin Pitt 2020-05-25 05:19:48 UTC
Confirmed. Unfortunately there is very sparse documentation about /etc/libvirt/qemu.conf -- No manpage at all, nothing on https://libvirt.org/drvqemu.html. https://insights-core.readthedocs.io/en/latest/shared_parsers_catalog/qemu_conf.html has a bit, and the upstream source does implement the parameter: https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_conf.c#L426

Spice will be obsoleted soon, but VNC will stay around -- so I see no harm in checking the config file for this value indeed.

Comment 2 marcopardo 2021-04-11 21:42:28 UTC
Hi, now after a year the same bug is still there.
This would be no problem if the cockpit VNC interface were any good. Sadly it isn't. The mouse is all over the place. When will this be fixed or is there a workaround to change the IP that is given to the vnc client. Also it there a way to give the vnc-clientfile a ending so windows can 'assing' the right software to it?

Comment 3 Fedora Program Management 2021-04-29 17:21:54 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Strahil Nikolov 2021-05-23 14:18:49 UTC
This bug is affecting RHEL 8.3

Comment 5 Strahil Nikolov 2021-05-23 14:45:51 UTC
I just updated and it's valid for RHEL 8.4

Comment 6 Katerina Koukiou 2021-06-25 11:19:29 UTC
There is a PR upstream: https://github.com/cockpit-project/cockpit-machines/pull/156

Comment 7 Strahil Nikolov 2021-09-14 04:37:24 UTC
In which version in EL8 the fix will be released ?

Comment 8 Martin Pitt 2021-09-14 05:15:47 UTC
Oops! We forgot to close this, this was already released in version 249. All supported Fedoras have 251 by now.

Strahil: The fix will be in RHEL 8.5. CentOS 8 stream already has it: https://centos.pkgs.org/8-stream/centos-appstream-x86_64/cockpit-machines-251-1.el8.noarch.rpm.html


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