* Using block device instead of character device for virtio-serial @ 2014-02-06 6:52 Jobin Raju George 2014-02-09 9:12 ` Stefan Hajnoczi 0 siblings, 1 reply; 6+ messages in thread From: Jobin Raju George @ 2014-02-06 6:52 UTC (permalink / raw) To: kvm 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? 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. Thanks in advance! -- Thanks and regards, Jobin Raju George Final Year, Information Technology College of Engineering Pune Alternate e-mail: georgejr10.it@coep.ac.in ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using block device instead of character device for virtio-serial 2014-02-06 6:52 Using block device instead of character device for virtio-serial Jobin Raju George @ 2014-02-09 9:12 ` Stefan Hajnoczi [not found] ` <CA+aVsWrLj4w_X2nZvJgRz9w-y4UG90g1L-shLZ1jOfjiJLPypA@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Stefan Hajnoczi @ 2014-02-09 9:12 UTC (permalink / raw) To: Jobin Raju George; +Cc: kvm 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CA+aVsWrLj4w_X2nZvJgRz9w-y4UG90g1L-shLZ1jOfjiJLPypA@mail.gmail.com>]
* Fwd: Using block device instead of character device for virtio-serial [not found] ` <CA+aVsWrLj4w_X2nZvJgRz9w-y4UG90g1L-shLZ1jOfjiJLPypA@mail.gmail.com> @ 2014-02-09 18:12 ` Jobin Raju George 2014-02-14 10:35 ` Stefan Hajnoczi 1 sibling, 0 replies; 6+ messages in thread From: Jobin Raju George @ 2014-02-09 18:12 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: kvm ---------- Forwarded message ---------- From: Jobin Raju George <jobin.rv@gmail.com> Date: Sun, Feb 9, 2014 at 11:39 PM Subject: Re: Using block device instead of character device for virtio-serial To: Stefan Hajnoczi <stefanha@gmail.com> Cc: kvm@vger.kernel.org On Sun, Feb 9, 2014 at 2:42 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > > 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 I did not try this out, but would this create a "socket" instead of a character device(/dev/hvc0) on the guest? > > > > 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? I have not benchmarked virtio-serial but it seems to be intuitive that a block device would perform data transfer at a faster rate than a character device. I may be wrong, would be happy to be corrected. And yes, I would like to know how can I benchmark virtio-serial using a character device vs a TCP/IP socket data transfer vs virtio-serial using a block device. > > > Stefan -- Thanks and regards, Jobin Raju George Final Year, Information Technology College of Engineering Pune Alternate e-mail: georgejr10.it@coep.ac.in -- Thanks and regards, Jobin Raju George Final Year, Information Technology College of Engineering Pune Alternate e-mail: georgejr10.it@coep.ac.in ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using block device instead of character device for virtio-serial [not found] ` <CA+aVsWrLj4w_X2nZvJgRz9w-y4UG90g1L-shLZ1jOfjiJLPypA@mail.gmail.com> 2014-02-09 18:12 ` Fwd: " Jobin Raju George @ 2014-02-14 10:35 ` Stefan Hajnoczi 2014-02-15 5:00 ` Jobin Raju George 1 sibling, 1 reply; 6+ messages in thread From: Stefan Hajnoczi @ 2014-02-14 10:35 UTC (permalink / raw) To: Jobin Raju George; +Cc: kvm On Sun, Feb 09, 2014 at 11:39:19PM +0530, Jobin Raju George wrote: > On Sun, Feb 9, 2014 at 2:42 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > > > 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 > > > > I did not try this out, but would this create a "socket" instead of a > character device(/dev/hvc0) on the guest? Things should be unchanged inside the guest. This just creates a TCP socket on the host. > > > > > 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? > > > > I have not benchmarked virtio-serial but it seems to be intuitive that a > block device would perform data transfer at a faster rate than a character > device. I may be wrong, would be happy to be corrected. And yes, I would > like to know how can I benchmark virtio-serial using a character device vs > a TCP/IP socket data transfer vs virtio-serial using a block device. Write a program that transfers data and measures the speed :-). ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using block device instead of character device for virtio-serial 2014-02-14 10:35 ` Stefan Hajnoczi @ 2014-02-15 5:00 ` Jobin Raju George 2014-02-17 8:25 ` Stefan Hajnoczi 0 siblings, 1 reply; 6+ messages in thread From: Jobin Raju George @ 2014-02-15 5:00 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: kvm On Fri, Feb 14, 2014 at 4:05 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > > On Sun, Feb 09, 2014 at 11:39:19PM +0530, Jobin Raju George wrote: > > On Sun, Feb 9, 2014 at 2:42 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > > > > > 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 > > > > > > > I did not try this out, but would this create a "socket" instead of a > > character device(/dev/hvc0) on the guest? > > Things should be unchanged inside the guest. This just creates a TCP > socket on the host. My main concern is creating a socket in the guest. > > > > > > > > 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? > > > > > > > I have not benchmarked virtio-serial but it seems to be intuitive that a > > block device would perform data transfer at a faster rate than a character > > device. I may be wrong, would be happy to be corrected. And yes, I would > > like to know how can I benchmark virtio-serial using a character device vs > > a TCP/IP socket data transfer vs virtio-serial using a block device. > > Write a program that transfers data and measures the speed :-). It seems like netperf: www.netperf.org/netperf/training/Netperf.html is pretty useful for this purpose. -- Thanks and regards, Jobin Raju George Final Year, Information Technology College of Engineering Pune Alternate e-mail: georgejr10.it@coep.ac.in ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Using block device instead of character device for virtio-serial 2014-02-15 5:00 ` Jobin Raju George @ 2014-02-17 8:25 ` Stefan Hajnoczi 0 siblings, 0 replies; 6+ messages in thread From: Stefan Hajnoczi @ 2014-02-17 8:25 UTC (permalink / raw) To: Jobin Raju George; +Cc: kvm, Amit Shah On Sat, Feb 15, 2014 at 10:30:13AM +0530, Jobin Raju George wrote: > On Fri, Feb 14, 2014 at 4:05 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > > > > On Sun, Feb 09, 2014 at 11:39:19PM +0530, Jobin Raju George wrote: > > > On Sun, Feb 9, 2014 at 2:42 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > > > > > > > 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 > > > > > > > > > > I did not try this out, but would this create a "socket" instead of a > > > character device(/dev/hvc0) on the guest? > > > > Things should be unchanged inside the guest. This just creates a TCP > > socket on the host. > My main concern is creating a socket in the guest. The virtio-serial Linux guest driver is a character device, not a socket. So if a socket is really necessary you'd need a small program to forward data between a socket and the character device (like netcat/socat). Stefan ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-17 8:25 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-02-06 6:52 Using block device instead of character device for virtio-serial Jobin Raju George 2014-02-09 9:12 ` Stefan Hajnoczi [not found] ` <CA+aVsWrLj4w_X2nZvJgRz9w-y4UG90g1L-shLZ1jOfjiJLPypA@mail.gmail.com> 2014-02-09 18:12 ` Fwd: " Jobin Raju George 2014-02-14 10:35 ` Stefan Hajnoczi 2014-02-15 5:00 ` Jobin Raju George 2014-02-17 8:25 ` Stefan Hajnoczi
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.