* [Qemu-devel] Log Console Output to File @ 2010-11-11 5:50 qemu 2010-11-11 16:57 ` Mulyadi Santosa 0 siblings, 1 reply; 10+ messages in thread From: qemu @ 2010-11-11 5:50 UTC (permalink / raw) To: qemu-devel Hi, Is there a way to log / copy the console output (like the Linux boot info, if booting QEMU to Linux) to a file? Thanks! ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 5:50 [Qemu-devel] Log Console Output to File qemu @ 2010-11-11 16:57 ` Mulyadi Santosa 2010-11-11 17:22 ` David S. Ahern 0 siblings, 1 reply; 10+ messages in thread From: Mulyadi Santosa @ 2010-11-11 16:57 UTC (permalink / raw) To: qemu; +Cc: qemu-devel On Thu, Nov 11, 2010 at 12:50, <qemu@rkmorris.us> 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 16:57 ` Mulyadi Santosa @ 2010-11-11 17:22 ` David S. Ahern 2010-11-11 20:37 ` Russell Morris 0 siblings, 1 reply; 10+ messages in thread From: David S. Ahern @ 2010-11-11 17:22 UTC (permalink / raw) To: Mulyadi Santosa, qemu; +Cc: qemu-devel On 11/11/10 09:57, Mulyadi Santosa wrote: > On Thu, Nov 11, 2010 at 12:50, <qemu@rkmorris.us> 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 17:22 ` David S. Ahern @ 2010-11-11 20:37 ` Russell Morris 2010-11-11 20:43 ` David S. Ahern 2010-11-11 21:17 ` Stefan Weil 0 siblings, 2 replies; 10+ messages in thread From: Russell Morris @ 2010-11-11 20:37 UTC (permalink / raw) To: David S. Ahern; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1075 bytes --] 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" <daahern@cisco.com> wrote: > On 11/11/10 09:57, Mulyadi Santosa wrote: > > On Thu, Nov 11, 2010 at 12:50, <qemu@rkmorris.us> 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 > [-- Attachment #2: Type: text/html, Size: 1730 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 20:37 ` Russell Morris @ 2010-11-11 20:43 ` David S. Ahern 2010-11-12 3:40 ` qemu 2010-11-11 21:17 ` Stefan Weil 1 sibling, 1 reply; 10+ messages in thread From: David S. Ahern @ 2010-11-11 20:43 UTC (permalink / raw) To: Russell Morris; +Cc: qemu-devel 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" <daahern@cisco.com> wrote: > > On 11/11/10 09:57, Mulyadi Santosa wrote: > > On Thu, Nov 11, 2010 at 12:50, <qemu@rkmorris.us > <mailto:qemu@rkmorris.us>> 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 20:43 ` David S. Ahern @ 2010-11-12 3:40 ` qemu 0 siblings, 0 replies; 10+ messages in thread From: qemu @ 2010-11-12 3:40 UTC (permalink / raw) To: David S. Ahern; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1853 bytes --] 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" <daahern@cisco.com> 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" <daahern@cisco.com> wrote: > > > > On 11/11/10 09:57, Mulyadi Santosa wrote: > > > On Thu, Nov 11, 2010 at 12:50, <qemu@rkmorris.us > > <qemu@rkmorris.us>> 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 > [-- Attachment #2: Type: text/html, Size: 2685 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 20:37 ` Russell Morris 2010-11-11 20:43 ` David S. Ahern @ 2010-11-11 21:17 ` Stefan Weil 2010-11-11 21:57 ` David S. Ahern ` (2 more replies) 1 sibling, 3 replies; 10+ messages in thread From: Stefan Weil @ 2010-11-11 21:17 UTC (permalink / raw) To: Russell Morris; +Cc: qemu-devel, David S. Ahern 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 21:17 ` Stefan Weil @ 2010-11-11 21:57 ` David S. Ahern 2010-11-12 3:42 ` qemu 2010-11-13 14:39 ` qemu 2 siblings, 0 replies; 10+ messages in thread From: David S. Ahern @ 2010-11-11 21:57 UTC (permalink / raw) To: Stefan Weil; +Cc: Russell Morris, qemu-devel 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 21:17 ` Stefan Weil 2010-11-11 21:57 ` David S. Ahern @ 2010-11-12 3:42 ` qemu 2010-11-13 14:39 ` qemu 2 siblings, 0 replies; 10+ messages in thread From: qemu @ 2010-11-12 3:42 UTC (permalink / raw) To: Stefan Weil; +Cc: qemu-devel, David S. Ahern [-- Attachment #1: Type: text/plain, Size: 1249 bytes --] 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 <weil@mail.berlios.de> 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 > > [-- Attachment #2: Type: text/html, Size: 1744 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Log Console Output to File 2010-11-11 21:17 ` Stefan Weil 2010-11-11 21:57 ` David S. Ahern 2010-11-12 3:42 ` qemu @ 2010-11-13 14:39 ` qemu 2 siblings, 0 replies; 10+ messages in thread From: qemu @ 2010-11-13 14:39 UTC (permalink / raw) To: Stefan Weil; +Cc: qemu-devel, David S. Ahern [-- Attachment #1: Type: text/plain, Size: 1516 bytes --] 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 <weil@mail.berlios.de> 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 > > [-- Attachment #2: Type: text/html, Size: 2052 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-11-13 14:40 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-11 5:50 [Qemu-devel] Log Console Output to File qemu 2010-11-11 16:57 ` Mulyadi Santosa 2010-11-11 17:22 ` David S. Ahern 2010-11-11 20:37 ` Russell Morris 2010-11-11 20:43 ` David S. Ahern 2010-11-12 3:40 ` qemu 2010-11-11 21:17 ` Stefan Weil 2010-11-11 21:57 ` David S. Ahern 2010-11-12 3:42 ` qemu 2010-11-13 14:39 ` qemu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).