mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-16 09:04:55 +00:00
Fix connecting to console with specific listen address
This commit is contained in:
53
virt-manager-fix-listen-address.patch
Normal file
53
virt-manager-fix-listen-address.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
diff -rup virt-manager-0.9.1/src/virtManager/console.py foo/src/virtManager/console.py
|
||||
--- virt-manager-0.9.1/src/virtManager/console.py 2012-06-06 17:05:12.762334674 -0400
|
||||
+++ foo/src/virtManager/console.py 2012-06-06 17:04:59.383045040 -0400
|
||||
@@ -370,6 +370,7 @@ class VNCViewer(Viewer):
|
||||
ignore = user
|
||||
|
||||
if not socketpath:
|
||||
+ logging.debug("VNC connecting to %s:%s" % (host, port))
|
||||
self.display.open_host(host, port)
|
||||
return
|
||||
|
||||
@@ -485,7 +486,6 @@ class SpiceViewer(Viewer):
|
||||
ignore = socketpath
|
||||
|
||||
uri = "spice://"
|
||||
- uri += (user and str(user) or "")
|
||||
uri += str(host) + "?port=" + str(port)
|
||||
logging.debug("spice uri: %s", uri)
|
||||
|
||||
@@ -1084,7 +1084,7 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
|
||||
self.set_enable_accel()
|
||||
|
||||
- if transport in ("ssh", "ext"):
|
||||
+ if (transport in ("ssh", "ext")) and gaddr == "127.0.0.1":
|
||||
if self.tunnels:
|
||||
# Tunnel already open, no need to continue
|
||||
return
|
||||
@@ -1096,8 +1096,10 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
self.viewer.open_fd(fd)
|
||||
|
||||
else:
|
||||
- self.viewer.open_host(connhost, connuser,
|
||||
- str(gport), gsocket)
|
||||
+ host = gaddr
|
||||
+ if gaddr == "127.0.0.1" or gaddr == "0.0.0.0":
|
||||
+ host = connhost
|
||||
+ self.viewer.open_host(host, connuser, str(gport), gsocket)
|
||||
|
||||
except Exception, e:
|
||||
logging.exception("Error connection to graphical console")
|
||||
diff -rup virt-manager-0.9.1/src/virtManager/domain.py foo/src/virtManager/domain.py
|
||||
--- virt-manager-0.9.1/src/virtManager/domain.py 2012-01-29 15:40:49.000000000 -0500
|
||||
+++ foo/src/virtManager/domain.py 2012-06-06 17:04:59.384044912 -0400
|
||||
@@ -952,7 +952,7 @@ class vmmDomain(vmmLibvirtObject):
|
||||
if gport != None:
|
||||
gport = int(gport)
|
||||
gtype = gdev.type
|
||||
- gaddr = "127.0.0.1"
|
||||
+ gaddr = gdev.listen or "127.0.0.1"
|
||||
gsocket = gdev.socket
|
||||
|
||||
if connhost == None:
|
@@ -2,7 +2,7 @@
|
||||
|
||||
%define _package virt-manager
|
||||
%define _version 0.9.1
|
||||
%define _release 2
|
||||
%define _release 3
|
||||
%define virtinst_version 0.600.1
|
||||
|
||||
%define qemu_user "qemu"
|
||||
@@ -46,6 +46,8 @@ Patch4: %{name}-conn-hang-app.patch
|
||||
Patch5: %{name}-create-reshow.patch
|
||||
# Improve tooltip for 'force console shortcuts' (bz 788448)
|
||||
Patch6: %{name}-console-shortcut-explanation.patch
|
||||
# Fix connecting to console with specific listen address
|
||||
Patch7: %{name}-fix-listen-address.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -160,6 +162,7 @@ Common files used by the different Virtual Machine Manager interfaces.
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
%if %{qemu_user}
|
||||
@@ -277,6 +280,9 @@ update-desktop-database -q %{_datadir}/applications
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jun 06 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-3
|
||||
- Fix connecting to console with specific listen address
|
||||
|
||||
* Mon Feb 13 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-2
|
||||
- Fix error reporting for failed remote connections (bz 787011)
|
||||
- Fix setting window title when VNC mouse is grabbed (bz 788443)
|
||||
|
Reference in New Issue
Block a user