0

I manage an Ubuntu 14.04 LTS server running several guest VMs through KVM/qemu, and I'm asked to log boot, reboot and shutdown times of guests.

Is there a way to catch this kind of events for example in /var/log/syslog?

  • Have you tried /var/log/libvirt/libvirtd.log ? – Andrew Domaszek Feb 6 '17 at 16:22
  • @AndrewDomaszek Thank for your comment, you put me on the right path: on my system libvirtd.log wasn't helpful, but files in /var/log/libvirt/qemu/ were. I added an answer to help others passing by. – gerlos Feb 6 '17 at 16:43
0

I found that such events are already logged for each VM in a file named in a way similar to vmname.log, located in /var/log/libvirt/qemu/.

So one can get boot and shutdown times using a command like this:

$ sudo grep -e 'starting up' -e 'shutting down' /var/log/libvirt/qemu/vmname-log

Still can't find a way to get reboot time without looking at guest log files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.