Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Sunday, April 4, 2010

The ultimate way of starting qemu under Windows

Being on vacation I gave a shot on building and launching qemu under Windows. Of course I was stumbled on getting the message

chardev: backend "stdio" not found
qemu: could not open serial device 'mon:stdio': No such file or directory


when running with  -nographic option. The option is necessary for launching qemu with SPARCstation-5's OBP, as it doesn't support qemu's TCX graphic card.

I googled, but found only that many people have stumbled over this problem before with no luck of solving it. And then I was so desperate that I read the qemu manual page. And you know what? The solution is described there! Instead of using console for standard I/O, it's possible to redirect it to a port, and telnet there:

sparc-softmmu/qemu-system-sparc -nographic  -serial mon:telnet::4444,server,nowait -bios ../sparc/ss5.bin -hdd ../sparc/solaris-disk

And then just telnet to localhost:4444.
Now I have Solaris/sparc running on my Windows laptop. ;-)

Moreover I think the option -serial mon:telnet::4444,server,nowait is pretty useful for Unix hosts too. When stated with it you have ability to get into qemu console by pressing Ctrl-A c,  and hence eject/insert virtual CD-ROMs, plugging unplugging disks and so on.

Update:  the above method works if qemu is  compiled under cygwin. With plain msys/MinGW, it has to be started with
-monitor file:bob.txt -bios ..\ss5.bin -m 256 -M SS-5 -serial mon:telnet:127.0.0.1:4444,server,nowait
options. Thanks, Neozeed.