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
This comment has been removed by the author.
ReplyDeleteAfter running:
ReplyDeleteadduser libvirt-qemu tracing
reboot
And starting VMs with Libvirt, or even manually by calling qemu-system-x86_64 directly, lttng doesn't work anymore...
I'm seeing now:
---
lttng list -u
Error: Unable to list UST events: No session daemon is available
Error: Command error
---
Any idea? =P
Mmm... Never mind... After running (Ubuntu 16.04):
Deleteapt install lttng-tools lttng-modules-dkms --reinstall
It is working again, some service not enabled on boot? Maybe... let me see if I can trace vms started by libvirt...
Still can't trace VMs launched by libvirt/virt-manager... ;-(
DeleteWhat is your current state? What happens if you do "lttng list -u" while the VM is running? You should at least make sure that the lttng-sessiond daemon is running, as such:
Delete$> pgrep -l lttng-sessiond
which should return the PID of the daemon. If that's not the case, you can launch it by doing:
$> sudo lttng-sessiond -d
This comment has been removed by the author.
ReplyDeletePanduan Cara Bet 2D Togel Klik4D Online yang tersedia di S128cash. Berhubung permainan togel adalah game legendaris di Indonesia, tahukah kamu kalau game togel sekarang bisa dimainkan secara online ? (Baca Selengkapnya Disini...)
ReplyDelete