~ahs3/+junk/cq-qemu

« back to all changes in this revision

Viewing changes to qemu-monitor.texi

  • Committer: Al Stone
  • Date: 2012-02-09 01:17:20 UTC
  • Revision ID: albert.stone@canonical.com-20120209011720-tztl7ik3qayz80p4
first commit to bzr for qemu

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@table @option
 
2
@item help or ? [@var{cmd}]
 
3
@findex help
 
4
Show the help for all commands or just for command @var{cmd}.
 
5
@item commit
 
6
@findex commit
 
7
Commit changes to the disk images (if -snapshot is used) or backing files.
 
8
@item q or quit
 
9
@findex quit
 
10
Quit the emulator.
 
11
@item block_resize
 
12
@findex block_resize
 
13
Resize a block image while a guest is running.  Usually requires guest
 
14
action to see the updated size.  Resize to a lower size is supported,
 
15
but should be used with extreme caution.  Note that this command only
 
16
resizes image files, it can not resize block devices like LVM volumes.
 
17
@item eject [-f] @var{device}
 
18
@findex eject
 
19
Eject a removable medium (use -f to force it).
 
20
@item drive_del @var{device}
 
21
@findex drive_del
 
22
Remove host block device.  The result is that guest generated IO is no longer
 
23
submitted against the host device underlying the disk.  Once a drive has
 
24
been deleted, the QEMU Block layer returns -EIO which results in IO
 
25
errors in the guest for applications that are reading/writing to the device.
 
26
@item change @var{device} @var{setting}
 
27
@findex change
 
28
 
 
29
Change the configuration of a device.
 
30
 
 
31
@table @option
 
32
@item change @var{diskdevice} @var{filename} [@var{format}]
 
33
Change the medium for a removable disk device to point to @var{filename}. eg
 
34
 
 
35
@example
 
36
(qemu) change ide1-cd0 /path/to/some.iso
 
37
@end example
 
38
 
 
39
@var{format} is optional.
 
40
 
 
41
@item change vnc @var{display},@var{options}
 
42
Change the configuration of the VNC server. The valid syntax for @var{display}
 
43
and @var{options} are described at @ref{sec_invocation}. eg
 
44
 
 
45
@example
 
46
(qemu) change vnc localhost:1
 
47
@end example
 
48
 
 
49
@item change vnc password [@var{password}]
 
50
 
 
51
Change the password associated with the VNC server. If the new password is not
 
52
supplied, the monitor will prompt for it to be entered. VNC passwords are only
 
53
significant up to 8 letters. eg
 
54
 
 
55
@example
 
56
(qemu) change vnc password
 
57
Password: ********
 
58
@end example
 
59
 
 
60
@end table
 
61
@item screendump @var{filename}
 
62
@findex screendump
 
63
Save screen into PPM image @var{filename}.
 
64
@item logfile @var{filename}
 
65
@findex logfile
 
66
Output logs to @var{filename}.
 
67
@item trace-event
 
68
@findex trace-event
 
69
changes status of a trace event
 
70
@item trace-file on|off|flush
 
71
@findex trace-file
 
72
Open, close, or flush the trace file.  If no argument is given, the status of the trace file is displayed.
 
73
@item log @var{item1}[,...]
 
74
@findex log
 
75
Activate logging of the specified items to @file{/tmp/qemu.log}.
 
76
@item savevm [@var{tag}|@var{id}]
 
77
@findex savevm
 
78
Create a snapshot of the whole virtual machine. If @var{tag} is
 
79
provided, it is used as human readable identifier. If there is already
 
80
a snapshot with the same tag or ID, it is replaced. More info at
 
81
@ref{vm_snapshots}.
 
82
@item loadvm @var{tag}|@var{id}
 
83
@findex loadvm
 
84
Set the whole virtual machine to the snapshot identified by the tag
 
85
@var{tag} or the unique snapshot ID @var{id}.
 
86
@item delvm @var{tag}|@var{id}
 
87
@findex delvm
 
88
Delete the snapshot identified by @var{tag} or @var{id}.
 
89
@item singlestep [off]
 
90
@findex singlestep
 
91
Run the emulation in single step mode.
 
92
If called with option off, the emulation returns to normal mode.
 
93
@item stop
 
94
@findex stop
 
95
Stop emulation.
 
96
@item c or cont
 
97
@findex cont
 
98
Resume emulation.
 
99
@item gdbserver [@var{port}]
 
100
@findex gdbserver
 
101
Start gdbserver session (default @var{port}=1234)
 
102
@item x/fmt @var{addr}
 
103
@findex x
 
104
Virtual memory dump starting at @var{addr}.
 
105
@item xp /@var{fmt} @var{addr}
 
106
@findex xp
 
107
Physical memory dump starting at @var{addr}.
 
108
 
 
109
@var{fmt} is a format which tells the command how to format the
 
110
data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
 
111
 
 
112
@table @var
 
113
@item count
 
114
is the number of items to be dumped.
 
115
 
 
116
@item format
 
117
can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
 
118
c (char) or i (asm instruction).
 
119
 
 
120
@item size
 
121
can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
 
122
@code{h} or @code{w} can be specified with the @code{i} format to
 
123
respectively select 16 or 32 bit code instruction size.
 
124
 
 
125
@end table
 
126
 
 
127
Examples:
 
128
@itemize
 
129
@item
 
130
Dump 10 instructions at the current instruction pointer:
 
131
@example
 
132
(qemu) x/10i $eip
 
133
0x90107063:  ret
 
134
0x90107064:  sti
 
135
0x90107065:  lea    0x0(%esi,1),%esi
 
136
0x90107069:  lea    0x0(%edi,1),%edi
 
137
0x90107070:  ret
 
138
0x90107071:  jmp    0x90107080
 
139
0x90107073:  nop
 
140
0x90107074:  nop
 
141
0x90107075:  nop
 
142
0x90107076:  nop
 
143
@end example
 
144
 
 
145
@item
 
146
Dump 80 16 bit values at the start of the video memory.
 
147
@smallexample
 
148
(qemu) xp/80hx 0xb8000
 
149
0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
 
150
0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
 
151
0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
 
152
0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
 
153
0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
 
154
0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
 
155
0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
 
156
0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
 
157
0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
 
158
0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
 
159
@end smallexample
 
160
@end itemize
 
161
@item p or print/@var{fmt} @var{expr}
 
162
@findex print
 
163
 
 
164
Print expression value. Only the @var{format} part of @var{fmt} is
 
165
used.
 
166
Read I/O port.
 
167
Write to I/O port.
 
168
@item sendkey @var{keys}
 
169
@findex sendkey
 
170
 
 
171
Send @var{keys} to the emulator. @var{keys} could be the name of the
 
172
key or @code{#} followed by the raw value in either decimal or hexadecimal
 
173
format. Use @code{-} to press several keys simultaneously. Example:
 
174
@example
 
175
sendkey ctrl-alt-f1
 
176
@end example
 
177
 
 
178
This command is useful to send keys that your graphical user interface
 
179
intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
 
180
@item system_reset
 
181
@findex system_reset
 
182
 
 
183
Reset the system.
 
184
@item system_powerdown
 
185
@findex system_powerdown
 
186
 
 
187
Power down the system (if supported).
 
188
@item sum @var{addr} @var{size}
 
189
@findex sum
 
190
 
 
191
Compute the checksum of a memory region.
 
192
@item usb_add @var{devname}
 
193
@findex usb_add
 
194
 
 
195
Add the USB device @var{devname}.  For details of available devices see
 
196
@ref{usb_devices}
 
197
@item usb_del @var{devname}
 
198
@findex usb_del
 
199
 
 
200
Remove the USB device @var{devname} from the QEMU virtual USB
 
201
hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
 
202
command @code{info usb} to see the devices you can remove.
 
203
@item device_add @var{config}
 
204
@findex device_add
 
205
 
 
206
Add device.
 
207
@item device_del @var{id}
 
208
@findex device_del
 
209
 
 
210
Remove device @var{id}.
 
211
@item cpu @var{index}
 
212
@findex cpu
 
213
Set the default CPU.
 
214
@item mouse_move @var{dx} @var{dy} [@var{dz}]
 
215
@findex mouse_move
 
216
Move the active mouse to the specified coordinates @var{dx} @var{dy}
 
217
with optional scroll axis @var{dz}.
 
218
@item mouse_button @var{val}
 
219
@findex mouse_button
 
220
Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
 
221
@item mouse_set @var{index}
 
222
@findex mouse_set
 
223
Set which mouse device receives events at given @var{index}, index
 
224
can be obtained with
 
225
@example
 
226
info mice
 
227
@end example
 
228
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
 
229
@findex wavcapture
 
230
Capture audio into @var{filename}. Using sample rate @var{frequency}
 
231
bits per sample @var{bits} and number of channels @var{channels}.
 
232
 
 
233
Defaults:
 
234
@itemize @minus
 
235
@item Sample rate = 44100 Hz - CD quality
 
236
@item Bits = 16
 
237
@item Number of channels = 2 - Stereo
 
238
@end itemize
 
239
@item stopcapture @var{index}
 
240
@findex stopcapture
 
241
Stop capture with a given @var{index}, index can be obtained with
 
242
@example
 
243
info capture
 
244
@end example
 
245
@item memsave @var{addr} @var{size} @var{file}
 
246
@findex memsave
 
247
save to disk virtual memory dump starting at @var{addr} of size @var{size}.
 
248
@item pmemsave @var{addr} @var{size} @var{file}
 
249
@findex pmemsave
 
250
save to disk physical memory dump starting at @var{addr} of size @var{size}.
 
251
@item boot_set @var{bootdevicelist}
 
252
@findex boot_set
 
253
 
 
254
Define new values for the boot device list. Those values will override
 
255
the values specified on the command line through the @code{-boot} option.
 
256
 
 
257
The values that can be specified here depend on the machine type, but are
 
258
the same that can be specified in the @code{-boot} command line option.
 
259
@item nmi @var{cpu}
 
260
@findex nmi
 
261
Inject an NMI on the given CPU (x86 only).
 
262
@item migrate [-d] [-b] [-i] @var{uri}
 
263
@findex migrate
 
264
Migrate to @var{uri} (using -d to not wait for completion).
 
265
-b for migration with full copy of disk
 
266
-i for migration with incremental copy of disk (base image is shared)
 
267
@item migrate_cancel
 
268
@findex migrate_cancel
 
269
Cancel the current VM migration.
 
270
@item migrate_set_speed @var{value}
 
271
@findex migrate_set_speed
 
272
Set maximum speed to @var{value} (in bytes) for migrations.
 
273
@item migrate_set_downtime @var{second}
 
274
@findex migrate_set_downtime
 
275
Set maximum tolerated downtime (in seconds) for migration.
 
276
@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
 
277
@findex client_migrate_info
 
278
Set the spice/vnc connection info for the migration target.  The spice/vnc
 
279
server will ask the spice/vnc client to automatically reconnect using the
 
280
new parameters (if specified) once the vm migration finished successfully.
 
281
@item snapshot_blkdev
 
282
@findex snapshot_blkdev
 
283
Snapshot device, using snapshot file as target if provided
 
284
@item drive_add
 
285
@findex drive_add
 
286
Add drive to PCI storage controller.
 
287
@item pci_add
 
288
@findex pci_add
 
289
Hot-add PCI device.
 
290
@item pci_del
 
291
@findex pci_del
 
292
Hot remove PCI device.
 
293
@item pcie_aer_inject_error
 
294
@findex pcie_aer_inject_error
 
295
Inject PCIe AER error
 
296
@item host_net_add
 
297
@findex host_net_add
 
298
Add host VLAN client.
 
299
@item host_net_remove
 
300
@findex host_net_remove
 
301
Remove host VLAN client.
 
302
@item netdev_add
 
303
@findex netdev_add
 
304
Add host network device.
 
305
@item netdev_del
 
306
@findex netdev_del
 
307
Remove host network device.
 
308
@item hostfwd_add
 
309
@findex hostfwd_add
 
310
Redirect TCP or UDP connections from host to guest (requires -net user).
 
311
@item hostfwd_remove
 
312
@findex hostfwd_remove
 
313
Remove host-to-guest TCP or UDP redirection.
 
314
@item balloon @var{value}
 
315
@findex balloon
 
316
Request VM to change its memory allocation to @var{value} (in MB).
 
317
@item set_link @var{name} [on|off]
 
318
@findex set_link
 
319
Switch link @var{name} on (i.e. up) or off (i.e. down).
 
320
@item watchdog_action
 
321
@findex watchdog_action
 
322
Change watchdog action.
 
323
@item acl_show @var{aclname}
 
324
@findex acl_show
 
325
List all the matching rules in the access control list, and the default
 
326
policy. There are currently two named access control lists,
 
327
@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
 
328
certificate distinguished name, and SASL username respectively.
 
329
@item acl_policy @var{aclname} @code{allow|deny}
 
330
@findex acl_policy
 
331
Set the default access control list policy, used in the event that
 
332
none of the explicit rules match. The default policy at startup is
 
333
always @code{deny}.
 
334
@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
 
335
@findex acl_add
 
336
Add a match rule to the access control list, allowing or denying access.
 
337
The match will normally be an exact username or x509 distinguished name,
 
338
but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
 
339
allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
 
340
normally be appended to the end of the ACL, but can be inserted
 
341
earlier in the list if the optional @var{index} parameter is supplied.
 
342
@item acl_remove @var{aclname} @var{match}
 
343
@findex acl_remove
 
344
Remove the specified match rule from the access control list.
 
345
@item acl_reset @var{aclname}
 
346
@findex acl_reset
 
347
Remove all matches from the access control list, and set the default
 
348
policy back to @code{deny}.
 
349
@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
 
350
@findex mce (x86)
 
351
Inject an MCE on the given CPU (x86 only).
 
352
@item getfd @var{fdname}
 
353
@findex getfd
 
354
If a file descriptor is passed alongside this command using the SCM_RIGHTS
 
355
mechanism on unix sockets, it is stored using the name @var{fdname} for
 
356
later use by other monitor commands.
 
357
@item closefd @var{fdname}
 
358
@findex closefd
 
359
Close the file descriptor previously assigned to @var{fdname} using the
 
360
@code{getfd} command. This is only needed if the file descriptor was never
 
361
used by another monitor command.
 
362
@item block_passwd @var{device} @var{password}
 
363
@findex block_passwd
 
364
Set the encrypted device @var{device} password to @var{password}
 
365
@item set_password [ vnc | spice ] password [ action-if-connected ]
 
366
@findex set_password
 
367
 
 
368
Change spice/vnc password.  Use zero to make the password stay valid
 
369
forever.  @var{action-if-connected} specifies what should happen in
 
370
case a connection is established: @var{fail} makes the password change
 
371
fail.  @var{disconnect} changes the password and disconnects the
 
372
client.  @var{keep} changes the password and keeps the connection up.
 
373
@var{keep} is the default.
 
374
@item expire_password [ vnc | spice ] expire-time
 
375
@findex expire_password
 
376
 
 
377
Specify when a password for spice/vnc becomes
 
378
invalid. @var{expire-time} accepts:
 
379
 
 
380
@table @var
 
381
@item now
 
382
Invalidate password instantly.
 
383
 
 
384
@item never
 
385
Password stays valid forever.
 
386
 
 
387
@item +nsec
 
388
Password stays valid for @var{nsec} seconds starting now.
 
389
 
 
390
@item nsec
 
391
Password is invalidated at the given time.  @var{nsec} are the seconds
 
392
passed since 1970, i.e. unix epoch.
 
393
 
 
394
@end table
 
395
@item info @var{subcommand}
 
396
@findex info
 
397
Show various information about the system state.
 
398
 
 
399
@table @option
 
400
@item info version
 
401
show the version of QEMU
 
402
@item info network
 
403
show the various VLANs and the associated devices
 
404
@item info chardev
 
405
show the character devices
 
406
@item info block
 
407
show the block devices
 
408
@item info blockstats
 
409
show block device statistics
 
410
@item info registers
 
411
show the cpu registers
 
412
@item info cpus
 
413
show infos for each CPU
 
414
@item info history
 
415
show the command line history
 
416
@item info irq
 
417
show the interrupts statistics (if available)
 
418
@item info pic
 
419
show i8259 (PIC) state
 
420
@item info pci
 
421
show emulated PCI device info
 
422
@item info tlb
 
423
show virtual to physical memory mappings (i386, SH4, SPARC, and PPC only)
 
424
@item info mem
 
425
show the active virtual memory mappings (i386 only)
 
426
@item info jit
 
427
show dynamic compiler info
 
428
@item info numa
 
429
show NUMA information
 
430
@item info kvm
 
431
show KVM information
 
432
@item info usb
 
433
show USB devices plugged on the virtual USB hub
 
434
@item info usbhost
 
435
show all USB host devices
 
436
@item info profile
 
437
show profiling information
 
438
@item info capture
 
439
show information about active capturing
 
440
@item info snapshots
 
441
show list of VM snapshots
 
442
@item info status
 
443
show the current VM status (running|paused)
 
444
@item info pcmcia
 
445
show guest PCMCIA status
 
446
@item info mice
 
447
show which guest mouse is receiving events
 
448
@item info vnc
 
449
show the vnc server status
 
450
@item info name
 
451
show the current VM name
 
452
@item info uuid
 
453
show the current VM UUID
 
454
@item info cpustats
 
455
show CPU statistics
 
456
@item info usernet
 
457
show user network stack connection states
 
458
@item info migrate
 
459
show migration status
 
460
@item info balloon
 
461
show balloon information
 
462
@item info qtree
 
463
show device tree
 
464
@item info qdm
 
465
show qdev device model list
 
466
@item info roms
 
467
show roms
 
468
@end table
 
469
@item info trace
 
470
show contents of trace buffer
 
471
@item info trace-events
 
472
show available trace events and their state
 
473
@end table