Statistics
| Branch: | Revision:

root / qemu-monitor.hx @ c3d420ea

History | View | Annotate | Download (30.2 kB)

1
HXCOMM Use DEFHEADING() to define headings in both help text and texi
2
HXCOMM Text between STEXI and ETEXI are copied to texi version and
3
HXCOMM discarded from C version
4
HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5
HXCOMM monitor commands
6
HXCOMM HXCOMM can be used for comments, discarded from both texi and C
7

    
8
STEXI
9
@table @option
10
ETEXI
11

    
12
    {
13
        .name       = "help|?",
14
        .args_type  = "name:s?",
15
        .params     = "[cmd]",
16
        .help       = "show the help",
17
        .mhandler.cmd = do_help_cmd,
18
    },
19

    
20
STEXI
21
@item help or ? [@var{cmd}]
22
@findex help
23
Show the help for all commands or just for command @var{cmd}.
24
ETEXI
25

    
26
    {
27
        .name       = "commit",
28
        .args_type  = "device:B",
29
        .params     = "device|all",
30
        .help       = "commit changes to the disk images (if -snapshot is used) or backing files",
31
        .mhandler.cmd = do_commit,
32
    },
33

    
34
STEXI
35
@item commit
36
@findex commit
37
Commit changes to the disk images (if -snapshot is used) or backing files.
38
ETEXI
39

    
40
    {
41
        .name       = "info",
42
        .args_type  = "item:s?",
43
        .params     = "[subcommand]",
44
        .help       = "show various information about the system state",
45
        .user_print = monitor_user_noop,
46
        .mhandler.cmd_new = do_info,
47
    },
48

    
49
STEXI
50
@item info @var{subcommand}
51
@findex info
52
Show various information about the system state.
53

    
54
@table @option
55
@item info version
56
show the version of QEMU
57
@item info commands
58
list QMP available commands
59
@item info network
60
show the various VLANs and the associated devices
61
@item info chardev
62
show the character devices
63
@item info block
64
show the block devices
65
@item info blockstats
66
show block device statistics
67
@item info registers
68
show the cpu registers
69
@item info cpus
70
show infos for each CPU
71
@item info history
72
show the command line history
73
@item info irq
74
show the interrupts statistics (if available)
75
@item info pic
76
show i8259 (PIC) state
77
@item info pci
78
show emulated PCI device info
79
@item info tlb
80
show virtual to physical memory mappings (i386 only)
81
@item info mem
82
show the active virtual memory mappings (i386 only)
83
@item info hpet
84
show state of HPET (i386 only)
85
@item info jit
86
show dynamic compiler info
87
@item info kvm
88
show KVM information
89
@item info numa
90
show NUMA information
91
@item info usb
92
show USB devices plugged on the virtual USB hub
93
@item info usbhost
94
show all USB host devices
95
@item info profile
96
show profiling information
97
@item info capture
98
show information about active capturing
99
@item info snapshots
100
show list of VM snapshots
101
@item info status
102
show the current VM status (running|paused)
103
@item info pcmcia
104
show guest PCMCIA status
105
@item info mice
106
show which guest mouse is receiving events
107
@item info vnc
108
show the vnc server status
109
@item info name
110
show the current VM name
111
@item info uuid
112
show the current VM UUID
113
@item info cpustats
114
show CPU statistics
115
@item info usernet
116
show user network stack connection states
117
@item info migrate
118
show migration status
119
@item info balloon
120
show balloon information
121
@item info qtree
122
show device tree
123
@item info qdm
124
show qdev device model list
125
@item info roms
126
show roms
127
@end table
128
ETEXI
129

    
130
    {
131
        .name       = "q|quit",
132
        .args_type  = "",
133
        .params     = "",
134
        .help       = "quit the emulator",
135
        .user_print = monitor_user_noop,
136
        .mhandler.cmd_new = do_quit,
137
    },
138

    
139
STEXI
140
@item q or quit
141
@findex quit
142
Quit the emulator.
143
ETEXI
144

    
145
    {
146
        .name       = "eject",
147
        .args_type  = "force:-f,device:B",
148
        .params     = "[-f] device",
149
        .help       = "eject a removable medium (use -f to force it)",
150
        .user_print = monitor_user_noop,
151
        .mhandler.cmd_new = do_eject,
152
    },
153

    
154
STEXI
155
@item eject [-f] @var{device}
156
@findex eject
157
Eject a removable medium (use -f to force it).
158
ETEXI
159

    
160
    {
161
        .name       = "change",
162
        .args_type  = "device:B,target:F,arg:s?",
163
        .params     = "device filename [format]",
164
        .help       = "change a removable medium, optional format",
165
        .user_print = monitor_user_noop,
166
        .mhandler.cmd_new = do_change,
167
    },
168

    
169
STEXI
170
@item change @var{device} @var{setting}
171
@findex change
172

    
173
Change the configuration of a device.
174

    
175
@table @option
176
@item change @var{diskdevice} @var{filename} [@var{format}]
177
Change the medium for a removable disk device to point to @var{filename}. eg
178

    
179
@example
180
(qemu) change ide1-cd0 /path/to/some.iso
181
@end example
182

    
183
@var{format} is optional.
184

    
185
@item change vnc @var{display},@var{options}
186
Change the configuration of the VNC server. The valid syntax for @var{display}
187
and @var{options} are described at @ref{sec_invocation}. eg
188

    
189
@example
190
(qemu) change vnc localhost:1
191
@end example
192

    
193
@item change vnc password [@var{password}]
194

    
195
Change the password associated with the VNC server. If the new password is not
196
supplied, the monitor will prompt for it to be entered. VNC passwords are only
197
significant up to 8 letters. eg
198

    
199
@example
200
(qemu) change vnc password
201
Password: ********
202
@end example
203

    
204
@end table
205
ETEXI
206

    
207
    {
208
        .name       = "screendump",
209
        .args_type  = "filename:F",
210
        .params     = "filename",
211
        .help       = "save screen into PPM image 'filename'",
212
        .user_print = monitor_user_noop,
213
        .mhandler.cmd_new = do_screen_dump,
214
    },
215

    
216
STEXI
217
@item screendump @var{filename}
218
@findex screendump
219
Save screen into PPM image @var{filename}.
220
ETEXI
221

    
222
    {
223
        .name       = "logfile",
224
        .args_type  = "filename:F",
225
        .params     = "filename",
226
        .help       = "output logs to 'filename'",
227
        .mhandler.cmd = do_logfile,
228
    },
229

    
230
STEXI
231
@item logfile @var{filename}
232
@findex logfile
233
Output logs to @var{filename}.
234
ETEXI
235

    
236
    {
237
        .name       = "log",
238
        .args_type  = "items:s",
239
        .params     = "item1[,...]",
240
        .help       = "activate logging of the specified items to '/tmp/qemu.log'",
241
        .mhandler.cmd = do_log,
242
    },
243

    
244
STEXI
245
@item log @var{item1}[,...]
246
@findex log
247
Activate logging of the specified items to @file{/tmp/qemu.log}.
248
ETEXI
249

    
250
    {
251
        .name       = "savevm",
252
        .args_type  = "name:s?",
253
        .params     = "[tag|id]",
254
        .help       = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
255
        .mhandler.cmd = do_savevm,
256
    },
257

    
258
STEXI
259
@item savevm [@var{tag}|@var{id}]
260
@findex savevm
261
Create a snapshot of the whole virtual machine. If @var{tag} is
262
provided, it is used as human readable identifier. If there is already
263
a snapshot with the same tag or ID, it is replaced. More info at
264
@ref{vm_snapshots}.
265
ETEXI
266

    
267
    {
268
        .name       = "loadvm",
269
        .args_type  = "name:s",
270
        .params     = "tag|id",
271
        .help       = "restore a VM snapshot from its tag or id",
272
        .mhandler.cmd = do_loadvm,
273
    },
274

    
275
STEXI
276
@item loadvm @var{tag}|@var{id}
277
@findex loadvm
278
Set the whole virtual machine to the snapshot identified by the tag
279
@var{tag} or the unique snapshot ID @var{id}.
280
ETEXI
281

    
282
    {
283
        .name       = "delvm",
284
        .args_type  = "name:s",
285
        .params     = "tag|id",
286
        .help       = "delete a VM snapshot from its tag or id",
287
        .mhandler.cmd = do_delvm,
288
    },
289

    
290
STEXI
291
@item delvm @var{tag}|@var{id}
292
@findex delvm
293
Delete the snapshot identified by @var{tag} or @var{id}.
294
ETEXI
295

    
296
    {
297
        .name       = "singlestep",
298
        .args_type  = "option:s?",
299
        .params     = "[on|off]",
300
        .help       = "run emulation in singlestep mode or switch to normal mode",
301
        .mhandler.cmd = do_singlestep,
302
    },
303

    
304
STEXI
305
@item singlestep [off]
306
@findex singlestep
307
Run the emulation in single step mode.
308
If called with option off, the emulation returns to normal mode.
309
ETEXI
310

    
311
    {
312
        .name       = "stop",
313
        .args_type  = "",
314
        .params     = "",
315
        .help       = "stop emulation",
316
        .user_print = monitor_user_noop,
317
        .mhandler.cmd_new = do_stop,
318
    },
319

    
320
STEXI
321
@item stop
322
@findex stop
323
Stop emulation.
324
ETEXI
325

    
326
    {
327
        .name       = "c|cont",
328
        .args_type  = "",
329
        .params     = "",
330
        .help       = "resume emulation",
331
        .user_print = monitor_user_noop,
332
        .mhandler.cmd_new = do_cont,
333
    },
334

    
335
STEXI
336
@item c or cont
337
@findex cont
338
Resume emulation.
339
ETEXI
340

    
341
    {
342
        .name       = "gdbserver",
343
        .args_type  = "device:s?",
344
        .params     = "[device]",
345
        .help       = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
346
        .mhandler.cmd = do_gdbserver,
347
    },
348

    
349
STEXI
350
@item gdbserver [@var{port}]
351
@findex gdbserver
352
Start gdbserver session (default @var{port}=1234)
353
ETEXI
354

    
355
    {
356
        .name       = "x",
357
        .args_type  = "fmt:/,addr:l",
358
        .params     = "/fmt addr",
359
        .help       = "virtual memory dump starting at 'addr'",
360
        .mhandler.cmd = do_memory_dump,
361
    },
362

    
363
STEXI
364
@item x/fmt @var{addr}
365
@findex x
366
Virtual memory dump starting at @var{addr}.
367
ETEXI
368

    
369
    {
370
        .name       = "xp",
371
        .args_type  = "fmt:/,addr:l",
372
        .params     = "/fmt addr",
373
        .help       = "physical memory dump starting at 'addr'",
374
        .mhandler.cmd = do_physical_memory_dump,
375
    },
376

    
377
STEXI
378
@item xp /@var{fmt} @var{addr}
379
@findex xp
380
Physical memory dump starting at @var{addr}.
381

    
382
@var{fmt} is a format which tells the command how to format the
383
data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
384

    
385
@table @var
386
@item count
387
is the number of items to be dumped.
388

    
389
@item format
390
can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
391
c (char) or i (asm instruction).
392

    
393
@item size
394
can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
395
@code{h} or @code{w} can be specified with the @code{i} format to
396
respectively select 16 or 32 bit code instruction size.
397

    
398
@end table
399

    
400
Examples:
401
@itemize
402
@item
403
Dump 10 instructions at the current instruction pointer:
404
@example
405
(qemu) x/10i $eip
406
0x90107063:  ret
407
0x90107064:  sti
408
0x90107065:  lea    0x0(%esi,1),%esi
409
0x90107069:  lea    0x0(%edi,1),%edi
410
0x90107070:  ret
411
0x90107071:  jmp    0x90107080
412
0x90107073:  nop
413
0x90107074:  nop
414
0x90107075:  nop
415
0x90107076:  nop
416
@end example
417

    
418
@item
419
Dump 80 16 bit values at the start of the video memory.
420
@smallexample
421
(qemu) xp/80hx 0xb8000
422
0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
423
0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
424
0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
425
0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
426
0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
427
0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
428
0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
429
0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
430
0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
431
0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
432
@end smallexample
433
@end itemize
434
ETEXI
435

    
436
    {
437
        .name       = "p|print",
438
        .args_type  = "fmt:/,val:l",
439
        .params     = "/fmt expr",
440
        .help       = "print expression value (use $reg for CPU register access)",
441
        .mhandler.cmd = do_print,
442
    },
443

    
444
STEXI
445
@item p or print/@var{fmt} @var{expr}
446
@findex print
447

    
448
Print expression value. Only the @var{format} part of @var{fmt} is
449
used.
450
ETEXI
451

    
452
    {
453
        .name       = "i",
454
        .args_type  = "fmt:/,addr:i,index:i.",
455
        .params     = "/fmt addr",
456
        .help       = "I/O port read",
457
        .mhandler.cmd = do_ioport_read,
458
    },
459

    
460
STEXI
461
Read I/O port.
462
ETEXI
463

    
464
    {
465
        .name       = "o",
466
        .args_type  = "fmt:/,addr:i,val:i",
467
        .params     = "/fmt addr value",
468
        .help       = "I/O port write",
469
        .mhandler.cmd = do_ioport_write,
470
    },
471

    
472
STEXI
473
Write to I/O port.
474
ETEXI
475

    
476
    {
477
        .name       = "sendkey",
478
        .args_type  = "string:s,hold_time:i?",
479
        .params     = "keys [hold_ms]",
480
        .help       = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
481
        .mhandler.cmd = do_sendkey,
482
    },
483

    
484
STEXI
485
@item sendkey @var{keys}
486
@findex sendkey
487

    
488
Send @var{keys} to the emulator. @var{keys} could be the name of the
489
key or @code{#} followed by the raw value in either decimal or hexadecimal
490
format. Use @code{-} to press several keys simultaneously. Example:
491
@example
492
sendkey ctrl-alt-f1
493
@end example
494

    
495
This command is useful to send keys that your graphical user interface
496
intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
497
ETEXI
498

    
499
    {
500
        .name       = "system_reset",
501
        .args_type  = "",
502
        .params     = "",
503
        .help       = "reset the system",
504
        .user_print = monitor_user_noop,
505
        .mhandler.cmd_new = do_system_reset,
506
    },
507

    
508
STEXI
509
@item system_reset
510
@findex system_reset
511

    
512
Reset the system.
513
ETEXI
514

    
515
    {
516
        .name       = "system_powerdown",
517
        .args_type  = "",
518
        .params     = "",
519
        .help       = "send system power down event",
520
        .user_print = monitor_user_noop,
521
        .mhandler.cmd_new = do_system_powerdown,
522
    },
523

    
524
STEXI
525
@item system_powerdown
526
@findex system_powerdown
527

    
528
Power down the system (if supported).
529
ETEXI
530

    
531
    {
532
        .name       = "sum",
533
        .args_type  = "start:i,size:i",
534
        .params     = "addr size",
535
        .help       = "compute the checksum of a memory region",
536
        .mhandler.cmd = do_sum,
537
    },
538

    
539
STEXI
540
@item sum @var{addr} @var{size}
541
@findex sum
542

    
543
Compute the checksum of a memory region.
544
ETEXI
545

    
546
    {
547
        .name       = "usb_add",
548
        .args_type  = "devname:s",
549
        .params     = "device",
550
        .help       = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
551
        .mhandler.cmd = do_usb_add,
552
    },
553

    
554
STEXI
555
@item usb_add @var{devname}
556
@findex usb_add
557

    
558
Add the USB device @var{devname}.  For details of available devices see
559
@ref{usb_devices}
560
ETEXI
561

    
562
    {
563
        .name       = "usb_del",
564
        .args_type  = "devname:s",
565
        .params     = "device",
566
        .help       = "remove USB device 'bus.addr'",
567
        .mhandler.cmd = do_usb_del,
568
    },
569

    
570
STEXI
571
@item usb_del @var{devname}
572
@findex usb_del
573

    
574
Remove the USB device @var{devname} from the QEMU virtual USB
575
hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
576
command @code{info usb} to see the devices you can remove.
577
ETEXI
578

    
579
    {
580
        .name       = "device_add",
581
        .args_type  = "device:O",
582
        .params     = "driver[,prop=value][,...]",
583
        .help       = "add device, like -device on the command line",
584
        .user_print = monitor_user_noop,
585
        .mhandler.cmd_new = do_device_add,
586
    },
587

    
588
STEXI
589
@item device_add @var{config}
590
@findex device_add
591

    
592
Add device.
593
ETEXI
594

    
595
    {
596
        .name       = "device_del",
597
        .args_type  = "id:s",
598
        .params     = "device",
599
        .help       = "remove device",
600
        .user_print = monitor_user_noop,
601
        .mhandler.cmd_new = do_device_del,
602
    },
603

    
604
STEXI
605
@item device_del @var{id}
606
@findex device_del
607

    
608
Remove device @var{id}.
609
ETEXI
610

    
611
    {
612
        .name       = "cpu",
613
        .args_type  = "index:i",
614
        .params     = "index",
615
        .help       = "set the default CPU",
616
        .user_print = monitor_user_noop,
617
        .mhandler.cmd_new = do_cpu_set,
618
    },
619

    
620
STEXI
621
@item cpu @var{index}
622
@findex cpu
623
Set the default CPU.
624
ETEXI
625

    
626
    {
627
        .name       = "mouse_move",
628
        .args_type  = "dx_str:s,dy_str:s,dz_str:s?",
629
        .params     = "dx dy [dz]",
630
        .help       = "send mouse move events",
631
        .mhandler.cmd = do_mouse_move,
632
    },
633

    
634
STEXI
635
@item mouse_move @var{dx} @var{dy} [@var{dz}]
636
@findex mouse_move
637
Move the active mouse to the specified coordinates @var{dx} @var{dy}
638
with optional scroll axis @var{dz}.
639
ETEXI
640

    
641
    {
642
        .name       = "mouse_button",
643
        .args_type  = "button_state:i",
644
        .params     = "state",
645
        .help       = "change mouse button state (1=L, 2=M, 4=R)",
646
        .mhandler.cmd = do_mouse_button,
647
    },
648

    
649
STEXI
650
@item mouse_button @var{val}
651
@findex mouse_button
652
Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
653
ETEXI
654

    
655
    {
656
        .name       = "mouse_set",
657
        .args_type  = "index:i",
658
        .params     = "index",
659
        .help       = "set which mouse device receives events",
660
        .mhandler.cmd = do_mouse_set,
661
    },
662

    
663
STEXI
664
@item mouse_set @var{index}
665
@findex mouse_set
666
Set which mouse device receives events at given @var{index}, index
667
can be obtained with
668
@example
669
info mice
670
@end example
671
ETEXI
672

    
673
#ifdef HAS_AUDIO
674
    {
675
        .name       = "wavcapture",
676
        .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
677
        .params     = "path [frequency [bits [channels]]]",
678
        .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
679
        .mhandler.cmd = do_wav_capture,
680
    },
681
#endif
682
STEXI
683
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
684
@findex wavcapture
685
Capture audio into @var{filename}. Using sample rate @var{frequency}
686
bits per sample @var{bits} and number of channels @var{channels}.
687

    
688
Defaults:
689
@itemize @minus
690
@item Sample rate = 44100 Hz - CD quality
691
@item Bits = 16
692
@item Number of channels = 2 - Stereo
693
@end itemize
694
ETEXI
695

    
696
#ifdef HAS_AUDIO
697
    {
698
        .name       = "stopcapture",
699
        .args_type  = "n:i",
700
        .params     = "capture index",
701
        .help       = "stop capture",
702
        .mhandler.cmd = do_stop_capture,
703
    },
704
#endif
705
STEXI
706
@item stopcapture @var{index}
707
@findex stopcapture
708
Stop capture with a given @var{index}, index can be obtained with
709
@example
710
info capture
711
@end example
712
ETEXI
713

    
714
    {
715
        .name       = "memsave",
716
        .args_type  = "val:l,size:i,filename:s",
717
        .params     = "addr size file",
718
        .help       = "save to disk virtual memory dump starting at 'addr' of size 'size'",
719
        .user_print = monitor_user_noop,
720
        .mhandler.cmd_new = do_memory_save,
721
    },
722

    
723
STEXI
724
@item memsave @var{addr} @var{size} @var{file}
725
@findex memsave
726
save to disk virtual memory dump starting at @var{addr} of size @var{size}.
727
ETEXI
728

    
729
    {
730
        .name       = "pmemsave",
731
        .args_type  = "val:l,size:i,filename:s",
732
        .params     = "addr size file",
733
        .help       = "save to disk physical memory dump starting at 'addr' of size 'size'",
734
        .user_print = monitor_user_noop,
735
        .mhandler.cmd_new = do_physical_memory_save,
736
    },
737

    
738
STEXI
739
@item pmemsave @var{addr} @var{size} @var{file}
740
@findex pmemsave
741
save to disk physical memory dump starting at @var{addr} of size @var{size}.
742
ETEXI
743

    
744
    {
745
        .name       = "boot_set",
746
        .args_type  = "bootdevice:s",
747
        .params     = "bootdevice",
748
        .help       = "define new values for the boot device list",
749
        .mhandler.cmd = do_boot_set,
750
    },
751

    
752
STEXI
753
@item boot_set @var{bootdevicelist}
754
@findex boot_set
755

    
756
Define new values for the boot device list. Those values will override
757
the values specified on the command line through the @code{-boot} option.
758

    
759
The values that can be specified here depend on the machine type, but are
760
the same that can be specified in the @code{-boot} command line option.
761
ETEXI
762

    
763
#if defined(TARGET_I386)
764
    {
765
        .name       = "nmi",
766
        .args_type  = "cpu_index:i",
767
        .params     = "cpu",
768
        .help       = "inject an NMI on the given CPU",
769
        .mhandler.cmd = do_inject_nmi,
770
    },
771
#endif
772
STEXI
773
@item nmi @var{cpu}
774
@findex nmi
775
Inject an NMI on the given CPU (x86 only).
776
ETEXI
777

    
778
    {
779
        .name       = "migrate",
780
        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
781
        .params     = "[-d] [-b] [-i] uri",
782
        .help       = "migrate to URI (using -d to not wait for completion)"
783
		      "\n\t\t\t -b for migration without shared storage with"
784
		      " full copy of disk\n\t\t\t -i for migration without "
785
		      "shared storage with incremental copy of disk "
786
		      "(base image shared between src and destination)",
787
        .user_print = monitor_user_noop,	
788
	.mhandler.cmd_new = do_migrate,
789
    },
790

    
791

    
792
STEXI
793
@item migrate [-d] [-b] [-i] @var{uri}
794
@findex migrate
795
Migrate to @var{uri} (using -d to not wait for completion).
796
	-b for migration with full copy of disk
797
	-i for migration with incremental copy of disk (base image is shared)
798
ETEXI
799

    
800
    {
801
        .name       = "migrate_cancel",
802
        .args_type  = "",
803
        .params     = "",
804
        .help       = "cancel the current VM migration",
805
        .user_print = monitor_user_noop,
806
        .mhandler.cmd_new = do_migrate_cancel,
807
    },
808

    
809
STEXI
810
@item migrate_cancel
811
@findex migrate_cancel
812
Cancel the current VM migration.
813
ETEXI
814

    
815
    {
816
        .name       = "migrate_set_speed",
817
        .args_type  = "value:f",
818
        .params     = "value",
819
        .help       = "set maximum speed (in bytes) for migrations",
820
        .user_print = monitor_user_noop,
821
        .mhandler.cmd_new = do_migrate_set_speed,
822
    },
823

    
824
STEXI
825
@item migrate_set_speed @var{value}
826
@findex migrate_set_speed
827
Set maximum speed to @var{value} (in bytes) for migrations.
828
ETEXI
829

    
830
    {
831
        .name       = "migrate_set_downtime",
832
        .args_type  = "value:T",
833
        .params     = "value",
834
        .help       = "set maximum tolerated downtime (in seconds) for migrations",
835
        .user_print = monitor_user_noop,
836
        .mhandler.cmd_new = do_migrate_set_downtime,
837
    },
838

    
839
STEXI
840
@item migrate_set_downtime @var{second}
841
@findex migrate_set_downtime
842
Set maximum tolerated downtime (in seconds) for migration.
843
ETEXI
844

    
845
#if defined(TARGET_I386)
846
    {
847
        .name       = "drive_add",
848
        .args_type  = "pci_addr:s,opts:s",
849
        .params     = "[[<domain>:]<bus>:]<slot>\n"
850
                      "[file=file][,if=type][,bus=n]\n"
851
                      "[,unit=m][,media=d][index=i]\n"
852
                      "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
853
                      "[snapshot=on|off][,cache=on|off]",
854
        .help       = "add drive to PCI storage controller",
855
        .mhandler.cmd = drive_hot_add,
856
    },
857
#endif
858

    
859
STEXI
860
@item drive_add
861
@findex drive_add
862
Add drive to PCI storage controller.
863
ETEXI
864

    
865
#if defined(TARGET_I386)
866
    {
867
        .name       = "pci_add",
868
        .args_type  = "pci_addr:s,type:s,opts:s?",
869
        .params     = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
870
        .help       = "hot-add PCI device",
871
        .mhandler.cmd = pci_device_hot_add,
872
    },
873
#endif
874

    
875
STEXI
876
@item pci_add
877
@findex pci_add
878
Hot-add PCI device.
879
ETEXI
880

    
881
#if defined(TARGET_I386)
882
    {
883
        .name       = "pci_del",
884
        .args_type  = "pci_addr:s",
885
        .params     = "[[<domain>:]<bus>:]<slot>",
886
        .help       = "hot remove PCI device",
887
        .mhandler.cmd = do_pci_device_hot_remove,
888
    },
889
#endif
890

    
891
STEXI
892
@item pci_del
893
@findex pci_del
894
Hot remove PCI device.
895
ETEXI
896

    
897
    {
898
        .name       = "host_net_add",
899
        .args_type  = "device:s,opts:s?",
900
        .params     = "tap|user|socket|vde|dump [options]",
901
        .help       = "add host VLAN client",
902
        .mhandler.cmd = net_host_device_add,
903
    },
904

    
905
STEXI
906
@item host_net_add
907
@findex host_net_add
908
Add host VLAN client.
909
ETEXI
910

    
911
    {
912
        .name       = "host_net_remove",
913
        .args_type  = "vlan_id:i,device:s",
914
        .params     = "vlan_id name",
915
        .help       = "remove host VLAN client",
916
        .mhandler.cmd = net_host_device_remove,
917
    },
918

    
919
STEXI
920
@item host_net_remove
921
@findex host_net_remove
922
Remove host VLAN client.
923
ETEXI
924

    
925
    {
926
        .name       = "netdev_add",
927
        .args_type  = "netdev:O",
928
        .params     = "[user|tap|socket],id=str[,prop=value][,...]",
929
        .help       = "add host network device",
930
        .user_print = monitor_user_noop,
931
        .mhandler.cmd_new = do_netdev_add,
932
    },
933

    
934
STEXI
935
@item netdev_add
936
@findex netdev_add
937
Add host network device.
938
ETEXI
939

    
940
    {
941
        .name       = "netdev_del",
942
        .args_type  = "id:s",
943
        .params     = "id",
944
        .help       = "remove host network device",
945
        .user_print = monitor_user_noop,
946
        .mhandler.cmd_new = do_netdev_del,
947
    },
948

    
949
STEXI
950
@item netdev_del
951
@findex netdev_del
952
Remove host network device.
953
ETEXI
954

    
955
#ifdef CONFIG_SLIRP
956
    {
957
        .name       = "hostfwd_add",
958
        .args_type  = "arg1:s,arg2:s?,arg3:s?",
959
        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
960
        .help       = "redirect TCP or UDP connections from host to guest (requires -net user)",
961
        .mhandler.cmd = net_slirp_hostfwd_add,
962
    },
963
#endif
964
STEXI
965
@item hostfwd_add
966
@findex hostfwd_add
967
Redirect TCP or UDP connections from host to guest (requires -net user).
968
ETEXI
969

    
970
#ifdef CONFIG_SLIRP
971
    {
972
        .name       = "hostfwd_remove",
973
        .args_type  = "arg1:s,arg2:s?,arg3:s?",
974
        .params     = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
975
        .help       = "remove host-to-guest TCP or UDP redirection",
976
        .mhandler.cmd = net_slirp_hostfwd_remove,
977
    },
978

    
979
#endif
980
STEXI
981
@item hostfwd_remove
982
@findex hostfwd_remove
983
Remove host-to-guest TCP or UDP redirection.
984
ETEXI
985

    
986
    {
987
        .name       = "balloon",
988
        .args_type  = "value:M",
989
        .params     = "target",
990
        .help       = "request VM to change its memory allocation (in MB)",
991
        .user_print = monitor_user_noop,
992
        .mhandler.cmd_async = do_balloon,
993
        .async      = 1,
994
    },
995

    
996
STEXI
997
@item balloon @var{value}
998
@findex balloon
999
Request VM to change its memory allocation to @var{value} (in MB).
1000
ETEXI
1001

    
1002
    {
1003
        .name       = "set_link",
1004
        .args_type  = "name:s,up:b",
1005
        .params     = "name on|off",
1006
        .help       = "change the link status of a network adapter",
1007
        .user_print = monitor_user_noop,
1008
        .mhandler.cmd_new = do_set_link,
1009
    },
1010

    
1011
STEXI
1012
@item set_link @var{name} [on|off]
1013
@findex set_link
1014
Switch link @var{name} on (i.e. up) or off (i.e. down).
1015
ETEXI
1016

    
1017
    {
1018
        .name       = "watchdog_action",
1019
        .args_type  = "action:s",
1020
        .params     = "[reset|shutdown|poweroff|pause|debug|none]",
1021
        .help       = "change watchdog action",
1022
        .mhandler.cmd = do_watchdog_action,
1023
    },
1024

    
1025
STEXI
1026
@item watchdog_action
1027
@findex watchdog_action
1028
Change watchdog action.
1029
ETEXI
1030

    
1031
    {
1032
        .name       = "acl_show",
1033
        .args_type  = "aclname:s",
1034
        .params     = "aclname",
1035
        .help       = "list rules in the access control list",
1036
        .mhandler.cmd = do_acl_show,
1037
    },
1038

    
1039
STEXI
1040
@item acl_show @var{aclname}
1041
@findex acl_show
1042
List all the matching rules in the access control list, and the default
1043
policy. There are currently two named access control lists,
1044
@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1045
certificate distinguished name, and SASL username respectively.
1046
ETEXI
1047

    
1048
    {
1049
        .name       = "acl_policy",
1050
        .args_type  = "aclname:s,policy:s",
1051
        .params     = "aclname allow|deny",
1052
        .help       = "set default access control list policy",
1053
        .mhandler.cmd = do_acl_policy,
1054
    },
1055

    
1056
STEXI
1057
@item acl_policy @var{aclname} @code{allow|deny}
1058
@findex acl_policy
1059
Set the default access control list policy, used in the event that
1060
none of the explicit rules match. The default policy at startup is
1061
always @code{deny}.
1062
ETEXI
1063

    
1064
    {
1065
        .name       = "acl_add",
1066
        .args_type  = "aclname:s,match:s,policy:s,index:i?",
1067
        .params     = "aclname match allow|deny [index]",
1068
        .help       = "add a match rule to the access control list",
1069
        .mhandler.cmd = do_acl_add,
1070
    },
1071

    
1072
STEXI
1073
@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1074
@findex acl_add
1075
Add a match rule to the access control list, allowing or denying access.
1076
The match will normally be an exact username or x509 distinguished name,
1077
but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1078
allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1079
normally be appended to the end of the ACL, but can be inserted
1080
earlier in the list if the optional @var{index} parameter is supplied.
1081
ETEXI
1082

    
1083
    {
1084
        .name       = "acl_remove",
1085
        .args_type  = "aclname:s,match:s",
1086
        .params     = "aclname match",
1087
        .help       = "remove a match rule from the access control list",
1088
        .mhandler.cmd = do_acl_remove,
1089
    },
1090

    
1091
STEXI
1092
@item acl_remove @var{aclname} @var{match}
1093
@findex acl_remove
1094
Remove the specified match rule from the access control list.
1095
ETEXI
1096

    
1097
    {
1098
        .name       = "acl_reset",
1099
        .args_type  = "aclname:s",
1100
        .params     = "aclname",
1101
        .help       = "reset the access control list",
1102
        .mhandler.cmd = do_acl_reset,
1103
    },
1104

    
1105
STEXI
1106
@item acl_reset @var{aclname}
1107
@findex acl_reset
1108
Remove all matches from the access control list, and set the default
1109
policy back to @code{deny}.
1110
ETEXI
1111

    
1112
#if defined(TARGET_I386)
1113

    
1114
    {
1115
        .name       = "mce",
1116
        .args_type  = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1117
        .params     = "cpu bank status mcgstatus addr misc",
1118
        .help       = "inject a MCE on the given CPU",
1119
        .mhandler.cmd = do_inject_mce,
1120
    },
1121

    
1122
#endif
1123
STEXI
1124
@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1125
@findex mce (x86)
1126
Inject an MCE on the given CPU (x86 only).
1127
ETEXI
1128

    
1129
    {
1130
        .name       = "getfd",
1131
        .args_type  = "fdname:s",
1132
        .params     = "getfd name",
1133
        .help       = "receive a file descriptor via SCM rights and assign it a name",
1134
        .user_print = monitor_user_noop,
1135
        .mhandler.cmd_new = do_getfd,
1136
    },
1137

    
1138
STEXI
1139
@item getfd @var{fdname}
1140
@findex getfd
1141
If a file descriptor is passed alongside this command using the SCM_RIGHTS
1142
mechanism on unix sockets, it is stored using the name @var{fdname} for
1143
later use by other monitor commands.
1144
ETEXI
1145

    
1146
    {
1147
        .name       = "closefd",
1148
        .args_type  = "fdname:s",
1149
        .params     = "closefd name",
1150
        .help       = "close a file descriptor previously passed via SCM rights",
1151
        .user_print = monitor_user_noop,
1152
        .mhandler.cmd_new = do_closefd,
1153
    },
1154

    
1155
STEXI
1156
@item closefd @var{fdname}
1157
@findex closefd
1158
Close the file descriptor previously assigned to @var{fdname} using the
1159
@code{getfd} command. This is only needed if the file descriptor was never
1160
used by another monitor command.
1161
ETEXI
1162

    
1163
    {
1164
        .name       = "block_passwd",
1165
        .args_type  = "device:B,password:s",
1166
        .params     = "block_passwd device password",
1167
        .help       = "set the password of encrypted block devices",
1168
        .user_print = monitor_user_noop,
1169
        .mhandler.cmd_new = do_block_set_passwd,
1170
    },
1171

    
1172
STEXI
1173
@item block_passwd @var{device} @var{password}
1174
@findex block_passwd
1175
Set the encrypted device @var{device} password to @var{password}
1176
ETEXI
1177

    
1178
    {
1179
        .name       = "qmp_capabilities",
1180
        .args_type  = "",
1181
        .params     = "",
1182
        .help       = "enable QMP capabilities",
1183
        .user_print = monitor_user_noop,
1184
        .mhandler.cmd_new = do_qmp_capabilities,
1185
    },
1186

    
1187
STEXI
1188
@item qmp_capabilities
1189
@findex qmp_capabilities
1190
Enable the specified QMP capabilities
1191
ETEXI
1192

    
1193
STEXI
1194
@end table
1195
ETEXI