Libvirt console does not use compute resources hostname for connection
Currently when you access the console of a libvirt guest, it uses the compute resource connection url to ask libvirt what its hostname is in order to open the console. It seems much more straightforward to use the hostname section of the compute resource URL. If for some reason the hostname of the libvirt host is not resolvable to the foreman server the console connection will fail even though foreman knows a perfectly resolvable hostname (the compute resource url).
#6 Updated by Markus Frosch about 5 years ago
I stumbled over the same problem. My case is that while the hypervisor is a public server, the libvirt and VNC is only available via VPN.
To change the connection IP I can just change the URI.
But the console always use the hostname.
I noticed that the virt-manager GUI tools seems always to use the connection host to get VNC. Maybe we should do that as well.
#7 Updated by Markus Frosch about 5 years ago
Correction: virt-manager connects via open_graphics_fd
This seems to differentiate where VNC is listening:
- localhost -> libvirt is forwarding it via SSH + nc to 127.0.0.1:5901
- all interfaces -> libvirt tries to connect via the same IP as the virtd connection