1virt-tail(1) Virtualization Support virt-tail(1)
2
3
4
6 virt-tail - Follow (tail) files in a virtual machine
7
9 virt-tail [--options] -d domname file [file ...]
10
11 virt-tail [--options] -a disk.img [-a disk.img ...] file [file ...]
12
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
32 Follow /var/log/messages inside a virtual machine called "mydomain":
33
34 virt-tail -d mydomain /var/log/messages
35
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.
111
112 --key NAME:key:KEY_STRING
113 --key UUID:key:KEY_STRING
114 --key all:key:KEY_STRING
115 "NAME" is the libguestfs device name (eg. "/dev/sda1"). "UUID"
116 is the device UUID. "all" means try the key against any
117 encrypted device.
118
119 Use the specified "KEY_STRING" as passphrase.
120
121 --key NAME:file:FILENAME
122 --key UUID:file:FILENAME
123 --key all:file:FILENAME
124 Read the passphrase from FILENAME.
125
126 --key NAME:clevis
127 --key UUID:clevis
128 --key all:clevis
129 Attempt passphrase-less unlocking for the device with Clevis,
130 over the network. Please refer to "ENCRYPTED DISKS" in
131 guestfs(3) for more information on network-bound disk
132 encryption (NBDE).
133
134 Note that if any such option is present on the command line,
135 QEMU user networking will be automatically enabled for the
136 libguestfs appliance.
137
138 --keys-from-stdin
139 Read key or passphrase parameters from stdin. The default is to
140 try to read passphrases from the user by opening /dev/tty.
141
142 If there are multiple encrypted devices then you may need to supply
143 multiple keys on stdin, one per line.
144
145 -m dev[:mountpoint[:options[:fstype]]]
146 --mount dev[:mountpoint[:options[:fstype]]]
147 Mount the named partition or logical volume on the given
148 mountpoint.
149
150 If the mountpoint is omitted, it defaults to /.
151
152 Specifying any mountpoint disables the inspection of the guest and
153 the mount of its root and all of its mountpoints, so make sure to
154 mount all the mountpoints needed to work with the filenames given
155 as arguments.
156
157 If you don’t know what filesystems a disk image contains, you can
158 either run guestfish without this option, then list the partitions,
159 filesystems and LVs available (see "list-partitions", "list-
160 filesystems" and "lvs" commands), or you can use the
161 virt-filesystems(1) program.
162
163 The third (and rarely used) part of the mount parameter is the list
164 of mount options used to mount the underlying filesystem. If this
165 is not given, then the mount options are either the empty string or
166 "ro" (the latter if the --ro flag is used). By specifying the
167 mount options, you override this default choice. Probably the only
168 time you would use this is to enable ACLs and/or extended
169 attributes if the filesystem can support them:
170
171 -m /dev/sda1:/:acl,user_xattr
172
173 Using this flag is equivalent to using the "mount-options" command.
174
175 The fourth part of the parameter is the filesystem driver to use,
176 such as "ext3" or "ntfs". This is rarely needed, but can be useful
177 if multiple drivers are valid for a filesystem (eg: "ext2" and
178 "ext3"), or if libguestfs misidentifies a filesystem.
179
180 -v
181 --verbose
182 Enable verbose messages for debugging.
183
184 -V
185 --version
186 Display version number and exit.
187
188 -x Enable tracing of libguestfs API calls.
189
191 To list out the log files from guests, see the related tool
192 virt-log(1). It understands binary log formats such as the systemd
193 journal.
194
196 "virt-tail" has a limited ability to understand Windows drive letters
197 and paths (eg. E:\foo\bar.txt).
198
199 If and only if the guest is running Windows then:
200
201 • Drive letter prefixes like "C:" are resolved against the Windows
202 Registry to the correct filesystem.
203
204 • Any backslash ("\") characters in the path are replaced with
205 forward slashes so that libguestfs can process it.
206
207 • The path is resolved case insensitively to locate the file that
208 should be displayed.
209
210 There are some known shortcomings:
211
212 • Some NTFS symbolic links may not be followed correctly.
213
214 • NTFS junction points that cross filesystems are not followed.
215
217 This program returns 0 if successful, or non-zero if there was an
218 error.
219
221 guestfs(3), guestfish(1), virt-copy-out(1), virt-cat(1), virt-log(1),
222 virt-tar-out(1), tail(1), http://libguestfs.org/.
223
225 Richard W.M. Jones http://people.redhat.com/~rjones/
226
228 Copyright (C) 2016 Red Hat Inc.
229
231 This program is free software; you can redistribute it and/or modify it
232 under the terms of the GNU General Public License as published by the
233 Free Software Foundation; either version 2 of the License, or (at your
234 option) any later version.
235
236 This program is distributed in the hope that it will be useful, but
237 WITHOUT ANY WARRANTY; without even the implied warranty of
238 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
239 General Public License for more details.
240
241 You should have received a copy of the GNU General Public License along
242 with this program; if not, write to the Free Software Foundation, Inc.,
243 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
244
246 To get a list of bugs against libguestfs, use this link:
247 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
248
249 To report a new bug against libguestfs, use this link:
250 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
251
252 When reporting a bug, please supply:
253
254 • The version of libguestfs.
255
256 • Where you got libguestfs (eg. which Linux distro, compiled from
257 source, etc)
258
259 • Describe the bug accurately and give a way to reproduce it.
260
261 • Run libguestfs-test-tool(1) and paste the complete, unedited output
262 into the bug report.
263
264
265
266guestfs-tools-1.51.6 2023-12-09 virt-tail(1)