From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2eIE-0006tX-BX for qemu-devel@nongnu.org; Fri, 04 Nov 2016 09:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2eI9-0000Cx-AX for qemu-devel@nongnu.org; Fri, 04 Nov 2016 09:12:26 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:35290) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2eI9-0000Bl-24 for qemu-devel@nongnu.org; Fri, 04 Nov 2016 09:12:21 -0400 Received: by mail-wm0-x243.google.com with SMTP id 68so3873867wmz.2 for ; Fri, 04 Nov 2016 06:12:21 -0700 (PDT) Date: Fri, 4 Nov 2016 13:12:16 +0000 From: Stefan Hajnoczi Message-ID: <20161104131216.GA7120@stefanha-x1.localdomain> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] A question about virtual machine communication with Guest through serial device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Pedroa Cc: "qemu-devel@nongnu.org" --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 31, 2016 at 06:41:23AM +0000, Liu Pedroa wrote: > Hi Everyone. >=20 >=20 > I have a sample question. As the subset description. >=20 >=20 > Guest OS : Ubuntu OS >=20 > QEMU : linux kernel 4.8 >=20 >=20 > so i want the virtual client OS can communication( can send and receive m= essages 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 --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYHIkwAAoJEJykq7OBq3PIvdwIAI2O6R5yvvxz9oSjJnUPC7uA va8PXiwsJMhKeDXWozGv+ABlqQjehHFcqB+7rsu0VJrc/6IdN11R3RnEQaIRxlfr AL2qm/sKNHMap8XKO8Z/HI1Uhq77QE+bruPmA5xnxgesNll9daOnaWIeBtxE8nNO HGtUVUs75Zi434HbMqUhSoThshri7DDl0vg4QOKGNtGsjVgw7ByL2Ur3KY4+Jblo s0mcvRMXleXipr4EHYCByFJypTQC1xhkKakKZ/MT9d+5mMnhT7cWF2oD288vLTpX wiqnt9QE3X1kfGBMh/9QFVS6f2k5mzxyZEH2BDMkGW7BTRxp0aHH3eIrOa+LSB0= =4oRW -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--