I have a raw qemu disk image of Debian 10 ("buster") with no desktop environment, and I'm trying to run it in the terminal of my host machine (also Debian 10) with the
-curses flag. If I run
qemu-system-x86_64 with just the
-curses flag, I just get a blank screen, so following this question I added the
-vga std option. Unfortunately, that gives me a kernel panic in the console, and I never reach the login screen of the guest. The output looks like this:
[ 3.021788] xwrite+0x29/0x5a [ 3.021845] do_copy+0x9b/0xc8 [ 3.021878] write_buffer+0x27/0x37 [ 3.021912] flush_buffer+0x34/0x8b [ 3.021947] __gunzip+0x26e/0x315 [ 3.021982] ? bunzip2+0x397/0x397 [ 3.022016] ? initrd_load+0x5e/0x5e [ 3.022048] ? __gunzip+0x315/0x315 [ 3.022080] gunzip+0xe/0x11 [ 3.022112] ? initrd_load+0x5e/0x5e [ 3.022143] unpack_to_rootfs+0x182/0x2c6 [ 3.022177] ? initrd_load+0x5e/0x5e [ 3.022210] ? unpack_to_rootfs+0x2c6/0x2c6 [ 3.022243] ? do_early_param+0x8e/0x8e [ 3.022275] populate_rootfs+0x59/0x106 [ 3.022311] do_one_initcall+0x46/0x1c3 [ 3.022350] ? do_early_param+0x8e/0x8e [ 3.022382] kernel_init_freeable+0x189/0x218 [ 3.022419] ? rest_init+0xaa/0xaa [ 3.022453] kernel_init+0xa/0x10d [ 3.022487] ret_from_fork+0x35/0x40 [ 3.023243] ---[ end Kernel panic - not syncing: System is deadlocked on memo ry [ 3.023243] ]---
I'm using QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8+deb10u3). My terminal is st 0.8.2 and my desktop environment/window manager is dwm, if those details are relevant. I get the same kernel panic if I use xterm, though.
I'm booting the image with this qemu command:
qemu-system-x86_64 -curses -vga std -m 1024 -drive format=raw,file=disk.img
I've tried other various combinations of qemu flags from this question, but they either don't exist for my version of qemu (e.g. the
-noframe option), throw other errors (e.g.
-append requires a
-kernel option), or just give me a blank screen (
-curses by itself).
The whole point of this is to avoid launching a VNC viewer to access a guest that is command line only anyway.