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;
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
add a comment |
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
add a comment |
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
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
kvm-virtualization socket virtio
edited Feb 4 '14 at 12:25
jobin
asked Jan 31 '14 at 12:46
jobinjobin
153119
153119
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited May 4 at 17:51
answered Feb 4 '14 at 14:29
Michael Hampton♦Michael Hampton
177k27322655
177k27322655
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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