From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Hajnoczi Subject: Re: Using block device instead of character device for virtio-serial Date: Sun, 9 Feb 2014 10:12:24 +0100 Message-ID: <20140209091224.GB24892@stefanha-thinkpad.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Jobin Raju George Return-path: Received: from mail-wg0-f45.google.com ([74.125.82.45]:53467 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbaBIJM2 (ORCPT ); Sun, 9 Feb 2014 04:12:28 -0500 Received: by mail-wg0-f45.google.com with SMTP id n12so3407045wgh.12 for ; Sun, 09 Feb 2014 01:12:27 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 06, 2014 at 12:22:36PM +0530, Jobin Raju George wrote: > I am trying to establish a communication mechanism between the guest > and its host using virtio-serial. For this I am using the following to > boot the VM: > > qemu-system-x86_64 -m 1024 \ > -name ubuntu_vm \ > -hda ubuntu \ > -device virtio-serial \ > -chardev socket,path=/tmp/virt_socket,server,nowait,id=virt_socket \ > -device virtconsole,name=v_soc,chardev=virt_socket,name=ubuntu_vm_soc > > This creates a character device on the guest machine and a UNIX socket > on the host machine. > > 1) Is there a way I can create sockets on the host as well as the guest? The syntax is documented on the QEMU man page. Try: -chardev socket,port=1234,server,nowait,id=virt_socket > 2) Is there a way I can create a block device for communication? > > I required a block device since the data that is to be transferred is > huge and the frequency of the data transfer is quite high. Have you benchmarked virtio-serial or is this just a guess? Stefan