Debugging Qemu: Difference between revisions

From stoney-cloud.org
Jump to navigation Jump to search
(Created page with "Sometimes you must be able to analyse Qemu more in-depth than the log files allow to. For this, one can attach a <code>gdb</code> instance to a running Qemu process if it is ...")
(No difference)

Revision as of 15:03, 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 gdb instance to a running Qemu process if it is started with the -s 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 in the libvirt wiki.

Simply replace at the beginning of the XML (for example when editing using virsh edit):

<domain type='kvm'>

by

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <qemu:commandline><qemu:arg value='-s'/></qemu:commandline>

and then start the VM.