All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] unable to access the serial port on the Vm
@ 2011-09-08 17:12 bala suru
  2011-09-09 18:00 ` Stefan Hajnoczi
  0 siblings, 1 reply; 11+ messages in thread
From: bala suru @ 2011-09-08 17:12 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

Hi,
I'm running one VM on the Qemu hypervisor.
I'm tried too access the /dev/ttyS0 from the VM, but I cant access that ,.
it shows input out error .

i.e when I do $cat /dev/ttyS0 -> it gives  input output  error .
what may be the problem .. pls help

[-- Attachment #2: Type: text/html, Size: 289 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-08 17:12 [Qemu-devel] unable to access the serial port on the Vm bala suru
@ 2011-09-09 18:00 ` Stefan Hajnoczi
       [not found]   ` <CAOYyr-sgbRtpBYsWUUwZufzniTxqV3nJkLQyR=RMOR53+4gDtA@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2011-09-09 18:00 UTC (permalink / raw)
  To: bala suru; +Cc: qemu-devel

On Thu, Sep 08, 2011 at 10:12:06AM -0700, bala suru wrote:
> Hi,
> I'm running one VM on the Qemu hypervisor.
> I'm tried too access the /dev/ttyS0 from the VM, but I cant access that ,.
> it shows input out error .
> 
> i.e when I do $cat /dev/ttyS0 -> it gives  input output  error .
> what may be the problem .. pls help

Please send your QEMU command-line.

Stefan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
       [not found]   ` <CAOYyr-sgbRtpBYsWUUwZufzniTxqV3nJkLQyR=RMOR53+4gDtA@mail.gmail.com>
@ 2011-09-11 15:26     ` Stefan Hajnoczi
       [not found]       ` <CAOYyr-vK987n_=7uzKkacS5pyQE88CUZvNK9WpNVO+DRvVtZkA@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2011-09-11 15:26 UTC (permalink / raw)
  To: bala suru; +Cc: qemu-devel

On Sun, Sep 11, 2011 at 4:17 PM, bala suru <balaqemu@gmail.com> wrote:
> Hi,
> I'm not checking through the Qenu command line . I'm checking from the VM
> itself .
>
> How to check for the  Qemu Command ..?

Please keep qemu-devel@nongnu.org CCed so others can contribute to the
discussion.

With "QEMU command-line" I meant running "ps aux | grep qemu" on the
host to check what command-line the qemu or qemu-kvm program has been
invoked with.  This will include the -serial or -chardev options which
controls how the emulated serial port is made available on the host.

Normally the emulated serial port can be redirected to your current
terminal by launching qemu with "-serial stdio".

Stefan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
       [not found]         ` <CAJSP0QVqagWuE3jF39bJBXp5LHZs+CKmQ-NpQ5QTiARH9FVcSQ@mail.gmail.com>
@ 2011-09-12  9:26           ` Stefan Hajnoczi
  2011-09-12 10:19             ` bala suru
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2011-09-12  9:26 UTC (permalink / raw)
  To: bala suru; +Cc: qemu-devel

I sent before noticing that your email dropped qemu-devel@nongnu.org
from the CC list again.

Please use Reply-All when responding on mailing lists.  That way the
mailing list stays CCed and others can contribute to the discussion.

On Mon, Sep 12, 2011 at 10:25 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Mon, Sep 12, 2011 at 10:08 AM, bala suru <balaqemu@gmail.com> wrote:
>> This is what I got when I run the  "ps aux | grep qemu"
>> root      4748  3.1  0.6 122208 25032 ?        Sl   11:52   5:13
>> /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 64 -smp 1 -name one-26 -uuid
>> 16025c13-421f-143c-563b-07661fa59fe3 -nographic -chardev
>> socket,id=monitor,path=/var/lib/libvirt/qemu/one-26.monitor,server,nowait
>> -monitor chardev:monitor -no-acpi -boot c -drive
>> file=/srv/cloud/one/var//26/images/disk.0,if=ide,index=0,boot=on,format=raw
>> -net nic,macaddr=02:00:c0:a8:7a:07,vlan=0,name=nic.0 -net
>> tap,fd=29,vlan=0,name=tap.0 -serial none -parallel none -usb
>> oneadmin  8137  0.0  0.0   3324   788 pts/1    S+   14:36   0:00 grep qemu
>>
>> Still I have not understood that  "Normally the emulated serial port can be
>> redirected to your current
>> terminal by launching qemu with "-serial stdio" How to make this through
>> qemu .
>
> Thanks for posting the ps output.  The reason why your serial is not
> working is because libvirt is starting QEMU with "-serial none".  That
> means your virtual machine does not have an emulated serial port.
>
> You can fix this from virt-manager by editing the virtual machine
> Details | Add Hardware | Serial and setting Device Type to Pseudo TTY
> (pty).  Then it should be possible to view the serial console while
> the VM is running.
>
> If you want to use virsh instead of virt-manager, check for the domain
> XML syntax here:
> http://libvirt.org/formatdomain.html#elementsConsole
>
> Stefan
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-12  9:26           ` Stefan Hajnoczi
@ 2011-09-12 10:19             ` bala suru
  2011-09-12 10:54               ` Stefan Hajnoczi
  0 siblings, 1 reply; 11+ messages in thread
From: bala suru @ 2011-09-12 10:19 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]

Hi,
Sorry for missing out the CC in the previous mail .

Can I do this on the running VMs ..?,
I'm using opennebula to spawn the VMs, so it would be good if edit before
spawning the VMs..

regards
Bala

On Mon, Sep 12, 2011 at 2:56 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:

> I sent before noticing that your email dropped qemu-devel@nongnu.org
> from the CC list again.
>
> Please use Reply-All when responding on mailing lists.  That way the
> mailing list stays CCed and others can contribute to the discussion.
>
> On Mon, Sep 12, 2011 at 10:25 AM, Stefan Hajnoczi <stefanha@gmail.com>
> wrote:
> > On Mon, Sep 12, 2011 at 10:08 AM, bala suru <balaqemu@gmail.com> wrote:
> >> This is what I got when I run the  "ps aux | grep qemu"
> >> root      4748  3.1  0.6 122208 25032 ?        Sl   11:52   5:13
> >> /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 64 -smp 1 -name one-26 -uuid
> >> 16025c13-421f-143c-563b-07661fa59fe3 -nographic -chardev
> >>
> socket,id=monitor,path=/var/lib/libvirt/qemu/one-26.monitor,server,nowait
> >> -monitor chardev:monitor -no-acpi -boot c -drive
> >>
> file=/srv/cloud/one/var//26/images/disk.0,if=ide,index=0,boot=on,format=raw
> >> -net nic,macaddr=02:00:c0:a8:7a:07,vlan=0,name=nic.0 -net
> >> tap,fd=29,vlan=0,name=tap.0 -serial none -parallel none -usb
> >> oneadmin  8137  0.0  0.0   3324   788 pts/1    S+   14:36   0:00 grep
> qemu
> >>
> >> Still I have not understood that  "Normally the emulated serial port can
> be
> >> redirected to your current
> >> terminal by launching qemu with "-serial stdio" How to make this through
> >> qemu .
> >
> > Thanks for posting the ps output.  The reason why your serial is not
> > working is because libvirt is starting QEMU with "-serial none".  That
> > means your virtual machine does not have an emulated serial port.
> >
> > You can fix this from virt-manager by editing the virtual machine
> > Details | Add Hardware | Serial and setting Device Type to Pseudo TTY
> > (pty).  Then it should be possible to view the serial console while
> > the VM is running.
> >
> > If you want to use virsh instead of virt-manager, check for the domain
> > XML syntax here:
> > http://libvirt.org/formatdomain.html#elementsConsole
> >
> > Stefan
> >
>

[-- Attachment #2: Type: text/html, Size: 3074 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-12 10:19             ` bala suru
@ 2011-09-12 10:54               ` Stefan Hajnoczi
  2011-09-12 11:35                 ` bala suru
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2011-09-12 10:54 UTC (permalink / raw)
  To: bala suru; +Cc: qemu-devel

On Mon, Sep 12, 2011 at 03:49:53PM +0530, bala suru wrote:
> Can I do this on the running VMs ..?,
> I'm using opennebula to spawn the VMs, so it would be good if edit before
> spawning the VMs..

I don't think you can do this on a running VM.

At the bottom of this page they show how you can add the serial port
libvirt domain XML in OpenNebula:
http://opennebula.org/documentation:rel2.2:kvmg

Stefan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-12 10:54               ` Stefan Hajnoczi
@ 2011-09-12 11:35                 ` bala suru
  2011-09-12 18:21                   ` Stefan Hajnoczi
  0 siblings, 1 reply; 11+ messages in thread
From: bala suru @ 2011-09-12 11:35 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

Hi,
Thanks for the help , Now I could do cat /dev/ttyS0  , no error . it runs
well .

But I need to connect a some USB device which will create a virtual
serialport called /dev/ttyACM0, I cloud not see this on the Vm running ..

This XML format I used
RAW = [ type = "kvm",
          data = "<devices><serial type=\"pty\"><source
path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\"
tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
port=\"0\"/></console></devices>" ]


Have I missed out anything ..?

regards
Bala

On Mon, Sep 12, 2011 at 4:24 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Mon, Sep 12, 2011 at 03:49:53PM +0530, bala suru wrote:
> > Can I do this on the running VMs ..?,
> > I'm using opennebula to spawn the VMs, so it would be good if edit before
> > spawning the VMs..
>
> I don't think you can do this on a running VM.
>
> At the bottom of this page they show how you can add the serial port
> libvirt domain XML in OpenNebula:
> http://opennebula.org/documentation:rel2.2:kvmg
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 1703 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-12 11:35                 ` bala suru
@ 2011-09-12 18:21                   ` Stefan Hajnoczi
  2011-09-13  4:59                     ` bala suru
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2011-09-12 18:21 UTC (permalink / raw)
  To: bala suru; +Cc: qemu-devel

On Mon, Sep 12, 2011 at 12:35 PM, bala suru <balaqemu@gmail.com> wrote:
> But I need to connect a some USB device which will create a virtual
> serialport called /dev/ttyACM0, I cloud not see this on the Vm running ..
>
> This XML format I used
> RAW = [ type = "kvm",
>           data = "<devices><serial type=\"pty\"><source
> path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\"
> tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
> port=\"0\"/></console></devices>" ]

I am not sure what you are trying to do.

Are you attaching a USB serial device to the host and you would like
to connect that to the VM's serial port?  In that case you can try
this domain XML:

<serial type="dev">
    <source path="/dev/ttyACM0" />
    <target port="0" />
</serial>

Stefan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-12 18:21                   ` Stefan Hajnoczi
@ 2011-09-13  4:59                     ` bala suru
  2011-09-13  5:23                       ` Stefan Hajnoczi
  0 siblings, 1 reply; 11+ messages in thread
From: bala suru @ 2011-09-13  4:59 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

Yes, I'm connecting a USB to serial device to the host (ubuntu 11.04) and I
want that serial port on my VM .
I tried the solution you have suggested but still same problem , can  not
see the virtual serial port (ttyACM0) on VM but I could see on the HOST .

The following is the line  I have tried .
 RAW = [ type = "kvm",
          data = "<devices><serial type=\"dev\"><source
path=\"/dev/ttyACM0\"/><target port=\"0\"/></serial><console type=\"pty\"
tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
port=\"0\"/></console></devices>" ]




On Mon, Sep 12, 2011 at 11:51 PM, Stefan Hajnoczi <stefanha@gmail.com>wrote:

> On Mon, Sep 12, 2011 at 12:35 PM, bala suru <balaqemu@gmail.com> wrote:
> > But I need to connect a some USB device which will create a virtual
> > serialport called /dev/ttyACM0, I cloud not see this on the Vm running ..
> >
> > This XML format I used
> > RAW = [ type = "kvm",
> >           data = "<devices><serial type=\"pty\"><source
> > path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\"
> > tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
> > port=\"0\"/></console></devices>" ]
>
> I am not sure what you are trying to do.
>
> Are you attaching a USB serial device to the host and you would like
> to connect that to the VM's serial port?  In that case you can try
> this domain XML:
>
> <serial type="dev">
>    <source path="/dev/ttyACM0" />
>    <target port="0" />
> </serial>
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 2431 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-13  4:59                     ` bala suru
@ 2011-09-13  5:23                       ` Stefan Hajnoczi
  2011-09-13  6:27                         ` bala suru
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2011-09-13  5:23 UTC (permalink / raw)
  To: bala suru; +Cc: qemu-devel

On Tue, Sep 13, 2011 at 5:59 AM, bala suru <balaqemu@gmail.com> wrote:
> Yes, I'm connecting a USB to serial device to the host (ubuntu 11.04) and I
> want that serial port on my VM .
> I tried the solution you have suggested but still same problem , can  not
> see the virtual serial port (ttyACM0) on VM but I could see on the HOST .
>
> The following is the line  I have tried .
>  RAW = [ type = "kvm",
>           data = "<devices><serial type=\"dev\"><source
> path=\"/dev/ttyACM0\"/><target port=\"0\"/></serial><console type=\"pty\"
> tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
> port=\"0\"/></console></devices>" ]

Inside the guest you will see a regular serial port (/dev/ttyS0).  The
guest does not know that you're using /dev/ttyACM0 on the host, but
that should not matter.

Stefan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] unable to access the serial port on the Vm
  2011-09-13  5:23                       ` Stefan Hajnoczi
@ 2011-09-13  6:27                         ` bala suru
  0 siblings, 0 replies; 11+ messages in thread
From: bala suru @ 2011-09-13  6:27 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]

Hi,
Thanks a lot , it resolved my problem .. I could get the data inside VM .

regards
Bala

On Tue, Sep 13, 2011 at 10:53 AM, Stefan Hajnoczi <stefanha@gmail.com>wrote:

> On Tue, Sep 13, 2011 at 5:59 AM, bala suru <balaqemu@gmail.com> wrote:
> > Yes, I'm connecting a USB to serial device to the host (ubuntu 11.04) and
> I
> > want that serial port on my VM .
> > I tried the solution you have suggested but still same problem , can  not
> > see the virtual serial port (ttyACM0) on VM but I could see on the HOST .
> >
> > The following is the line  I have tried .
> >  RAW = [ type = "kvm",
> >           data = "<devices><serial type=\"dev\"><source
> > path=\"/dev/ttyACM0\"/><target port=\"0\"/></serial><console type=\"pty\"
> > tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target
> > port=\"0\"/></console></devices>" ]
>
> Inside the guest you will see a regular serial port (/dev/ttyS0).  The
> guest does not know that you're using /dev/ttyACM0 on the host, but
> that should not matter.
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 1638 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-09-13  6:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 17:12 [Qemu-devel] unable to access the serial port on the Vm bala suru
2011-09-09 18:00 ` Stefan Hajnoczi
     [not found]   ` <CAOYyr-sgbRtpBYsWUUwZufzniTxqV3nJkLQyR=RMOR53+4gDtA@mail.gmail.com>
2011-09-11 15:26     ` Stefan Hajnoczi
     [not found]       ` <CAOYyr-vK987n_=7uzKkacS5pyQE88CUZvNK9WpNVO+DRvVtZkA@mail.gmail.com>
     [not found]         ` <CAJSP0QVqagWuE3jF39bJBXp5LHZs+CKmQ-NpQ5QTiARH9FVcSQ@mail.gmail.com>
2011-09-12  9:26           ` Stefan Hajnoczi
2011-09-12 10:19             ` bala suru
2011-09-12 10:54               ` Stefan Hajnoczi
2011-09-12 11:35                 ` bala suru
2011-09-12 18:21                   ` Stefan Hajnoczi
2011-09-13  4:59                     ` bala suru
2011-09-13  5:23                       ` Stefan Hajnoczi
2011-09-13  6:27                         ` bala suru

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.