2

This might be really simple, but perusing documentation and forum posts, I'm not understanding how to do it...

Running (for example) a Linux system in QEMU, running on top of a MacOS machine.

Would like to have a program on the Mac pumping out serial data, and have that received on a serial port in the QEMU Linux system.

How could this be set up?

2
  • Would a pty also work? It's basically like serial device with one end on the host, and the other end in qemu. If not, please edit the question and explain why it has to be a serial device, and what aspects of a serial device you need.
    – dirkt
    Aug 31, 2021 at 17:35
  • I think that might work. I am trying to understand how to do this from the documentation, but am finding it unusually cryptic. Do you know of any examples of how to set this up, using a pty?
    – TJR
    Aug 31, 2021 at 18:58

1 Answer 1

1

You can use a pseudo-terminal (pty) instead. This will show up both in the host and the guest as a "file" that has very very similar behaviour to the "file" that would show up for a serial port.

Just run qemu with the option -serial pty, and you should see a message like

char device redirected to /dev/pts/1

which will tell you which pty to use.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .