In libguestfs ≥ 1.27.17, there’s a new tool called virt-log for displaying the log files from a disk image or virtual machine:
$ virt-log -a disk.img | less
Previously you could write:
$ virt-cat -a disk.img /var/log/messages
That worked for some Linux guests, but several things happened:
- The binary systemd journal
- The command above doesn’t work on Debian guests (you need to use
/var/log/syslog
) - Windows uses the Windows Event Log
Virt-log is designed to do the right thing automatically (although at the moment Windows support is not finished). In particular it will automatically decode and display the systemd journal, and it knows the different locations that some Linux distros store their plain text log files.
Pingback: F21 on Track, FESCo Membership Change, More DNF vs. Yum, Reading VM Logs, and Wiki Infoboxes (5tFTW 2014-06-17) | Fedora Magazine
Pingback: virt-log now supports the Windows Event Log | Richard WM Jones
Pingback: Pět věcí ve Fedoře za poslední týden (17. 6. 2014) | Fedora.cz
Pingback: libguestfs 1.28 released | Richard WM Jones