On Mon, Oct 31, 2016 at 06:41:23AM +0000, Liu Pedroa wrote:
> Hi Everyone.
> 
> 
>   I  have a sample question. As the subset description.
> 
> 
> Guest OS : Ubuntu OS
> 
> QEMU :      linux kernel 4.8
> 
> 
> so i want the virtual client OS can communication( can send and receive 
> messages through serial device) with Guest OS. what should i do?

Add a chardev to your QEMU command-line (try -serial
unix:/tmp/test.sock,server,nowait).  Read the qemu(1) man page for
details on chardevs and all the options.

Inside the guest you need to access the serial port (e.g. /dev/ttyS0 on
Linux but make sure no login tty is running on that port).

On the host you can access the UNIX domain socket given on your QEMU
command-line.  That would be /tmp/test.sock in this example.

Also consider using virtio-serial instead of the traditional ISA serial
device.  It allows you to add/remove named (e.g. org.myproject.agent.0)
ports at run-time.  Search online to find example syntax.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to