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       --keys-from-stdin
113           Read key or passphrase parameters from stdin.  The default is to
114           try to read passphrases from the user by opening /dev/tty.
115
116           If there are multiple encrypted devices then you may need to supply
117           multiple keys on stdin, one per line.
118
119       -v
120       --verbose
121           Enable verbose messages for debugging.
122
123       -V
124       --version
125           Display version number and exit.
126
127       -x  Enable tracing of libguestfs API calls.
128

EXIT STATUS

130       This program returns 0 if successful, or non-zero if there was an
131       error.
132

SEE ALSO

134       guestfs(3), guestfish(1), virt-cat(1), virt-copy-out(1), virt-tail(1),
135       virt-tar-out(1), virt-win-reg(1), http://libguestfs.org/.
136

AUTHOR

138       Richard W.M. Jones http://people.redhat.com/~rjones/
139
141       Copyright (C) 2010-2020 Red Hat Inc.
142

LICENSE

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

BUGS

159       To get a list of bugs against libguestfs, use this link:
160       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
161
162       To report a new bug against libguestfs, use this link:
163       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
164
165       When reporting a bug, please supply:
166
167       •   The version of libguestfs.
168
169       •   Where you got libguestfs (eg. which Linux distro, compiled from
170           source, etc)
171
172       •   Describe the bug accurately and give a way to reproduce it.
173
174       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
175           into the bug report.
176
177
178
179guestfs-tools-1.46.1              2021-05-13                       virt-log(1)
Impressum