1virt-log(1) Virtualization Support virt-log(1)
2
3
4
6 virt-log - Display log files from a virtual machine
7
9 virt-log [--options] -d domname
10
11 virt-log [--options] -a disk.img [-a disk.img ...]
12
14 "virt-log" is a command line tool to display the log files from the
15 named virtual machine (or disk image).
16
17 This tool understands and displays both plain text log files (eg.
18 /var/log/messages) and binary formats such as the systemd journal.
19
20 To display other types of files, use virt-cat(1). To follow (tail)
21 text log files, use virt-tail(1). To copy files out of a virtual
22 machine, use virt-copy-out(1). To display the contents of the Windows
23 Registry, use virt-win-reg(1).
24
26 Display the complete logs from a guest:
27
28 virt-log -d mydomain | less
29
30 Find out what DHCP IP address a VM acquired:
31
32 virt-log -d mydomain | grep 'dhclient.*bound to'
33
35 --help
36 Display brief help.
37
38 -a file
39 --add file
40 Add file which should be a disk image from a virtual machine. If
41 the virtual machine has multiple block devices, you must supply all
42 of them with separate -a options.
43
44 The format of the disk image is auto-detected. To override this
45 and force a particular format use the --format=.. option.
46
47 -a URI
48 --add URI
49 Add a remote disk. See "ADDING REMOTE STORAGE" in guestfish(1).
50
51 -c URI
52 --connect URI
53 If using libvirt, connect to the given URI. If omitted, then we
54 connect to the default libvirt hypervisor.
55
56 If you specify guest block devices directly (-a), then libvirt is
57 not used at all.
58
59 -d guest
60 --domain guest
61 Add all the disks from the named libvirt guest. Domain UUIDs can
62 be used instead of names.
63
64 --echo-keys
65 When prompting for keys and passphrases, virt-log normally turns
66 echoing off so you cannot see what you are typing. If you are not
67 worried about Tempest attacks and there is no one else in the room
68 you can specify this flag to see what you are typing.
69
70 --format=raw|qcow2|..
71 --format
72 The default for the -a option is to auto-detect the format of the
73 disk image. Using this forces the disk format for -a options which
74 follow on the command line. Using --format with no argument
75 switches back to auto-detection for subsequent -a options.
76
77 For example:
78
79 virt-log --format=raw -a disk.img
80
81 forces raw format (no auto-detection) for disk.img.
82
83 virt-log --format=raw -a disk.img --format -a another.img
84
85 forces raw format (no auto-detection) for disk.img and reverts to
86 auto-detection for another.img.
87
88 If you have untrusted raw-format guest disk images, you should use
89 this option to specify the disk format. This avoids a possible
90 security problem with malicious guests (CVE-2010-3851).
91
92 --keys-from-stdin
93 Read key or passphrase parameters from stdin. The default is to
94 try to read passphrases from the user by opening /dev/tty.
95
96 -v
97 --verbose
98 Enable verbose messages for debugging.
99
100 -V
101 --version
102 Display version number and exit.
103
104 -x Enable tracing of libguestfs API calls.
105
107 This program returns 0 if successful, or non-zero if there was an
108 error.
109
111 guestfs(3), guestfish(1), virt-cat(1), virt-copy-out(1), virt-tail(1),
112 virt-tar-out(1), virt-win-reg(1), http://libguestfs.org/.
113
115 Richard W.M. Jones http://people.redhat.com/~rjones/
116
118 Copyright (C) 2010-2018 Red Hat Inc.
119
121 This program is free software; you can redistribute it and/or modify it
122 under the terms of the GNU General Public License as published by the
123 Free Software Foundation; either version 2 of the License, or (at your
124 option) any later version.
125
126 This program is distributed in the hope that it will be useful, but
127 WITHOUT ANY WARRANTY; without even the implied warranty of
128 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
129 General Public License for more details.
130
131 You should have received a copy of the GNU General Public License along
132 with this program; if not, write to the Free Software Foundation, Inc.,
133 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
134
136 To get a list of bugs against libguestfs, use this link:
137 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
138
139 To report a new bug against libguestfs, use this link:
140 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
141
142 When reporting a bug, please supply:
143
144 · The version of libguestfs.
145
146 · Where you got libguestfs (eg. which Linux distro, compiled from
147 source, etc)
148
149 · Describe the bug accurately and give a way to reproduce it.
150
151 · Run libguestfs-test-tool(1) and paste the complete, unedited output
152 into the bug report.
153
154
155
156libguestfs-1.38.2 2018-05-15 virt-log(1)