socat for serial connection between 2 VM's

gryffoer

New Member
Feb 22, 2023
2
0
1
Hello

I have a setup where we need to connect serial ports of 2 VM's with each other.
I have found a solution to add serial sockets to the 2 VM's and connect them via socat:

Code:
socat UNIX-CLIENT:/var/run/qemu-server/100.serial0 UNIX-CLIENT:/var/run/qemu-server/101.serial1

This has to be active all the time.

Does anyone know if it is possible to run this in the background when the two VM's have been booted?
Via a hookscript?

Thanks!

Tuur
 
Via a hookscript?
That is probably your best chance.
Maybe a systemd unit that is enabled & started by the hookscript could be useful to restart the connection should socat crash?
 
Hi aaron
Thanks, I will investigate this.

I have little to no experience in such, so any help would be useful and appreciated ;-)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!