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       --keys-from-stdin
100           Read key or passphrase parameters from stdin.  The default is to
101           try to read passphrases from the user by opening /dev/tty.
102
103       -m dev[:mountpoint[:options[:fstype]]]
104       --mount dev[:mountpoint[:options[:fstype]]]
105           Mount the named partition or logical volume on the given
106           mountpoint.
107
108           If the mountpoint is omitted, it defaults to /.
109
110           Specifying any mountpoint disables the inspection of the guest and
111           the mount of its root and all of its mountpoints, so make sure to
112           mount all the mountpoints needed to work with the filenames given
113           as arguments.
114
115           If you don’t know what filesystems a disk image contains, you can
116           either run guestfish without this option, then list the partitions,
117           filesystems and LVs available (see "list-partitions", "list-
118           filesystems" and "lvs" commands), or you can use the
119           virt-filesystems(1) program.
120
121           The third (and rarely used) part of the mount parameter is the list
122           of mount options used to mount the underlying filesystem.  If this
123           is not given, then the mount options are either the empty string or
124           "ro" (the latter if the --ro flag is used).  By specifying the
125           mount options, you override this default choice.  Probably the only
126           time you would use this is to enable ACLs and/or extended
127           attributes if the filesystem can support them:
128
129            -m /dev/sda1:/:acl,user_xattr
130
131           Using this flag is equivalent to using the "mount-options" command.
132
133           The fourth part of the parameter is the filesystem driver to use,
134           such as "ext3" or "ntfs". This is rarely needed, but can be useful
135           if multiple drivers are valid for a filesystem (eg: "ext2" and
136           "ext3"), or if libguestfs misidentifies a filesystem.
137
138       -v
139       --verbose
140           Enable verbose messages for debugging.
141
142       -V
143       --version
144           Display version number and exit.
145
146       -x  Enable tracing of libguestfs API calls.
147

LOG FILES

149       To list out the log files from guests, see the related tool
150       virt-log(1).  It understands binary log formats such as the systemd
151       journal.
152

WINDOWS PATHS

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

EXIT STATUS

175       This program returns 0 if successful, or non-zero if there was an
176       error.
177

SEE ALSO

179       guestfs(3), guestfish(1), virt-copy-out(1), virt-cat(1), virt-log(1),
180       virt-tar-out(1), tail(1), http://libguestfs.org/.
181

AUTHOR

183       Richard W.M. Jones http://people.redhat.com/~rjones/
184
186       Copyright (C) 2016 Red Hat Inc.
187

LICENSE

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

BUGS

204       To get a list of bugs against libguestfs, use this link:
205       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
206
207       To report a new bug against libguestfs, use this link:
208       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
209
210       When reporting a bug, please supply:
211
212       ·   The version of libguestfs.
213
214       ·   Where you got libguestfs (eg. which Linux distro, compiled from
215           source, etc)
216
217       ·   Describe the bug accurately and give a way to reproduce it.
218
219       ·   Run libguestfs-test-tool(1) and paste the complete, unedited output
220           into the bug report.
221
222
223
224libguestfs-1.38.2                 2018-05-15                      virt-tail(1)
Impressum