Bug 460358

Summary: Unable to connect to remote guest through an ssh tunnel over an existing ssh tunnel
Product: [Fedora] Fedora Reporter: Luke Macken <lmacken>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: abo, crobinso, hbrock, pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-21 08:27:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
virt-manager-tunnel-vnc-through-ssh-through-ssh-tunnel.patch
none
virt-manager-tunnel-vnc-through-ssh-through-ssh-tunnel.patch none

Description Luke Macken 2008-08-27 19:15:06 UTC
Created attachment 315130 [details]
virt-manager-tunnel-vnc-through-ssh-through-ssh-tunnel.patch

Description of problem:
I want to connect to a kvm guest through an ssh tunnel running on a machine that I have an existing ssh tunnel to (e.g. localhost:8001).  The F-9 virt-manager allows me to connect to this remote machine and view the guests, but will not let me open any of their displays via VNC.

Attached is a patch that seems to resolve this issue.

Version-Release number of selected component (if applicable):
virt-manager-0.5.4-4.fc9.x86_64

Steps to Reproduce:
1. Create an ssh tunnel to a remote machine (ssh -L 8001:foo.com:22 bar.com)
2. Use virt-manager to open a 'Remote tunnel over SSH' connection to 'localhost:8001'
3. Try and open the display for a guest
  
Actual results:
"TCP/IP error: VNC connection to hypervisor host got refused or disconnected!"

Expected results:
VNC display of remote guest should appear.

Comment 1 Luke Macken 2008-08-27 19:19:27 UTC
Created attachment 315132 [details]
virt-manager-tunnel-vnc-through-ssh-through-ssh-tunnel.patch

Comment 2 Luke Macken 2008-08-28 21:13:59 UTC
I also should note that I have only tested this patch with the specified tunnel-through-tunnel scenario -- not any of the average use cases.

Comment 3 Cole Robinson 2008-09-08 15:54:45 UTC
Thanks for the patch! Semi-unfortunately though I think this is fixed upstream:

http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=57ff06da8a73
http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=63e36ef8d4df

If you want to test the current upstream, repo is:

http://hg.et.redhat.com/virt/applications/virt-manager--devel

For now I'll move this to POST.

Comment 4 Luke Macken 2008-11-13 05:38:07 UTC
So it looks like virt-manager-0.6.0-3.fc10.x86_64 has this capability now, but seems to be so slow that it causes the main window to even grind to a halt as well.  When connecting to my office machine over an ssh tunnel, with no other local VMs running, the virt-viewer has a 5-10 second lag to even open it's top menu.  Bandwidth latency could be part of the problem, but I still experienced this lag even when in the office.

Comment 5 Alexander Boström 2008-11-23 21:35:04 UTC
(In reply to comment #0)

> 1. Create an ssh tunnel to a remote machine (ssh -L 8001:foo.com:22 bar.com)
> 2. Use virt-manager to open a 'Remote tunnel over SSH' connection to
> 'localhost:8001'

How about...

In /etc/ssh/ssh_config or ~/.ssh/config put:

Host foo.com
        ProxyCommand ssh bar.com nc %h %p

Then "ssh foo.com nc -U /var/run/libvirt/libvirt-sock" and "ssh foo.com nc 127.0.0.1 59xx" should just work.

Comment 6 Fedora Update System 2008-12-01 18:10:38 UTC
virt-manager-0.6.0-0.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-0.fc9

Comment 7 Fedora Update System 2008-12-01 18:23:05 UTC
virt-manager-0.6.0-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-1.fc9

Comment 8 Cole Robinson 2008-12-01 18:34:25 UTC
Argh, sorry, forgot that there were more comments in this bug.

Luke, I guess if you think this is a virt-manager related issue, please file a separate bug.

Comment 9 Fedora Update System 2008-12-03 01:29:56 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-10705

Comment 10 Fedora Update System 2008-12-21 08:27:01 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.