1virt-log(1)                 Virtualization Support                 virt-log(1)
2
3
4

NAME

6       virt-log - Display log files from a virtual machine
7

SYNOPSIS

9        virt-log [--options] -d domname
10
11        virt-log [--options] -a disk.img [-a disk.img ...]
12

DESCRIPTION

14       "virt-log" is a command line tool to display the log files from the
15       named virtual machine (or disk image).
16
17       This tool understands and displays both plain text log files (eg.
18       /var/log/messages) and binary formats such as the systemd journal.
19
20       To display other types of files, use virt-cat(1).  To follow (tail)
21       text log files, use virt-tail(1).  To copy files out of a virtual
22       machine, use virt-copy-out(1).  To display the contents of the Windows
23       Registry, use virt-win-reg(1).
24

EXAMPLES

26       Display the complete logs from a guest:
27
28        virt-log -d mydomain | less
29
30       Find out what DHCP IP address a VM acquired:
31
32        virt-log -d mydomain | grep 'dhclient.*bound to'
33

OPTIONS

35       --help
36           Display brief help.
37
38       -a file
39       --add file
40           Add file which should be a disk image from a virtual machine.  If
41           the virtual machine has multiple block devices, you must supply all
42           of them with separate -a options.
43
44           The format of the disk image is auto-detected.  To override this
45           and force a particular format use the --format=.. option.
46
47       -a URI
48       --add URI
49           Add a remote disk.  See "ADDING REMOTE STORAGE" in guestfish(1).
50
51       --blocksize=512
52       --blocksize=4096
53       --blocksize
54           This parameter sets the sector size of the disk image.  It affects
55           all explicitly added subsequent disks after this parameter.  Using
56           --blocksize with no argument switches the disk sector size to the
57           default value which is usually 512 bytes.  See also
58           "guestfs_add_drive_opts" in guestfs(3).
59
60       -c URI
61       --connect URI
62           If using libvirt, connect to the given URI.  If omitted, then we
63           connect to the default libvirt hypervisor.
64
65           If you specify guest block devices directly (-a), then libvirt is
66           not used at all.
67
68       -d guest
69       --domain guest
70           Add all the disks from the named libvirt guest.  Domain UUIDs can
71           be used instead of names.
72
73       --echo-keys
74           When prompting for keys and passphrases, virt-log normally turns
75           echoing off so you cannot see what you are typing.  If you are not
76           worried about Tempest attacks and there is no one else in the room
77           you can specify this flag to see what you are typing.
78
79       --format=raw|qcow2|..
80       --format
81           The default for the -a option is to auto-detect the format of the
82           disk image.  Using this forces the disk format for -a options which
83           follow on the command line.  Using --format with no argument
84           switches back to auto-detection for subsequent -a options.
85
86           For example:
87
88            virt-log --format=raw -a disk.img
89
90           forces raw format (no auto-detection) for disk.img.
91
92            virt-log --format=raw -a disk.img --format -a another.img
93
94           forces raw format (no auto-detection) for disk.img and reverts to
95           auto-detection for another.img.
96
97           If you have untrusted raw-format guest disk images, you should use
98           this option to specify the disk format.  This avoids a possible
99           security problem with malicious guests (CVE-2010-3851).
100
101       --key SELECTOR
102           Specify a key for LUKS, to automatically open a LUKS device when
103           using the inspection.  "ID" can be either the libguestfs device
104           name, or the UUID of the LUKS device.
105
106           --key "ID":key:KEY_STRING
107               Use the specified "KEY_STRING" as passphrase.
108
109           --key "ID":file:FILENAME
110               Read the passphrase from FILENAME.
111
112           --key "ID":clevis
113               Attempt passphrase-less unlocking for "ID" with Clevis, over
114               the network.  Please refer to "ENCRYPTED DISKS" in guestfs(3)
115               for more information on network-bound disk encryption (NBDE).
116
117               Note that if any such option is present on the command line,
118               QEMU user networking will be automatically enabled for the
119               libguestfs appliance.
120
121       --keys-from-stdin
122           Read key or passphrase parameters from stdin.  The default is to
123           try to read passphrases from the user by opening /dev/tty.
124
125           If there are multiple encrypted devices then you may need to supply
126           multiple keys on stdin, one per line.
127
128       -v
129       --verbose
130           Enable verbose messages for debugging.
131
132       -V
133       --version
134           Display version number and exit.
135
136       -x  Enable tracing of libguestfs API calls.
137

EXIT STATUS

139       This program returns 0 if successful, or non-zero if there was an
140       error.
141

SEE ALSO

143       guestfs(3), guestfish(1), virt-cat(1), virt-copy-out(1), virt-tail(1),
144       virt-tar-out(1), virt-win-reg(1), http://libguestfs.org/.
145

AUTHOR

147       Richard W.M. Jones http://people.redhat.com/~rjones/
148
150       Copyright (C) 2010-2023 Red Hat Inc.
151

LICENSE

153       This program is free software; you can redistribute it and/or modify it
154       under the terms of the GNU General Public License as published by the
155       Free Software Foundation; either version 2 of the License, or (at your
156       option) any later version.
157
158       This program is distributed in the hope that it will be useful, but
159       WITHOUT ANY WARRANTY; without even the implied warranty of
160       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
161       General Public License for more details.
162
163       You should have received a copy of the GNU General Public License along
164       with this program; if not, write to the Free Software Foundation, Inc.,
165       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
166

BUGS

168       To get a list of bugs against libguestfs, use this link:
169       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
170
171       To report a new bug against libguestfs, use this link:
172       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
173
174       When reporting a bug, please supply:
175
176       •   The version of libguestfs.
177
178       •   Where you got libguestfs (eg. which Linux distro, compiled from
179           source, etc)
180
181       •   Describe the bug accurately and give a way to reproduce it.
182
183       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
184           into the bug report.
185
186
187
188guestfs-tools-1.50.1              2023-04-06                       virt-log(1)
Impressum