DEV Community

Wataru Ashihara
Wataru Ashihara

Posted on • Edited on

1

QEMU options for debugging kernel

Sec.: sections in qemu-doc(1)

Sec. Option Details
2.3.1 -smp 4 Simulate an SMP system with 4 CPUs
2.3.1 -m 256 Memory 256MiB
2.3.2 -hda netbsd.qcow2 Use netbsd.qcow2 as hard disk 0
2.3.3 -cdrom netbsd.iso Use netbsd.iso as CD-ROM image
2.3.4 -display curses Use curses display instead of VGA output; Connect QEMU monitor and q to quit
2.3.4 -display none Don't show VGA display
2.3.4 -nographic -display none + -parallel null(if -parallel not specified) + -serial mon:stdio(if -serial and -monitor not specified); undocumented, investigated by debugging QEMU
2.3.6 -netdev user,id=n1,hostfwd=tcp::10022-:22 -device e1000,netdev=n1 User mode network stack (NAT Network in VirtualBox); forwarding localhost:10022 to guest's port 22
2.3.6 -nic user,hostfwd=tcp::10022-:22 Shorthand for above; requires QEMU (>= 2.12)
2.3.11 -serial telnet::5555,server,nowait telnet localhost 5555 to get serial I/O
2.3.11 -monitor telnet::5556,server,nowait telnet localhost 5556 to connect QEMU monitor
2.3.11 -serial mon:telnet::5555,server,nowait Serves both serial and monitor via telnet localhost 5555; Ctrl-a h to see help
2.3.11 -serial mon:stdio Serves both serial and monitor on the terminal; Ctrl-a h to see help
2.3.11 -S Stop running machine until gdbserver accepts a connection
2.3.11 -gdb tcp::1234 Listen gdb connection on port 1234
2.3.11 -s Shorthand for -gdb tcp::1234
2.3.11 -enable-kvm (Linux only) Enable KVM support
2.3.11 -no-reboot reboot コマンドで再起動せずにQEMUを終了する
2.3.11 -daemonize Daemonize QEMU; Useful when QEMU runs long time since QEMU won't killed (SIGHUP'ed) on the terminal closed
2.3.11 -rtc base=utc To correct timezone

I'll add Linux-specific options (such as -kernel)

Image of Quadratic

Free AI chart generator

Upload data, describe your vision, and get Python-powered, AI-generated charts instantly.

Try Quadratic free

Top comments (0)

Jetbrains image

Is Your CI/CD Server a Prime Target for Attack?

57% of organizations have suffered from a security incident related to DevOps toolchain exposures. It makes sense—CI/CD servers have access to source code, a highly valuable asset. Is yours secure? Check out nine practical tips to protect your CI/CD.

Learn more

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay