qemu-discuss
[Top][All Lists]
Advanced

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

Re: issues with Qemu output in terminal


From: Peter Maydell
Subject: Re: issues with Qemu output in terminal
Date: Thu, 14 Jul 2022 20:55:21 +0100

On Thu, 14 Jul 2022 at 20:43, James Miller <gajs-f0el@dea.spamcon.org> wrote:
> I would think the -nographic switch would be the one to get me
> command-line access to the guest OS, since the man page says "Normally, if
> QEMU is compiled with graphical window support, it displays output such as
> guest graphics, guest console, and the QEMU monitor in a window. With this
> option, you can totally disable graphical output so that QEMU is a simple
> command line application. The emulated serial port is redirected on the
> console and muxed with the monitor (unless redirected elsewhere
> explicitly). Therefore, you can still use QEMU to debug a Linux kernel
> with a serial console. Use C-a h for help on switching between the console
> and monitor." I guess the terminal I start Qemu from is not being detected
> as a console or something?

'-nographic' just tells QEMU to emulate a machine with no graphics
and with a serial terminal connected to your terminal window. It
doesn't (and cannot) do anything to ensure that the software
running on the machine is actually going to send text output to
the serial terminal. This is like real hardware -- you can take
a PC, and unplug the monitor, and connect a serial cable from the
PC's serial port to a serial terminal. But unless the OS you're
booting on the PC knows about the serial port, it will just try to
display its output on the monitor that's not plugged in, and the
serial terminal will not display anything.

So generally you need both to use -nographic and *also* to use
a suitably configured guest OS. How to configure the guest OS,
and to what extent it can just figure out to use the serial port
without much extra configuration, is entirely dependent on the
guest OS. You should be able to use any howtos/documentation for
how to get that guest OS to work with a real-hardware serial console.

thanks
-- PMM



reply via email to

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