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       -m dev[:mountpoint[:options[:fstype]]]
124       --mount dev[:mountpoint[:options[:fstype]]]
125           Mount the named partition or logical volume on the given
126           mountpoint.
127
128           If the mountpoint is omitted, it defaults to /.
129
130           Specifying any mountpoint disables the inspection of the guest and
131           the mount of its root and all of its mountpoints, so make sure to
132           mount all the mountpoints needed to work with the filenames given
133           as arguments.
134
135           If you don’t know what filesystems a disk image contains, you can
136           either run guestfish without this option, then list the partitions,
137           filesystems and LVs available (see "list-partitions", "list-
138           filesystems" and "lvs" commands), or you can use the
139           virt-filesystems(1) program.
140
141           The third (and rarely used) part of the mount parameter is the list
142           of mount options used to mount the underlying filesystem.  If this
143           is not given, then the mount options are either the empty string or
144           "ro" (the latter if the --ro flag is used).  By specifying the
145           mount options, you override this default choice.  Probably the only
146           time you would use this is to enable ACLs and/or extended
147           attributes if the filesystem can support them:
148
149            -m /dev/sda1:/:acl,user_xattr
150
151           Using this flag is equivalent to using the "mount-options" command.
152
153           The fourth part of the parameter is the filesystem driver to use,
154           such as "ext3" or "ntfs". This is rarely needed, but can be useful
155           if multiple drivers are valid for a filesystem (eg: "ext2" and
156           "ext3"), or if libguestfs misidentifies a filesystem.
157
158       -v
159       --verbose
160           Enable verbose messages for debugging.
161
162       -V
163       --version
164           Display version number and exit.
165
166       -x  Enable tracing of libguestfs API calls.
167

LOG FILES

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

WINDOWS PATHS

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

EXIT STATUS

195       This program returns 0 if successful, or non-zero if there was an
196       error.
197

SEE ALSO

199       guestfs(3), guestfish(1), virt-copy-out(1), virt-cat(1), virt-log(1),
200       virt-tar-out(1), tail(1), http://libguestfs.org/.
201

AUTHOR

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

LICENSE

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

BUGS

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