Re: tcp keepalives for network serial console

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

 



Id still love to see qemu and thus kvm support tcp keepalives as an
option for the serial telnet server.  However I think I have a half
decent work around.  I defined a new type of console connection in
conserver which first ssh's to the server then runs a telnet to
localhost.  This way ssh gives me a lot of extra options as far as
keepalives and session disconnect detection and then when it goes down
it locally tears down the shell/telnet very nicely.  So far I havn't had
any issues.   One key was to use -t with ssh so that ctrl chars and
local echo worked as expected.

I'm always interested in other ideas but that's what I ended up doing.
-denis

On Sat, May 19, 2018 at 10:29:38AM -0400, Denis Hainsworth wrote:
> As far as I can tell there is no way to enable tcp keepalives within kvm
> for its telnet server serial console config.   Just checking that this
> would be a feature request and not something I'm missing.  Or if folks
> have any thoughts on a workaround.
> 
> Currently when I set up linux vms in kvm I want serial console with
> logging.  For this I use the conserver package externally to connect to
> the kvm host telnet based virtual serial ports using something like this 
> ex. from proxmox    -serial tcp:0.0.0.0:2001,server,nowait
> 
> This works fantastic 99% of the time.  The only times it gets annoying
> is when my conserver application (telnet clients) goes down uncleanly
> leaving the telnet server connections in the ESTABLISHED state.  Then
> new telnet connections to say port 2001 on the host shows nothing.
> 
> So far to clear this each VM has to be stop/started to tear down the
> hung tcp sessions.  Historically this sort of thing is solved with tcp
> keepalive functionality on the server sockets.
> 
> I'm not missing some deep hidden config to enable tcp keepalives on the
> telnet server sockets right?
> 
> potential workarounds:
> 
> o run conserver locally on each host.  a good bit of extra work for each
> host.  serial console logging ends up on each host instead of one
> central conserver host.  not perfect but may be workable.
> 
> o look into netfilter conntrack setting on the host to tear down idle
> established sessions.  without  some form of keepalive will need to make
> sure the valid telnet sessons get re-established regularly which i think
> is possible with conserver but need to check.
> 
> -denis
> 
> -- 
> __________________________
> Denis Alan Hainsworth     
> denis.hainsworth@xxxxxxxxx

-- 
__________________________
Denis Alan Hainsworth     
denis.hainsworth@xxxxxxxxx



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux