[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Virtioconsole problem

From: Eviatar Khen
Subject: Re: [Qemu-discuss] Virtioconsole problem
Date: Sat, 20 Oct 2012 22:14:37 +0200

On 10/20/2012 06:52 PM, Dunrong Huang wrote:

2012/10/20 Eviatar Khen <address@hidden>:
Thanks a lot for your help!

I am not sure regarding the command line, as I took it from the page. The
intension was to open two consoles (hvc0 and hvc1), one for terminal and one
for remote gdb debug.
It is important to me to use the virtio-serial (multiport) as I need to
understand its mechanism.
If I understand correctly the right command is:

./x86_64-softmmu/qemu-system-x86_64 -no-acpi -m 500 fedora17.img -device
virtio-serial -chardev socket,path=/tmp/foo,server,nowait,id=foo -chardev
socket,path=/tmp/bar,server,nowait,id=bar -device
virtconsole,chardev=foo,name=org.fedoraproject.console.foo -device

That is not what I mean.
Actually, -chardev and -device you passed to QEMU are a combination, we can
call them backend and frontend:
1.) -chardev. Host can open the backend of chardev to communicate with
     the guest. e.g. if chardev backend is a socket, host app can open
it to communicate
     with guest. We can call it backend.

2.) -device. QEMU will expose a device to guest so guest can open it
for communication
     with host. The device's full path guset will see is depended on
device's name. In your case,
     guest will see a device, whose full path is
     We can call it frontend.

So, you create two virtio console devices for guest, but they have the
same name. This means
guest can only see a device on /dev/virtio-ports, is this what you really need?

Of course not, sorry, this is a type the second console name is: org.fedoraproject.console.bar
What is important to me is that a virtio console device was created (and not some other driver infra like some sort of emulation), and it sees to work.  I succeeded to log into hvc0. It does have a problem with echo, but I think that may be a bug with the hvc driver.

Thanks again for the great help.

Does "virtconsole" opens virtio device?

See above, it is guest's responsibilities for opening the device. QEMU
just expose virtio
device to guest.
Thanks again for this great help.


On 10/20/2012 01:15 PM, Dunrong Huang wrote:
2012/10/20 Eviatar Khen <address@hidden>:
Hello all,
On a linux machine I'm preforming the following command (with a binary
compiled from latest release):

./x86_64-softmmu/qemu-system-x86_64 -no-acpi -m 500 fedora17.img -device
virtio-serial -chardev socket,path=/tmp/foo,server,nowait,id=foo -chardev
socket,path=/tmp/bar,server,nowait,id=bar -device
virtioconsole,chardev=foo,name=org.fedoraproject.console.foo -device
Why did you use same name for different virtconsole name?
And I'm getting the following error:
qemu-system-x86_64: -device
virtioconsole,chardev=foo,name=org.fedoraproject.console.foo: Parameter
'driver' expects device type

virtioconsole has been deprecated, please use -device virtconsole or
-device virtio-serial
I'm new to qemu, could someone help me with this.
What am I doing wrong? What this error means? I took the line from:

The wiki is too old, it should be updated based on new QEMU code.
Thank you and best regards,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]