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

NAME

6       virt-tail - Follow (tail) files in a virtual machine
7

SYNOPSIS

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

DESCRIPTION

14       "virt-tail" is a command line tool to follow (tail) the contents of
15       "file" where "file" exists in the named virtual machine (or disk
16       image).  It is similar to the ordinary command "tail -f".
17
18       Multiple filenames can be given, in which case each is followed
19       separately.  Each filename must be a full path, starting at the root
20       directory (starting with '/').
21
22       The command keeps running until:
23
24       •   The user presses the ^C or an interrupt signal is received.
25
26       •   None of the listed files was found in the guest, or they all get
27           deleted.
28
29       •   There is an unrecoverable error.
30

EXAMPLE

32       Follow /var/log/messages inside a virtual machine called "mydomain":
33
34        virt-tail -d mydomain /var/log/messages
35

OPTIONS

37       --help
38           Display brief help.
39
40       -a file
41       --add file
42           Add file which should be a disk image from a virtual machine.  If
43           the virtual machine has multiple block devices, you must supply all
44           of them with separate -a options.
45
46           The format of the disk image is auto-detected.  To override this
47           and force a particular format use the --format=.. option.
48
49       -a URI
50       --add URI
51           Add a remote disk.  See "ADDING REMOTE STORAGE" in guestfish(1).
52
53       --blocksize=512
54       --blocksize=4096
55       --blocksize
56           This parameter sets the sector size of the disk image.  It affects
57           all explicitly added subsequent disks after this parameter.  Using
58           --blocksize with no argument switches the disk sector size to the
59           default value which is usually 512 bytes.  See also
60           "guestfs_add_drive_opts" in guestfs(3).
61
62       -c URI
63       --connect URI
64           If using libvirt, connect to the given URI.  If omitted, then we
65           connect to the default libvirt hypervisor.
66
67           If you specify guest block devices directly (-a), then libvirt is
68           not used at all.
69
70       -d guest
71       --domain guest
72           Add all the disks from the named libvirt guest.  Domain UUIDs can
73           be used instead of names.
74
75       --echo-keys
76           When prompting for keys and passphrases, virt-tail normally turns
77           echoing off so you cannot see what you are typing.  If you are not
78           worried about Tempest attacks and there is no one else in the room
79           you can specify this flag to see what you are typing.
80
81       -f
82       --follow
83           This option is ignored.  virt-tail always behaves like tail(1) -f.
84           You don't need to specify the -f option.
85
86       --format=raw|qcow2|..
87       --format
88           The default for the -a option is to auto-detect the format of the
89           disk image.  Using this forces the disk format for -a options which
90           follow on the command line.  Using --format with no argument
91           switches back to auto-detection for subsequent -a options.
92
93           For example:
94
95            virt-tail --format=raw -a disk.img file
96
97           forces raw format (no auto-detection) for disk.img.
98
99            virt-tail --format=raw -a disk.img --format -a another.img file
100
101           forces raw format (no auto-detection) for disk.img and reverts to
102           auto-detection for another.img.
103
104           If you have untrusted raw-format guest disk images, you should use
105           this option to specify the disk format.  This avoids a possible
106           security problem with malicious guests (CVE-2010-3851).
107
108       --key SELECTOR
109           Specify a key for LUKS, to automatically open a LUKS device when
110           using the inspection.  "ID" can be either the libguestfs device
111           name, or the UUID of the LUKS device.
112
113           --key "ID":key:KEY_STRING
114               Use the specified "KEY_STRING" as passphrase.
115
116           --key "ID":file:FILENAME
117               Read the passphrase from FILENAME.
118
119       --keys-from-stdin
120           Read key or passphrase parameters from stdin.  The default is to
121           try to read passphrases from the user by opening /dev/tty.
122
123           If there are multiple encrypted devices then you may need to supply
124           multiple keys on stdin, one per line.
125
126       -m dev[:mountpoint[:options[:fstype]]]
127       --mount dev[:mountpoint[:options[:fstype]]]
128           Mount the named partition or logical volume on the given
129           mountpoint.
130
131           If the mountpoint is omitted, it defaults to /.
132
133           Specifying any mountpoint disables the inspection of the guest and
134           the mount of its root and all of its mountpoints, so make sure to
135           mount all the mountpoints needed to work with the filenames given
136           as arguments.
137
138           If you don’t know what filesystems a disk image contains, you can
139           either run guestfish without this option, then list the partitions,
140           filesystems and LVs available (see "list-partitions", "list-
141           filesystems" and "lvs" commands), or you can use the
142           virt-filesystems(1) program.
143
144           The third (and rarely used) part of the mount parameter is the list
145           of mount options used to mount the underlying filesystem.  If this
146           is not given, then the mount options are either the empty string or
147           "ro" (the latter if the --ro flag is used).  By specifying the
148           mount options, you override this default choice.  Probably the only
149           time you would use this is to enable ACLs and/or extended
150           attributes if the filesystem can support them:
151
152            -m /dev/sda1:/:acl,user_xattr
153
154           Using this flag is equivalent to using the "mount-options" command.
155
156           The fourth part of the parameter is the filesystem driver to use,
157           such as "ext3" or "ntfs". This is rarely needed, but can be useful
158           if multiple drivers are valid for a filesystem (eg: "ext2" and
159           "ext3"), or if libguestfs misidentifies a filesystem.
160
161       -v
162       --verbose
163           Enable verbose messages for debugging.
164
165       -V
166       --version
167           Display version number and exit.
168
169       -x  Enable tracing of libguestfs API calls.
170

LOG FILES

172       To list out the log files from guests, see the related tool
173       virt-log(1).  It understands binary log formats such as the systemd
174       journal.
175

WINDOWS PATHS

177       "virt-tail" has a limited ability to understand Windows drive letters
178       and paths (eg. E:\foo\bar.txt).
179
180       If and only if the guest is running Windows then:
181
182       •   Drive letter prefixes like "C:" are resolved against the Windows
183           Registry to the correct filesystem.
184
185       •   Any backslash ("\") characters in the path are replaced with
186           forward slashes so that libguestfs can process it.
187
188       •   The path is resolved case insensitively to locate the file that
189           should be displayed.
190
191       There are some known shortcomings:
192
193       •   Some NTFS symbolic links may not be followed correctly.
194
195       •   NTFS junction points that cross filesystems are not followed.
196

EXIT STATUS

198       This program returns 0 if successful, or non-zero if there was an
199       error.
200

SEE ALSO

202       guestfs(3), guestfish(1), virt-copy-out(1), virt-cat(1), virt-log(1),
203       virt-tar-out(1), tail(1), http://libguestfs.org/.
204

AUTHOR

206       Richard W.M. Jones http://people.redhat.com/~rjones/
207
209       Copyright (C) 2016 Red Hat Inc.
210

LICENSE

212       This program is free software; you can redistribute it and/or modify it
213       under the terms of the GNU General Public License as published by the
214       Free Software Foundation; either version 2 of the License, or (at your
215       option) any later version.
216
217       This program is distributed in the hope that it will be useful, but
218       WITHOUT ANY WARRANTY; without even the implied warranty of
219       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
220       General Public License for more details.
221
222       You should have received a copy of the GNU General Public License along
223       with this program; if not, write to the Free Software Foundation, Inc.,
224       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
225

BUGS

227       To get a list of bugs against libguestfs, use this link:
228       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
229
230       To report a new bug against libguestfs, use this link:
231       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
232
233       When reporting a bug, please supply:
234
235       •   The version of libguestfs.
236
237       •   Where you got libguestfs (eg. which Linux distro, compiled from
238           source, etc)
239
240       •   Describe the bug accurately and give a way to reproduce it.
241
242       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
243           into the bug report.
244
245
246
247guestfs-tools-1.47.2              2021-07-22                      virt-tail(1)
Impressum