It has been brought to my attention that tracepoints aren't "visible" when virtual machines are started from virt-manager, OpenStack, or any way other than manually launching the QEMU binary.
The symptoms are as follows:
- Start QEMU manually, for instance:
$> qemu-system-x86_64
- List UST tracepoints:
$> lttng list -u
- LTTng will list all available tracepoints
- Stop QEMU and start a VM from virt-manager or OpenStack
- List UST tracepoints:
$> lttng list -u
- LTTng doesn't list any tracepoint
make
and make install
, the binary should be under /usr/local/bin
.Assuming that is taken care of, tracepoints will still not be shown from LTTng UST when VMs are started from other applications. The reason is that virtual machines are actually launched by libvirt, a middleware between VM management applications (virt-manager, OpenStack, etc) and the VMs themselves. The problem with that is that the libvirt daemon launches the VMs under the user account
libvirt-qemu
.By default, tracing with LTTng is only allowed for root or for users who belong to the
tracing
group. Since the libvirt-qemu
user doesn't belong to that group, it doesn't have the privileges to control tracing using LTTng. The workaround is to add the user libvirt-qemu
to the tracing
group, as such:
$> sudo usermod -a -G tracing libvirt-qemu
Restart the libvirt daemon, launch your VMs and tracing should now work from LTTng UST.
Follow @mogeb88