28

I have a server that I am experimenting with, and sometimes I want to work from home so I installed the 'ssh daemon' (namely, 'sshd') and I can ssh to the server. This works fine. But when I try to run a virtual machine on the server with 'qemu', I get the following error Could not initialize SDL(No available video device) - exiting.

Is it possible to run qemu via ssh connection?

Note, I do not want to see the visual interface to the VM that I'm launching. I just want to to run.

Ramzi Khahil
  • 4,932
  • 4
  • 35
  • 69

5 Answers5

63

Try qemu -curses or qemu -nographic to bypass the SDL

user3662901
  • 759
  • 1
  • 6
  • 6
  • 4
    How do you quit from the curses interface? – k4rtik Feb 22 '16 at 16:49
  • 1
    @k4rtik In case of `-curses`: Alt-1 opens the qemu monitor, then type "quit" followed by return. In case of `-nographic`: press ctrl-a followed by x to exit (or h for help). – pcworld May 14 '21 at 18:18
16

Best way to resolve this is to add -X to your ssh parameters.

e.g. ssh -X user@server

This will allow the window created by QEMU to be X-Forwarded through SSH to you. It doesn't matter if you want to view the window or not, if QEMU can't open it, it will consider it a fatal error and you will get the error you described.

Devid Farinelli
  • 7,514
  • 9
  • 42
  • 73
Brad W.
  • 169
  • 1
  • 2
9

You can disable the video card:

qemu -vga none (...options...)

You could also pipe the screen to VNC instead of SDL - the following will provide a VNC server on port 5901:

qemu -vnc :1 (...options...)
Gustav Larsson
  • 8,199
  • 3
  • 31
  • 51
6EQUJ5
  • 3,142
  • 1
  • 21
  • 29
  • `-vnc :1` was the solution for me (no `-curses` nor `-nographic` required). connected later with `vncviewer QEMU_SERVER_IP:5901` (tigervnc) – wencha Apr 27 '21 at 00:41
9

qemu-system-i386 -curses works like charm..

And to exit from that, use ESC + 2 then q + ENTER.

Pradeep Kumar
  • 93
  • 2
  • 3
0

I had this problem too. I think bitwise can't open a new terminal window like qemu does. You can write make clean qemu-nox in terminal, instead of just make clean qemu and it will launch it in the same window. This worked for me

Netta
  • 11
  • 3