Changes

Debugging Qemu

113 bytes added, 14:14, 5 June 2014
Sometimes you must be able to analyse Qemu more in-depth than the log files allow to.
For this, one can attach a <code>[https://www.gnu.org/software/gdb</code> GDB] instance to a running Qemu process if as long as it is started with the <code>-s</code> option.
To pass the required option from libvirt down to Qemu, one can use an additional namespace to pass along options to Qemu as descripted described [http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#-s in the libvirt wiki].
Simply replace at the beginning of the XML (for example when editing using <code>virsh edit</code>):
and then start the VM.
The [https://www.gnu.org/software/gdb/ GDB ] session then looks like thisto attach to the process and continue to run it until you hit a bug:
<pre>
Bureaucrat, administrator
425
edits