[libvirt] [virt-manager] PATCH: Support nonstandard ssh-port for tunnels

2008-05-18 Thread ClaesBas
If you have ssh moved/hidden somewhere else then port 22 this patch
makes it possible to open the vnc/console.
I have to add the entry from commandline like this:
virt-manager -c qemu+ssh://[EMAIL PROTECTED]:2/system
If ssh is running on port 2.

I've also submitet this on bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=447070

Regards
Claes

--- a/src/virtManager/details.pyTue May 13 15:59:25 2008 -0400
+++ b/src/virtManager/details.pySun May 18 23:07:37 2008 +0200
@@ -975,7 +975,11 @@ class vmmDetails(gobject.GObject):
 os.close(1)
 os.dup(fds[1].fileno())
 os.dup(fds[1].fileno())
-argv = [ssh, ssh, -p, 22]
+if not server.count(:):
+sshport = 22
+else:
+(server, sshport) = server.split(:)
+argv = [ssh, ssh, -p, sshport]
 if username:
 argv += ['-l', username]
 argv += [ server, nc, vncaddr, str(vncport) ]

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [virt-manager] PATCH: Support nonstandard ssh-port fortunnels

2008-05-18 Thread Atsushi SAKAI
Hi Claes

It should be posted on virt-manager mailing list.
et-mgmt-tools at redhat.com

Thanks
Atsushi SAKAI


ClaesBas [EMAIL PROTECTED] wrote:

 If you have ssh moved/hidden somewhere else then port 22 this patch
 makes it possible to open the vnc/console.
 I have to add the entry from commandline like this:
 virt-manager -c qemu+ssh://[EMAIL PROTECTED]:2/system
 If ssh is running on port 2.
 
 I've also submitet this on bugzilla:
 https://bugzilla.redhat.com/show_bug.cgi?id=447070
 
 Regards
 Claes
 
 --- a/src/virtManager/details.pyTue May 13 15:59:25 2008 -0400
 +++ b/src/virtManager/details.pySun May 18 23:07:37 2008 +0200
 @@ -975,7 +975,11 @@ class vmmDetails(gobject.GObject):
  os.close(1)
  os.dup(fds[1].fileno())
  os.dup(fds[1].fileno())
 -argv = [ssh, ssh, -p, 22]
 +if not server.count(:):
 +sshport = 22
 +else:
 +(server, sshport) = server.split(:)
 +argv = [ssh, ssh, -p, sshport]
  if username:
  argv += ['-l', username]
  argv += [ server, nc, vncaddr, str(vncport) ]
 
 --
 Libvir-list mailing list
 Libvir-list@redhat.com
 https://www.redhat.com/mailman/listinfo/libvir-list


--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list