I have a server running multiple kvms. These are two to three vms so I consider libvirt somewhat oversized for management. And I'm completely comfortable with that setup. I actually just need the kvm monitoring console to send a 'system_powerdown' so that I can issue a system shutdown from the master host. I'm aware that I could (and currently do) use a pipe, unix sockets, udp, tcp, ... but the pty option seems most attractive to me.
I've spent several hours browsing the internet on this /dev/ptmx device and its association with the /dev/pts/X, but it looks like nobody has ever written something towards a solution.
So maybe somebody here has an idea how to find out the associated pseudo tty device that is automagically created upon kvm startup? (I know that it is printed to stdout on startup, but the vm might run several months and I simply want to determine that device from the kvm process.)
Has anybody ever done that? Has anybody a solution how to find that device?