Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

4 Answers 4

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.

share|improve this answer
    
ok, so any idea to make the display go to the terminal ? –  LB40 Apr 1 '10 at 15:24

My bad,

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

share|improve this answer

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.

share|improve this answer

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...)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.