Re: [Qemu-devel] Log Console Output to File

2010-11-13 Thread qemu
Hi,

 

A bit more on this - as I have been trying to get it working ... :-).

 

The command you provided did work if I use /dev/tty in place of stdio (i.e. 
-serial /dev/tty) ... except that it only "starts" to work once I have a login 
prompt in QEMU (and then also in my command window). I'm trying to capture all 
the Linux boot info / messages prior to that. Any idea how to get this info to 
show up in my console window (where I'm executing qemu from)?

 

Thanks!


On Thu, Nov 11, 2010 03:17  PM, Stefan Weil  wrote:


> 
Am 11.11.2010 21:37, schrieb Russell Morris:
> > Hi,
> >
> > Thanks for the pointer! I tried this, but I get an error message, as 
> > follows ...
> > *chardev: opening backent "stdio" failed*
> > *qemu: could not open serial device 'stdio': Inappropriate ioctl for 
> > device.*
> >
> > Thoughts? 
> 
> Hi,
> 
> I assume that you tried this (as it was suggested by an earlier mail):
> 
> qemu -serial stdio -nographic ...
> 
> This results in an error message for me, too:
> 
> chardev: opening backend "stdio" failed
> qemu: could not open serial device 'stdio': No such file or directory
> 
> Try this variant (which works for me):
> 
> qemu -nographic ...
> 
> It will redirect the serial output (first serial port) of your guest os to
> standard output, so you can write it to a file with the usual methods,
> for example this one:
> 
> qemu -nographic ... | tee log.txt
> 
> Regards
> 
> Stefan Weil
> 
> 

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread qemu
Hi,

Yes, this works, as does adding in "-vnc :0" (and then connection to this via 
VNC) ... but in both cases I am not able to collect the console output that 
exists during the boot. Any thoughts on that?

Thanks!



On Thu, Nov 11, 2010 03:17  PM, Stefan Weil  wrote:
> Am 11.11.2010 21:37, schrieb Russell Morris:
> > Hi,
> >
> > Thanks for the pointer! I tried this, but I get an error message, as 
> > follows ...
> > *chardev: opening backent "stdio" failed*
> > *qemu: could not open serial device 'stdio': Inappropriate ioctl for 
> > device.*
> >
> > Thoughts? 
> 
> Hi,
> 
> I assume that you tried this (as it was suggested by an earlier mail):
> 
> qemu -serial stdio -nographic ...
> 
> This results in an error message for me, too:
> 
> chardev: opening backend "stdio" failed
> qemu: could not open serial device 'stdio': No such file or directory
> 
> Try this variant (which works for me):
> 
> qemu -nographic ...
> 
> It will redirect the serial output (first serial port) of your guest os to
> standard output, so you can write it to a file with the usual methods,
> for example this one:
> 
> qemu -nographic ... | tee log.txt
> 
> Regards
> 
> Stefan Weil
> 
> 

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread qemu
Here you go ... 
qemu-system-arm -serial stdio -nographic -M versatilepb -kernel 
zImage-2.6.34-r4-qemuarm.bin -hda 
minimal-console-image-eglibc-ipk-dev-snapshot-20101110-qemuarm.rootfs.ext3 
-append "root=/dev/sda"

And the output ...
chardev: opening backend "stdio" failed
qemu: could not open serial device 'stdio': Inappropriate ioctl for device

Thoughts?

Thanks!



On Thu, Nov 11, 2010 02:43  PM, "David S. Ahern"  wrote:
> On 11/11/10 13:37, Russell Morris wrote:
> > Hi,
> > 
> >  
> > 
> > Thanks for the pointer! I tried this, but I get an error message, as
> > follows ...
> > 
> > *chardev: opening backent "stdio" failed*
> > 
> > *qemu: could not open serial device 'stdio': Inappropriate ioctl for
> > device.*
> 
> qemu command line?
> 
> David
> 
> > 
> >  
> > 
> > Thoughts?
> > 
> >  
> > 
> > Thanks again!
> > 
> > 
> > 
> > On Thu, Nov 11, 2010 11:22  AM, "David S. Ahern"  wrote:
> > 
> > On 11/11/10 09:57, Mulyadi Santosa wrote:
> > > On Thu, Nov 11, 2010 at 12:50,  > > wrote:
> > >> Hi,
> > >>
> > >> Is there a way to log / copy the console output (like the Linux
> > boot info, if booting QEMU to Linux) to a file?
> > >
> > > I think you could consider booting Linux in serial console...then
> > > start Qemu with -nographic. From there, everything will be spilled
> > > right in your standart output. Then you can use your favourite method
> > > to save the output...let's say using "script" command.
> > >
> > 
> > I use 'screen' and its logging capability (Ctrl-a H). Launch the VM with
> > '-serial stdio -nographic' and have the guest console directed to ttyS0
> > (console=ttyS0 kernel arg).
> > 
> > David
> 

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread David S. Ahern


On 11/11/10 14:17, Stefan Weil wrote:
> Am 11.11.2010 21:37, schrieb Russell Morris:
>> Hi,
>>
>> Thanks for the pointer! I tried this, but I get an error message, as
>> follows ...
>> *chardev: opening backent "stdio" failed*
>> *qemu: could not open serial device 'stdio': Inappropriate ioctl for
>> device.*
>>
>> Thoughts? 
> 
> Hi,
> 
> I assume that you tried this (as it was suggested by an earlier mail):
> 
> qemu -serial stdio -nographic ...
> 
> This results in an error message for me, too:
> 
> chardev: opening backend "stdio" failed
> qemu: could not open serial device 'stdio': No such file or directory
> 
> Try this variant (which works for me):
> 
> qemu -nographic ...
> 
> It will redirect the serial output (first serial port) of your guest os to
> standard output, so you can write it to a file with the usual methods,
> for example this one:
> 
> qemu -nographic ... | tee log.txt
> 
> Regards
> 
> Stefan Weil
> 

On one host I am using qemu-kvm from
qemu-system-x86-0.13.0-1.fc14.x86_64, and on another
/usr/local/qemu-kvm.latest/bin/qemu-kvm where latest was qemu-kvm.git on
Oct 11. Both work fine. I like this route (using screen and stdio -- no
piping) so that I still have a usable console.

Maybe it's a difference between qemu and qemu-kvm.

David




Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread Stefan Weil

Am 11.11.2010 21:37, schrieb Russell Morris:

Hi,

Thanks for the pointer! I tried this, but I get an error message, as 
follows ...

*chardev: opening backent "stdio" failed*
*qemu: could not open serial device 'stdio': Inappropriate ioctl for 
device.*


Thoughts? 


Hi,

I assume that you tried this (as it was suggested by an earlier mail):

qemu -serial stdio -nographic ...

This results in an error message for me, too:

chardev: opening backend "stdio" failed
qemu: could not open serial device 'stdio': No such file or directory

Try this variant (which works for me):

qemu -nographic ...

It will redirect the serial output (first serial port) of your guest os to
standard output, so you can write it to a file with the usual methods,
for example this one:

qemu -nographic ... | tee log.txt

Regards

Stefan Weil




Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread David S. Ahern


On 11/11/10 13:37, Russell Morris wrote:
> Hi,
> 
>  
> 
> Thanks for the pointer! I tried this, but I get an error message, as
> follows ...
> 
> *chardev: opening backent "stdio" failed*
> 
> *qemu: could not open serial device 'stdio': Inappropriate ioctl for
> device.*

qemu command line?

David

> 
>  
> 
> Thoughts?
> 
>  
> 
> Thanks again!
> 
> 
> 
> On Thu, Nov 11, 2010 11:22  AM, "David S. Ahern"  wrote:
> 
> On 11/11/10 09:57, Mulyadi Santosa wrote:
> > On Thu, Nov 11, 2010 at 12:50,  > wrote:
> >> Hi,
> >>
> >> Is there a way to log / copy the console output (like the Linux
> boot info, if booting QEMU to Linux) to a file?
> >
> > I think you could consider booting Linux in serial console...then
> > start Qemu with -nographic. From there, everything will be spilled
> > right in your standart output. Then you can use your favourite method
> > to save the output...let's say using "script" command.
> >
> 
> I use 'screen' and its logging capability (Ctrl-a H). Launch the VM with
> '-serial stdio -nographic' and have the guest console directed to ttyS0
> (console=ttyS0 kernel arg).
> 
> David



Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread Russell Morris
Hi,

 

Thanks for the pointer! I tried this, but I get an error message, as follows ...

chardev: opening backent "stdio" failed

qemu: could not open serial device 'stdio': Inappropriate ioctl for device.

 

Thoughts?

 

Thanks again!


On Thu, Nov 11, 2010 11:22  AM, "David S. Ahern"  wrote:


> 
On 11/11/10 09:57, Mulyadi Santosa wrote:
> > On Thu, Nov 11, 2010 at 12:50,  wrote:
> >> Hi,
> >>
> >> Is there a way to log / copy the console output (like the Linux boot info, 
> >> if booting QEMU to Linux) to a file?
> > 
> > I think you could consider booting Linux in serial console...then
> > start Qemu with -nographic. From there, everything will be spilled
> > right in your standart output. Then you can use your favourite method
> > to save the output...let's say using "script" command.
> > 
> 
> I use 'screen' and its logging capability (Ctrl-a H). Launch the VM with
> '-serial stdio -nographic' and have the guest console directed to ttyS0
> (console=ttyS0 kernel arg).
> 
> David
> 

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread David S. Ahern


On 11/11/10 09:57, Mulyadi Santosa wrote:
> On Thu, Nov 11, 2010 at 12:50,   wrote:
>> Hi,
>>
>> Is there a way to log / copy the console output (like the Linux boot info, 
>> if booting QEMU to Linux) to a file?
> 
> I think you could consider booting Linux in serial console...then
> start Qemu with -nographic. From there, everything will be spilled
> right in your standart output. Then you can use your favourite method
> to save the output...let's say using "script" command.
> 

I use 'screen' and its logging capability (Ctrl-a H). Launch the VM with
'-serial stdio -nographic' and have the guest console directed to ttyS0
(console=ttyS0 kernel arg).

David



Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread Mulyadi Santosa
On Thu, Nov 11, 2010 at 12:50,   wrote:
> Hi,
>
> Is there a way to log / copy the console output (like the Linux boot info, if 
> booting QEMU to Linux) to a file?

I think you could consider booting Linux in serial console...then
start Qemu with -nographic. From there, everything will be spilled
right in your standart output. Then you can use your favourite method
to save the output...let's say using "script" command.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com