From: Stefan Hajnoczi <stefanha@gmail.com>
To: Liu Pedroa <pedroa.liu@outlook.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] A question about virtual machine communication with Guest through serial device
Date: Fri, 4 Nov 2016 13:12:16 +0000 [thread overview]
Message-ID: <20161104131216.GA7120@stefanha-x1.localdomain> (raw)
In-Reply-To: <SG2PR02MB146972E6B4F015B5A543CA2A8FAE0@SG2PR02MB1469.apcprd02.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2016-11-04 13:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 6:41 [Qemu-devel] A question about virtual machine communication with Guest through serial device Liu Pedroa
2016-11-04 13:12 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161104131216.GA7120@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=pedroa.liu@outlook.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).