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)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay