119ede4c19ccc2e98f6961ec384de2636b6ce3aa
[virt-mem.git] / virt-mem.txt
1 NAME
2     virt-uname - system information for virtual machines
3
4     virt-dmesg - print kernel messages for virtual machines
5
6 SUMMARY
7     virt-uname [-options] [domains...]
8
9     virt-dmesg [-options] [domains...]
10
11 DESCRIPTION
12     These virtualization tools allow you to inspect the status of virtual
13     machines running Linux.
14
15     The tools all use libvirt so are capable of showing stats across a
16     variety of different virtualization systems.
17
18 COMMON OPTIONS
19     -c uri, --connect uri
20         Connect to libvirt URI. The default is to connect to the default
21         libvirt URI, normally Xen.
22
23     --csv
24         Print the results in CSV format, suitable for importing into a
25         spreadsheet or database.
26
27         This option is only supported if virt-mem was built with CSV
28         support.
29
30     --debug
31         Emit debugging information on stderr. Please supply this if you
32         report a bug.
33
34     --help
35         Display usage summary.
36
37     -t memoryimage
38         Test mode. Instead of checking libvirt for domain information, this
39         runs the virt-mem tool directly on the memory image supplied. You
40         may specify the -t option multiple times.
41
42     --version
43         Display version and exit.
44
45     -E auto|littleendian|bigendian
46     -T auto|i386|x86-64|*address*
47     -W auto|32|64
48         These options force the endianness, text address, and word size for
49         the subsequent domains listed on the command line (or if no domains
50         are listed, then for all domains).
51
52         These default to *auto* which tries to do automatic detection (using
53         libvirt, or details from the memory images themselves). You only
54         need to use these options if virt-mem tools get the automatic
55         detection wrong.
56
57         Endianness (*-E*) sets the memory endianness, for data, pointers and
58         so on.
59
60         Text address (*-T*) sets the base address of the kernel image. *-T
61         i386* means to try some common addresses for i386-based kernels. *-T
62         x86-64* means to try some common addresses for x86-64-based kernels.
63         *-T *address** sets the address specifically (*0x* prefix is allowed
64         to specify hex addresses).
65
66         Word size (*-W*) sets the word size, 32 or 64 bits.
67
68     -A auto|i386|x86-64|...
69         This option sets the architecture to one of a collection of known
70         architectures. It is equivalent to setting endianness and wordsize
71         in one go, but not text address.
72
73 EXAMPLES
74      # virt-uname
75      f9x32kvm: Linux localhost.localdomain 2.6.24-0.155.rc7.git6.fc9 #1
76      SMP Tue Jan 15 17:52:31 EST 2008 i686 (none)
77
78      # virt-dmesg f9x32kvm | tail
79      <6>Bluetooth: Core ver 2.11
80      <6>NET: Registered protocol family 31
81      <6>Bluetooth: HCI device and connection manager initialized
82      <6>Bluetooth: HCI socket layer initialized
83      <6>Bluetooth: L2CAP ver 2.9
84      <6>Bluetooth: L2CAP socket layer initialized
85      <6>Bluetooth: RFCOMM socket layer initialized
86      <6>Bluetooth: RFCOMM TTY layer initialized
87      <6>Bluetooth: RFCOMM ver 1.8
88      <7>eth0: no IPv6 routers present
89
90 SHORTCOMINGS
91     The virt-mem tools spy on the guest's memory image. There are some
92     shortcomings to this, described here.
93
94     (1) Only works on specific, tested releases of Linux kernels. Support
95     for arbitrary Linux kernel versions may be patchy because of changes in
96     the internal structures used. Support for non-Linux kernels is currently
97     non-existent, and probably impossible for Windows because of lack of an
98     acceptable source license.
99
100     (2) Heuristics are used which may mean in the worst case that the output
101     is wrong.
102
103     (3) Structures which are frequently modified may cause errors. This
104     could be a problem if, for example, the process table in the guest is
105     being rapidly updated.
106
107     (4) We have to scan memory to find kernel symbols, etc., which can be
108     quite slow. Optimizing the memory scanner would help, and caching the
109     base address of the symbol table(s) would make it dramatically faster.
110
111 SECURITY
112     The current code tries hard to be secure against malicious guests, for
113     example guests which set up malicious kernel memory.
114
115 SEE ALSO
116     uname(1),dmesg(1), virsh(1), xm(1), <http://www.libvirt.org/ocaml/>,
117     <http://www.libvirt.org/>, <http://et.redhat.com/~rjones/>,
118     <http://caml.inria.fr/>
119
120 AUTHORS
121     Richard W.M. Jones <rjones @ redhat . com>
122
123 COPYRIGHT
124     (C) Copyright 2008 Red Hat Inc., Richard W.M. Jones http://libvirt.org/
125
126     This program is free software; you can redistribute it and/or modify it
127     under the terms of the GNU General Public License as published by the
128     Free Software Foundation; either version 2 of the License, or (at your
129     option) any later version.
130
131     This program is distributed in the hope that it will be useful, but
132     WITHOUT ANY WARRANTY; without even the implied warranty of
133     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
134     Public License for more details.
135
136     You should have received a copy of the GNU General Public License along
137     with this program; if not, write to the Free Software Foundation, Inc.,
138     675 Mass Ave, Cambridge, MA 02139, USA.
139
140 REPORTING BUGS
141     Bugs can be viewed on the Red Hat Bugzilla page:
142     <https://bugzilla.redhat.com/>.
143
144     If you find a bug in virt-mem, please follow these steps to report it:
145
146     1. Check for existing bug reports
147         Go to <https://bugzilla.redhat.com/> and search for similar bugs.
148         Someone may already have reported the same bug, and they may even
149         have fixed it.
150
151     2. Capture debug and error messages
152         Run
153
154          virt-[program] --debug > virt-mem.log 2>&1
155
156         and keep *virt-mem.log*. It contains error messages which you should
157         submit with your bug report.
158
159     3. Get version of virt-mem and version of libvirt.
160         Run
161
162          virt-[program] --version
163
164     4. Submit a bug report.
165         Go to <https://bugzilla.redhat.com/> and enter a new bug. Please
166         describe the problem in as much detail as possible.
167
168         Remember to include the version numbers (step 3) and the debug
169         messages file (step 2).
170
171     5. Assign the bug to rjones @ redhat.com
172         Assign or reassign the bug to rjones @ redhat.com (without the
173         spaces). You can also send me an email with the bug number if you
174         want a faster response.
175