Project

General

Profile

Bug #5128

Libvirt console does not use compute resources hostname for connection

Added by Justin Sherrill over 7 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
VM management
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

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).

History

#2 Updated by Justin Sherrill over 7 years ago

  • Category set to VM management
  • Assignee set to Justin Sherrill

#3 Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.8.4

#4 Updated by Dominic Cleal over 7 years ago

  • Status changed from Ready For Testing to Assigned

#5 Updated by Dominic Cleal over 7 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Justin Sherrill)
  • Target version deleted (1.8.4)

#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.

Thoughts?

#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

Also available in: Atom PDF