[PATCH 0/5] Add API to allow TCP connection tunelling using virStreams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series adds ability for the qemu driver to tunnel connections to TCP
ports from the host. This is useful for enabling remote VNC/SPICE sessions
without the need to configure SSH tunnels or portforwards and without the
need to open the ports for public.

There's also an advantage for tools such as virt-viewer that have to guess the remote
connection parameters and you have to hope that nothing is in your way. With
spice/VNC clients that have support for read/write callbacks, this would allow also
direct connection without an intermediate socket.

The API and tunelling works but there's no (stable and good working) client for
this API. I hacked up a dirty netcat-like terminal into virsh for testing
purposes (see patch 5/5) but that isn't what I'd like to see.

The client should be able to open a listening socket and when a client connects
to it, it opens a stream and connects it to the remote host.

For the client there are two options:
1) do all the stuff in virsh: + one tool to rule them all
                              - i'd like to daemonize it and I don't know if that's okay in virsh

2) add a new tool "virtunnel": + less virsh pollution
                               - separate tool ...

I'd like to hear your opinion on this question.

(note: this is my personal effort, I'm annoyed of opening ssh tunnels to remote displays on my server
 and I don't want to open the ports to public. )

After this it would be great to add support for this to virt-viewer.

Peter Krempa (5):
  api: Add API to allow TCP tunneling through streams to the host
  fdstream: Add support for TCP connections of streams
  qemu: Add configuration options to enable TCP tunelling
  qemu: Implement virNodeTunnelTcp for the qemu driver
  NOT_TO_BE_APPLIED_UPSTREAM: quick and dirty virsh client to test the 
       stuff

 include/libvirt/libvirt.h.in | 11 +++++++
 src/driver.h                 |  8 +++++
 src/fdstream.c               | 73 ++++++++++++++++++++++++++++++++++++++++++++
 src/fdstream.h               |  5 +++
 src/libvirt.c                | 67 ++++++++++++++++++++++++++++++++++++++++
 src/libvirt_private.syms     |  1 +
 src/libvirt_public.syms      |  1 +
 src/qemu/qemu.conf           | 16 ++++++++++
 src/qemu/qemu_conf.c         | 26 ++++++++++++++++
 src/qemu/qemu_conf.h         | 13 ++++++++
 src/qemu/qemu_driver.c       | 45 +++++++++++++++++++++++++++
 src/remote/remote_driver.c   |  1 +
 src/remote/remote_protocol.x |  9 +++++-
 src/remote_protocol-structs  |  6 ++++
 src/rpc/gendispatch.pl       |  1 +
 tools/console.c              | 66 +++++++++++++++++++++------------------
 tools/console.h              | 11 +++----
 tools/virsh-domain.c         | 18 ++++++++---
 tools/virsh-host.c           | 60 ++++++++++++++++++++++++++++++++++++
 19 files changed, 396 insertions(+), 42 deletions(-)

-- 
1.8.0

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]