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

LOG FILES

160       To list out the log files from guests, see the related tool
161       virt-log(1).  It understands binary log formats such as the systemd
162       journal.
163

WINDOWS PATHS

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

EXIT STATUS

186       This program returns 0 if successful, or non-zero if there was an
187       error.
188

SEE ALSO

190       guestfs(3), guestfish(1), virt-copy-out(1), virt-cat(1), virt-log(1),
191       virt-tar-out(1), tail(1), http://libguestfs.org/.
192

AUTHOR

194       Richard W.M. Jones http://people.redhat.com/~rjones/
195
197       Copyright (C) 2016 Red Hat Inc.
198

LICENSE

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

BUGS

215       To get a list of bugs against libguestfs, use this link:
216       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
217
218       To report a new bug against libguestfs, use this link:
219       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
220
221       When reporting a bug, please supply:
222
223       ·   The version of libguestfs.
224
225       ·   Where you got libguestfs (eg. which Linux distro, compiled from
226           source, etc)
227
228       ·   Describe the bug accurately and give a way to reproduce it.
229
230       ·   Run libguestfs-test-tool(1) and paste the complete, unedited output
231           into the bug report.
232
233
234
235libguestfs-1.40.2                 2019-02-07                      virt-tail(1)
Impressum