I have a setup where qm terminal works just fine from the command line. I'd like to programmatically pass and retrieve data to this serial device. I thought a construct similar to this would work, but I get ioctl errors on it.
Error is:
Presumably socat is used here and it doesn't like how I'm passing commands. Manually entering "qm terminal <vmid>" works fine, as does the "show version" command. Is there a "known" way to do this, or otherwise pass and retrieve data to a VM's serial port?
Code:
qm terminal <vmid> <<EOF
show version
EOF
Error is:
DATE TIME socat[1391302] E tcgetattr(0, 0x63c03419c3c0): Inappropriate ioctl for device
Presumably socat is used here and it doesn't like how I'm passing commands. Manually entering "qm terminal <vmid>" works fine, as does the "show version" command. Is there a "known" way to do this, or otherwise pass and retrieve data to a VM's serial port?