Is there any way to add a serial port through the web interface?
Currently not, but should not be that hard to implement.
Is there any way to add a serial port through the web interface?
Never did get serial0: to work for that, it always said the serial port was invalid.
Just a a serial device first:
serial0: socket
args: -serial telnet:localhost:6123,server,nowait
serial0: telnet:localhost:6123,server,nowait
How is serial break signal accomplished with the "serial0: socket" route?
I am not a real expert concerning serial com ;-) So please can you test with 'serial0: socket' and tell me
what exactly does not work (with example to reproduce the problem)?
args: -serial telnet:localhost:6123,server,nowait
root@testhost:~# telnet localhost 6123
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
... booting up messages ...
Sat Aug 24 00:43:18 UTC 2013
FreeBSD/amd64 (testguest) (ttyu0)
login:
telnet> send break
KDB: enter: Break to debugger
[ thread pid 11 tid 100005 ]
Stopped at kdb_break+0x55: movq $0,kdb_why
db> c
FreeBSD/amd64 (testguest) (ttyu0)
login:
serial0: socket
root@testhost:~# qm terminal 123
starting serial terminal on interface serial0 (press control-O to exit)
... booting up messages ...
FreeBSD/amd64 (testguest) (ttyu0)
login:
That's mostly what I use it for, but I think some other OS's work the same. Also when not used in this fashion the signal info is available to user programs, so there are many other uses.
In the second example, there is no way to access the guest's kernel debugger because serial BRK cannot be sent from socat
That's outside my direct experience as we have no Linux VMs running under Proxmox.
<CTRL-C> does not work?
No, that is something completely different, CTRL-C is ASCII character code 3. Serial break is an out of band signal, representing holding the TX line to 0 for a whole frame. Hence it must be emulated.
And what about <CTRL-Z> (SIGTSTP)?
The same, ASCII character code 26. CTRL-anything is just a character.
Sure, but as this is a documented feature of the KVM telnet backend and not listed for the socket backend, my hopes are not high.
If you want to be fancy, "qm terminal 123" could look at the kvm 123.conf and dispatch socat or telnet based on what it finds there, but that is just for show; calling telnet directly works fine.
You can also set the telnet option on the socket, that is not the problem here.
telnet:host:port[,server][,nowait][,nodelay]The telnet protocol is used instead of raw tcp sockets. The options work the same as if you had specified "-serial tcp". The difference is that the port acts like a telnet server or client using telnet option negotiation. This will also allow you to send the MAGIC_SYSRQ sequence if you use a telnet that supports sending the break sequence. Typically in unix telnet you do it with Control-] and then type "send break" followed by pressing the enter key.unix:path[,server][,nowait]A unix domain socket is used instead of a tcp socket. The option works the same as if you had specified "-serial tcp" except the unix domain socket path is used for connections.
If you write a tcp port into the configuration, you need to manage port allocation cluster wide among all VM (VMs can migrate), so that is really not a trival task.
I guess it would be much easier to replace socat with a self written perl script which can send IAC (telnet) commands. Or maybe extend socat with that capability.