5

I ssh to a machine and I would like to start a qemu session inside this ssh session.

I thought that the nographic option would do the trick.

-nographic
Normally, QEMU uses SDL to display the VGA output. 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. Therefore, you can still use QEMU to debug a Linux kernel with a serial console.

Unfortunately, I don't see any output. The command line that I'm using once i've ssh'd to the machine is:

qemu-system-x86_64  -hda debian.img -nographic

Any idea what's happening?

4 Answers 4

5

My bad,

the -curses option seems to do the trick for what i want to do.

2

You've essentially unplugged the "virtual monitor". -nographic doesn't make the display go to the terminal, it disables it. The serial port (com port) is what would be echo'd into your terminal.

1
  • ok, so any idea to make the display go to the terminal ?
    – LB40
    Apr 1, 2010 at 15:24
0

As LB suggested, use -curses to have an interactive terminal session. Ideal for ssh.

I also use the following to monitor the boot process (locally or over ssh). Call qemu with "-serial stdio" and append "console=ttyS0" to grub's kernel line. All kernel output will go to the ttyS0 serial console, with will be printed to stdio (your terminal). That way I can easily copy/paste the boot process, something you cannot do with an sdl window.

0

If you want a command line access through the console, you need to enable the serial line in your guest Debian system.

To do that, edit /etc/inittab and uncomment the following line :

T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100

(at least on my debian 6 that was what my inittab contained)

That way your system attached a terminal to the serial line emulated by Qemu.

You also still have to use the -nographic option, to tell Qemu to redirect the serial line to the console.

That was what helped me : http://www.debuntu.org/how-to-set-up-a-serial-console-on-debian/

(I know this question is very old, but I ran into it while searching for the exact same problem...)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .