Why is there a socket interface on the host and a character device interface on the guest for virtio-serial?How to find device in /devKVM: Which CPU features make VMs run better?Is it possible to pass /dev/urandom through from the host to a qemu/kvm guest?KVM/Qemu, Ubuntu: Why do more guests CPUs enhance Disk-I/O rapidly?qemu don't start quest with disk image on tmpfsKVM Windows 7 graphics performance using remote desktopGuest networking not working on Debian Jessie Host server KVM with br0 bridged networkCentOS Qemu+KVM lot of virtual machine processesCorrect virtio setup on Ubuntu 14.04 64-bit hostWin7 KVM guest with Virtio network driver can't connect to networkRestrict access to KVM virtual machines to specific users

In season 17 does LoN buff work against season journey set rewards?

Promotion comes with unexpected 24/7/365 on-call

God-Pharaoh's Statue and Finale Of Promise

labelled end points on logic diagram

Can a tourist shoot a gun in the USA?

What is the status of the Lannisters after Season 8 Episode 5, "The Bells"?

​Cuban​ ​Primes

How could it be that 80% of townspeople were farmers during the Edo period in Japan?

Assembly writer vs compiler

Capital gains on stocks sold to take initial investment off the table

Do people who work at research institutes consider themselves "academics"?

What metal is most suitable for a ladder submerged in an underground water tank?

Why is Drogon so much better in battle than Rhaegal and Viserion?

Is there an academic word that means "to split hairs over"?

How to handle professionally if colleagues has referred his relative and asking to take easy while taking interview

c++ conditional uni-directional iterator

Given 0s on Assignments with suspected and dismissed cheating?

What was Varys trying to do at the beginning of S08E05?

Can my Serbian girlfriend apply for a UK Standard Visitor visa and stay for the whole 6 months?

Polynomial division: Is this trick obvious?

Does this "yield your space to an ally" rule my 3.5 group uses appear anywhere in the official rules?

Is random forest for regression a 'true' regression?

How will the lack of ground stations affect navigation?

Windows 10 lock screen - display my own random images



Why is there a socket interface on the host and a character device interface on the guest for virtio-serial?


How to find device in /devKVM: Which CPU features make VMs run better?Is it possible to pass /dev/urandom through from the host to a qemu/kvm guest?KVM/Qemu, Ubuntu: Why do more guests CPUs enhance Disk-I/O rapidly?qemu don't start quest with disk image on tmpfsKVM Windows 7 graphics performance using remote desktopGuest networking not working on Debian Jessie Host server KVM with br0 bridged networkCentOS Qemu+KVM lot of virtual machine processesCorrect virtio setup on Ubuntu 14.04 64-bit hostWin7 KVM guest with Virtio network driver can't connect to networkRestrict access to KVM virtual machines to specific users






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








4















I am trying to establish a communication channel between the host and one of its guest virtual machine using kvm as a hypervisor. For this, I am using virtio-serial.



To create the virtual machine, I issued the following command:



qemu-system-x86_64 
-m 2048 -name ubuntu
-hda ubuntu_image
-device virtio-serial
-chardev socket,path=/tmp/foo,server,nowait,id=foo
-device virtconsole,name=jobsfoo,chardev=foo,name=org.ubuntu.foo


And then for communicating, on the guest, I use:



socat /dev/hvc0 -


And on the host:



socat /tmp/foo -


I come to understand that /tmp/foo is a socket and /dev/hvc0 a character device.



Why is there an symmetric interface for communication: a socket on the host and a character device on the guest?










share|improve this question






























    4















    I am trying to establish a communication channel between the host and one of its guest virtual machine using kvm as a hypervisor. For this, I am using virtio-serial.



    To create the virtual machine, I issued the following command:



    qemu-system-x86_64 
    -m 2048 -name ubuntu
    -hda ubuntu_image
    -device virtio-serial
    -chardev socket,path=/tmp/foo,server,nowait,id=foo
    -device virtconsole,name=jobsfoo,chardev=foo,name=org.ubuntu.foo


    And then for communicating, on the guest, I use:



    socat /dev/hvc0 -


    And on the host:



    socat /tmp/foo -


    I come to understand that /tmp/foo is a socket and /dev/hvc0 a character device.



    Why is there an symmetric interface for communication: a socket on the host and a character device on the guest?










    share|improve this question


























      4












      4








      4








      I am trying to establish a communication channel between the host and one of its guest virtual machine using kvm as a hypervisor. For this, I am using virtio-serial.



      To create the virtual machine, I issued the following command:



      qemu-system-x86_64 
      -m 2048 -name ubuntu
      -hda ubuntu_image
      -device virtio-serial
      -chardev socket,path=/tmp/foo,server,nowait,id=foo
      -device virtconsole,name=jobsfoo,chardev=foo,name=org.ubuntu.foo


      And then for communicating, on the guest, I use:



      socat /dev/hvc0 -


      And on the host:



      socat /tmp/foo -


      I come to understand that /tmp/foo is a socket and /dev/hvc0 a character device.



      Why is there an symmetric interface for communication: a socket on the host and a character device on the guest?










      share|improve this question
















      I am trying to establish a communication channel between the host and one of its guest virtual machine using kvm as a hypervisor. For this, I am using virtio-serial.



      To create the virtual machine, I issued the following command:



      qemu-system-x86_64 
      -m 2048 -name ubuntu
      -hda ubuntu_image
      -device virtio-serial
      -chardev socket,path=/tmp/foo,server,nowait,id=foo
      -device virtconsole,name=jobsfoo,chardev=foo,name=org.ubuntu.foo


      And then for communicating, on the guest, I use:



      socat /dev/hvc0 -


      And on the host:



      socat /tmp/foo -


      I come to understand that /tmp/foo is a socket and /dev/hvc0 a character device.



      Why is there an symmetric interface for communication: a socket on the host and a character device on the guest?







      kvm-virtualization socket virtio






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 4 '14 at 12:25







      jobin

















      asked Jan 31 '14 at 12:46









      jobinjobin

      153119




      153119




















          1 Answer
          1






          active

          oldest

          votes


















          0














          You have a character device on the guest because Unix and Unix-like operating systems represent serial ports as character devices, and have done so for about as long as Unix has been around, and you explicitly asked for a virtual serial port in the guest. The port is created by a kernel device driver, so it must be a character device special.



          You have a socket on the host because you explicitly asked for one. Presumably you want two-way communication from some program on the host to some program on the guest which understands serial ports. The other end of this socket is handled, of course, by the qemu process running the virtual machine. You could also have connected this to a pty to emulate a serial console, or to a plain file to just log everything coming out of the port.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "2"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f571281%2fwhy-is-there-a-socket-interface-on-the-host-and-a-character-device-interface-on%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You have a character device on the guest because Unix and Unix-like operating systems represent serial ports as character devices, and have done so for about as long as Unix has been around, and you explicitly asked for a virtual serial port in the guest. The port is created by a kernel device driver, so it must be a character device special.



            You have a socket on the host because you explicitly asked for one. Presumably you want two-way communication from some program on the host to some program on the guest which understands serial ports. The other end of this socket is handled, of course, by the qemu process running the virtual machine. You could also have connected this to a pty to emulate a serial console, or to a plain file to just log everything coming out of the port.






            share|improve this answer





























              0














              You have a character device on the guest because Unix and Unix-like operating systems represent serial ports as character devices, and have done so for about as long as Unix has been around, and you explicitly asked for a virtual serial port in the guest. The port is created by a kernel device driver, so it must be a character device special.



              You have a socket on the host because you explicitly asked for one. Presumably you want two-way communication from some program on the host to some program on the guest which understands serial ports. The other end of this socket is handled, of course, by the qemu process running the virtual machine. You could also have connected this to a pty to emulate a serial console, or to a plain file to just log everything coming out of the port.






              share|improve this answer



























                0












                0








                0







                You have a character device on the guest because Unix and Unix-like operating systems represent serial ports as character devices, and have done so for about as long as Unix has been around, and you explicitly asked for a virtual serial port in the guest. The port is created by a kernel device driver, so it must be a character device special.



                You have a socket on the host because you explicitly asked for one. Presumably you want two-way communication from some program on the host to some program on the guest which understands serial ports. The other end of this socket is handled, of course, by the qemu process running the virtual machine. You could also have connected this to a pty to emulate a serial console, or to a plain file to just log everything coming out of the port.






                share|improve this answer















                You have a character device on the guest because Unix and Unix-like operating systems represent serial ports as character devices, and have done so for about as long as Unix has been around, and you explicitly asked for a virtual serial port in the guest. The port is created by a kernel device driver, so it must be a character device special.



                You have a socket on the host because you explicitly asked for one. Presumably you want two-way communication from some program on the host to some program on the guest which understands serial ports. The other end of this socket is handled, of course, by the qemu process running the virtual machine. You could also have connected this to a pty to emulate a serial console, or to a plain file to just log everything coming out of the port.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 4 at 17:51

























                answered Feb 4 '14 at 14:29









                Michael HamptonMichael Hampton

                177k27322655




                177k27322655



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f571281%2fwhy-is-there-a-socket-interface-on-the-host-and-a-character-device-interface-on%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

                    Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

                    What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company