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@xxxxxxxxx> 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@xxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html