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           --key "ID":clevis
120               Attempt passphrase-less unlocking for "ID" with Clevis, over
121               the network.  Please refer to "ENCRYPTED DISKS" in guestfs(3)
122               for more information on network-bound disk encryption (NBDE).
123
124               Note that if any such option is present on the command line,
125               QEMU user networking will be automatically enabled for the
126               libguestfs appliance.
127
128       --keys-from-stdin
129           Read key or passphrase parameters from stdin.  The default is to
130           try to read passphrases from the user by opening /dev/tty.
131
132           If there are multiple encrypted devices then you may need to supply
133           multiple keys on stdin, one per line.
134
135       -m dev[:mountpoint[:options[:fstype]]]
136       --mount dev[:mountpoint[:options[:fstype]]]
137           Mount the named partition or logical volume on the given
138           mountpoint.
139
140           If the mountpoint is omitted, it defaults to /.
141
142           Specifying any mountpoint disables the inspection of the guest and
143           the mount of its root and all of its mountpoints, so make sure to
144           mount all the mountpoints needed to work with the filenames given
145           as arguments.
146
147           If you don’t know what filesystems a disk image contains, you can
148           either run guestfish without this option, then list the partitions,
149           filesystems and LVs available (see "list-partitions", "list-
150           filesystems" and "lvs" commands), or you can use the
151           virt-filesystems(1) program.
152
153           The third (and rarely used) part of the mount parameter is the list
154           of mount options used to mount the underlying filesystem.  If this
155           is not given, then the mount options are either the empty string or
156           "ro" (the latter if the --ro flag is used).  By specifying the
157           mount options, you override this default choice.  Probably the only
158           time you would use this is to enable ACLs and/or extended
159           attributes if the filesystem can support them:
160
161            -m /dev/sda1:/:acl,user_xattr
162
163           Using this flag is equivalent to using the "mount-options" command.
164
165           The fourth part of the parameter is the filesystem driver to use,
166           such as "ext3" or "ntfs". This is rarely needed, but can be useful
167           if multiple drivers are valid for a filesystem (eg: "ext2" and
168           "ext3"), or if libguestfs misidentifies a filesystem.
169
170       -v
171       --verbose
172           Enable verbose messages for debugging.
173
174       -V
175       --version
176           Display version number and exit.
177
178       -x  Enable tracing of libguestfs API calls.
179

LOG FILES

181       To list out the log files from guests, see the related tool
182       virt-log(1).  It understands binary log formats such as the systemd
183       journal.
184

WINDOWS PATHS

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

EXIT STATUS

207       This program returns 0 if successful, or non-zero if there was an
208       error.
209

SEE ALSO

211       guestfs(3), guestfish(1), virt-copy-out(1), virt-cat(1), virt-log(1),
212       virt-tar-out(1), tail(1), http://libguestfs.org/.
213

AUTHOR

215       Richard W.M. Jones http://people.redhat.com/~rjones/
216
218       Copyright (C) 2016 Red Hat Inc.
219

LICENSE

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

BUGS

236       To get a list of bugs against libguestfs, use this link:
237       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
238
239       To report a new bug against libguestfs, use this link:
240       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
241
242       When reporting a bug, please supply:
243
244       •   The version of libguestfs.
245
246       •   Where you got libguestfs (eg. which Linux distro, compiled from
247           source, etc)
248
249       •   Describe the bug accurately and give a way to reproduce it.
250
251       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
252           into the bug report.
253
254
255
256guestfs-tools-1.50.1              2023-04-06                      virt-tail(1)
Impressum