]> git.proxmox.com Git - qemu.git/blame - qemu-monitor.hx
monitor: Convert do_system_powerdown() to QObject
[qemu.git] / qemu-monitor.hx
CommitLineData
2313086a
BS
1HXCOMM Use DEFHEADING() to define headings in both help text and texi
2HXCOMM Text between STEXI and ETEXI are copied to texi version and
3HXCOMM discarded from C version
4HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5HXCOMM monitor commands
6HXCOMM HXCOMM can be used for comments, discarded from both texi and C
7
8STEXI
9@table @option
10ETEXI
11
d7f9b689
LC
12 {
13 .name = "help|?",
14 .args_type = "name:s?",
d7f9b689
LC
15 .params = "[cmd]",
16 .help = "show the help",
af4ce882 17 .mhandler.cmd = do_help_cmd,
d7f9b689
LC
18 },
19
2313086a
BS
20STEXI
21@item help or ? [@var{cmd}]
22Show the help for all commands or just for command @var{cmd}.
23ETEXI
24
d7f9b689
LC
25 {
26 .name = "commit",
27 .args_type = "device:B",
d7f9b689
LC
28 .params = "device|all",
29 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
af4ce882 30 .mhandler.cmd = do_commit,
d7f9b689
LC
31 },
32
2313086a
BS
33STEXI
34@item commit
35Commit changes to the disk images (if -snapshot is used) or backing files.
36ETEXI
37
d7f9b689
LC
38 {
39 .name = "info",
40 .args_type = "item:s?",
d7f9b689
LC
41 .params = "[subcommand]",
42 .help = "show various information about the system state",
13c7425e
LC
43 .user_print = monitor_user_noop,
44 .mhandler.cmd_new = do_info,
d7f9b689
LC
45 },
46
2313086a
BS
47STEXI
48@item info @var{subcommand}
49Show various information about the system state.
50
51@table @option
52@item info version
53show the version of QEMU
54@item info network
55show the various VLANs and the associated devices
56@item info chardev
57show the character devices
58@item info block
59show the block devices
60@item info block
61show block device statistics
62@item info registers
63show the cpu registers
64@item info cpus
65show infos for each CPU
66@item info history
67show the command line history
68@item info irq
69show the interrupts statistics (if available)
70@item info pic
71show i8259 (PIC) state
72@item info pci
73show emulated PCI device info
74@item info tlb
75show virtual to physical memory mappings (i386 only)
76@item info mem
77show the active virtual memory mappings (i386 only)
78@item info hpet
79show state of HPET (i386 only)
2313086a
BS
80@item info kvm
81show KVM information
82@item info usb
83show USB devices plugged on the virtual USB hub
84@item info usbhost
85show all USB host devices
86@item info profile
87show profiling information
88@item info capture
89show information about active capturing
90@item info snapshots
91show list of VM snapshots
92@item info status
93show the current VM status (running|paused)
94@item info pcmcia
95show guest PCMCIA status
96@item info mice
97show which guest mouse is receiving events
98@item info vnc
99show the vnc server status
100@item info name
101show the current VM name
102@item info uuid
103show the current VM UUID
104@item info cpustats
105show CPU statistics
6dbe553f
JK
106@item info usernet
107show user network stack connection states
2313086a
BS
108@item info migrate
109show migration status
110@item info balloon
111show balloon information
112@item info qtree
113show device tree
114@end table
115ETEXI
116
d7f9b689
LC
117 {
118 .name = "q|quit",
119 .args_type = "",
d7f9b689
LC
120 .params = "",
121 .help = "quit the emulator",
b223f35f
LC
122 .user_print = monitor_user_noop,
123 .mhandler.cmd_new = do_quit,
d7f9b689
LC
124 },
125
2313086a
BS
126STEXI
127@item q or quit
128Quit the emulator.
129ETEXI
130
d7f9b689
LC
131 {
132 .name = "eject",
133 .args_type = "force:-f,filename:B",
d7f9b689
LC
134 .params = "[-f] device",
135 .help = "eject a removable medium (use -f to force it)",
af4ce882 136 .mhandler.cmd = do_eject,
d7f9b689
LC
137 },
138
2313086a
BS
139STEXI
140@item eject [-f] @var{device}
141Eject a removable medium (use -f to force it).
142ETEXI
143
d7f9b689
LC
144 {
145 .name = "change",
146 .args_type = "device:B,target:F,arg:s?",
d7f9b689
LC
147 .params = "device filename [format]",
148 .help = "change a removable medium, optional format",
af4ce882 149 .mhandler.cmd = do_change,
d7f9b689
LC
150 },
151
2313086a
BS
152STEXI
153@item change @var{device} @var{setting}
154
155Change the configuration of a device.
156
157@table @option
158@item change @var{diskdevice} @var{filename} [@var{format}]
159Change the medium for a removable disk device to point to @var{filename}. eg
160
161@example
162(qemu) change ide1-cd0 /path/to/some.iso
163@end example
164
165@var{format} is optional.
166
167@item change vnc @var{display},@var{options}
168Change the configuration of the VNC server. The valid syntax for @var{display}
169and @var{options} are described at @ref{sec_invocation}. eg
170
171@example
172(qemu) change vnc localhost:1
173@end example
174
175@item change vnc password [@var{password}]
176
177Change the password associated with the VNC server. If the new password is not
178supplied, the monitor will prompt for it to be entered. VNC passwords are only
179significant up to 8 letters. eg
180
181@example
182(qemu) change vnc password
183Password: ********
184@end example
185
186@end table
187ETEXI
188
d7f9b689
LC
189 {
190 .name = "screendump",
191 .args_type = "filename:F",
d7f9b689
LC
192 .params = "filename",
193 .help = "save screen into PPM image 'filename'",
af4ce882 194 .mhandler.cmd = do_screen_dump,
d7f9b689
LC
195 },
196
2313086a
BS
197STEXI
198@item screendump @var{filename}
199Save screen into PPM image @var{filename}.
200ETEXI
201
d7f9b689
LC
202 {
203 .name = "logfile",
204 .args_type = "filename:F",
d7f9b689
LC
205 .params = "filename",
206 .help = "output logs to 'filename'",
af4ce882 207 .mhandler.cmd = do_logfile,
d7f9b689
LC
208 },
209
2313086a
BS
210STEXI
211@item logfile @var{filename}
212Output logs to @var{filename}.
213ETEXI
214
d7f9b689
LC
215 {
216 .name = "log",
217 .args_type = "items:s",
d7f9b689
LC
218 .params = "item1[,...]",
219 .help = "activate logging of the specified items to '/tmp/qemu.log'",
af4ce882 220 .mhandler.cmd = do_log,
d7f9b689
LC
221 },
222
2313086a
BS
223STEXI
224@item log @var{item1}[,...]
225Activate logging of the specified items to @file{/tmp/qemu.log}.
226ETEXI
227
d7f9b689
LC
228 {
229 .name = "savevm",
230 .args_type = "name:s?",
d7f9b689
LC
231 .params = "[tag|id]",
232 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
af4ce882 233 .mhandler.cmd = do_savevm,
d7f9b689
LC
234 },
235
2313086a
BS
236STEXI
237@item savevm [@var{tag}|@var{id}]
238Create a snapshot of the whole virtual machine. If @var{tag} is
239provided, it is used as human readable identifier. If there is already
240a snapshot with the same tag or ID, it is replaced. More info at
241@ref{vm_snapshots}.
242ETEXI
243
d7f9b689
LC
244 {
245 .name = "loadvm",
246 .args_type = "name:s",
d7f9b689
LC
247 .params = "tag|id",
248 .help = "restore a VM snapshot from its tag or id",
af4ce882 249 .mhandler.cmd = do_loadvm,
d7f9b689
LC
250 },
251
2313086a
BS
252STEXI
253@item loadvm @var{tag}|@var{id}
254Set the whole virtual machine to the snapshot identified by the tag
255@var{tag} or the unique snapshot ID @var{id}.
256ETEXI
257
d7f9b689
LC
258 {
259 .name = "delvm",
260 .args_type = "name:s",
d7f9b689
LC
261 .params = "tag|id",
262 .help = "delete a VM snapshot from its tag or id",
af4ce882 263 .mhandler.cmd = do_delvm,
d7f9b689
LC
264 },
265
2313086a
BS
266STEXI
267@item delvm @var{tag}|@var{id}
268Delete the snapshot identified by @var{tag} or @var{id}.
269ETEXI
270
d7f9b689
LC
271 {
272 .name = "singlestep",
273 .args_type = "option:s?",
d7f9b689
LC
274 .params = "[on|off]",
275 .help = "run emulation in singlestep mode or switch to normal mode",
af4ce882 276 .mhandler.cmd = do_singlestep,
d7f9b689
LC
277 },
278
2313086a
BS
279STEXI
280@item singlestep [off]
281Run the emulation in single step mode.
282If called with option off, the emulation returns to normal mode.
283ETEXI
284
d7f9b689
LC
285 {
286 .name = "stop",
287 .args_type = "",
d7f9b689
LC
288 .params = "",
289 .help = "stop emulation",
e0c97bde
LC
290 .user_print = monitor_user_noop,
291 .mhandler.cmd_new = do_stop,
d7f9b689
LC
292 },
293
2313086a
BS
294STEXI
295@item stop
296Stop emulation.
297ETEXI
298
d7f9b689
LC
299 {
300 .name = "c|cont",
301 .args_type = "",
d7f9b689
LC
302 .params = "",
303 .help = "resume emulation",
af4ce882 304 .mhandler.cmd = do_cont,
d7f9b689
LC
305 },
306
2313086a
BS
307STEXI
308@item c or cont
309Resume emulation.
310ETEXI
311
d7f9b689
LC
312 {
313 .name = "gdbserver",
314 .args_type = "device:s?",
d7f9b689
LC
315 .params = "[device]",
316 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
af4ce882 317 .mhandler.cmd = do_gdbserver,
d7f9b689
LC
318 },
319
2313086a
BS
320STEXI
321@item gdbserver [@var{port}]
322Start gdbserver session (default @var{port}=1234)
323ETEXI
324
d7f9b689
LC
325 {
326 .name = "x",
327 .args_type = "fmt:/,addr:l",
d7f9b689
LC
328 .params = "/fmt addr",
329 .help = "virtual memory dump starting at 'addr'",
af4ce882 330 .mhandler.cmd = do_memory_dump,
d7f9b689
LC
331 },
332
2313086a
BS
333STEXI
334@item x/fmt @var{addr}
335Virtual memory dump starting at @var{addr}.
336ETEXI
337
d7f9b689
LC
338 {
339 .name = "xp",
340 .args_type = "fmt:/,addr:l",
d7f9b689
LC
341 .params = "/fmt addr",
342 .help = "physical memory dump starting at 'addr'",
af4ce882 343 .mhandler.cmd = do_physical_memory_dump,
d7f9b689
LC
344 },
345
2313086a
BS
346STEXI
347@item xp /@var{fmt} @var{addr}
348Physical memory dump starting at @var{addr}.
349
350@var{fmt} is a format which tells the command how to format the
351data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
352
353@table @var
354@item count
355is the number of items to be dumped.
356
357@item format
358can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
359c (char) or i (asm instruction).
360
361@item size
362can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
363@code{h} or @code{w} can be specified with the @code{i} format to
364respectively select 16 or 32 bit code instruction size.
365
366@end table
367
368Examples:
369@itemize
370@item
371Dump 10 instructions at the current instruction pointer:
372@example
373(qemu) x/10i $eip
3740x90107063: ret
3750x90107064: sti
3760x90107065: lea 0x0(%esi,1),%esi
3770x90107069: lea 0x0(%edi,1),%edi
3780x90107070: ret
3790x90107071: jmp 0x90107080
3800x90107073: nop
3810x90107074: nop
3820x90107075: nop
3830x90107076: nop
384@end example
385
386@item
387Dump 80 16 bit values at the start of the video memory.
388@smallexample
389(qemu) xp/80hx 0xb8000
3900x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
3910x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
3920x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
3930x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
3940x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
3950x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
3960x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3970x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3980x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
3990x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
400@end smallexample
401@end itemize
402ETEXI
403
d7f9b689
LC
404 {
405 .name = "p|print",
406 .args_type = "fmt:/,val:l",
d7f9b689
LC
407 .params = "/fmt expr",
408 .help = "print expression value (use $reg for CPU register access)",
af4ce882 409 .mhandler.cmd = do_print,
d7f9b689
LC
410 },
411
2313086a
BS
412STEXI
413@item p or print/@var{fmt} @var{expr}
414
415Print expression value. Only the @var{format} part of @var{fmt} is
416used.
417ETEXI
418
d7f9b689
LC
419 {
420 .name = "i",
421 .args_type = "fmt:/,addr:i,index:i.",
d7f9b689
LC
422 .params = "/fmt addr",
423 .help = "I/O port read",
af4ce882 424 .mhandler.cmd = do_ioport_read,
d7f9b689
LC
425 },
426
2313086a
BS
427STEXI
428Read I/O port.
429ETEXI
430
d7f9b689
LC
431 {
432 .name = "o",
433 .args_type = "fmt:/,addr:i,val:i",
d7f9b689
LC
434 .params = "/fmt addr value",
435 .help = "I/O port write",
af4ce882 436 .mhandler.cmd = do_ioport_write,
d7f9b689
LC
437 },
438
f114784f
JK
439STEXI
440Write to I/O port.
441ETEXI
2313086a 442
d7f9b689
LC
443 {
444 .name = "sendkey",
445 .args_type = "string:s,hold_time:i?",
d7f9b689
LC
446 .params = "keys [hold_ms]",
447 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
af4ce882 448 .mhandler.cmd = do_sendkey,
d7f9b689
LC
449 },
450
2313086a
BS
451STEXI
452@item sendkey @var{keys}
453
454Send @var{keys} to the emulator. @var{keys} could be the name of the
455key or @code{#} followed by the raw value in either decimal or hexadecimal
456format. Use @code{-} to press several keys simultaneously. Example:
457@example
458sendkey ctrl-alt-f1
459@end example
460
461This command is useful to send keys that your graphical user interface
462intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
463ETEXI
464
d7f9b689
LC
465 {
466 .name = "system_reset",
467 .args_type = "",
d7f9b689
LC
468 .params = "",
469 .help = "reset the system",
c80d259e
LC
470 .user_print = monitor_user_noop,
471 .mhandler.cmd_new = do_system_reset,
d7f9b689
LC
472 },
473
2313086a
BS
474STEXI
475@item system_reset
476
477Reset the system.
478ETEXI
479
d7f9b689
LC
480 {
481 .name = "system_powerdown",
482 .args_type = "",
d7f9b689
LC
483 .params = "",
484 .help = "send system power down event",
43076664
LC
485 .user_print = monitor_user_noop,
486 .mhandler.cmd_new = do_system_powerdown,
d7f9b689
LC
487 },
488
2313086a
BS
489STEXI
490@item system_powerdown
491
492Power down the system (if supported).
493ETEXI
494
d7f9b689
LC
495 {
496 .name = "sum",
497 .args_type = "start:i,size:i",
d7f9b689
LC
498 .params = "addr size",
499 .help = "compute the checksum of a memory region",
af4ce882 500 .mhandler.cmd = do_sum,
d7f9b689
LC
501 },
502
2313086a
BS
503STEXI
504@item sum @var{addr} @var{size}
505
506Compute the checksum of a memory region.
507ETEXI
508
d7f9b689
LC
509 {
510 .name = "usb_add",
511 .args_type = "devname:s",
d7f9b689
LC
512 .params = "device",
513 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
af4ce882 514 .mhandler.cmd = do_usb_add,
d7f9b689
LC
515 },
516
2313086a
BS
517STEXI
518@item usb_add @var{devname}
519
520Add the USB device @var{devname}. For details of available devices see
521@ref{usb_devices}
522ETEXI
523
d7f9b689
LC
524 {
525 .name = "usb_del",
526 .args_type = "devname:s",
d7f9b689
LC
527 .params = "device",
528 .help = "remove USB device 'bus.addr'",
af4ce882 529 .mhandler.cmd = do_usb_del,
d7f9b689
LC
530 },
531
2313086a
BS
532STEXI
533@item usb_del @var{devname}
534
535Remove the USB device @var{devname} from the QEMU virtual USB
536hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
537command @code{info usb} to see the devices you can remove.
538ETEXI
539
d7f9b689
LC
540 {
541 .name = "device_add",
542 .args_type = "config:s",
d7f9b689
LC
543 .params = "device",
544 .help = "add device, like -device on the command line",
af4ce882 545 .mhandler.cmd = do_device_add,
d7f9b689
LC
546 },
547
3418bd25
GH
548STEXI
549@item device_add @var{config}
550
551Add device.
552ETEXI
553
d7f9b689
LC
554 {
555 .name = "device_del",
556 .args_type = "id:s",
d7f9b689
LC
557 .params = "device",
558 .help = "remove device",
af4ce882 559 .mhandler.cmd = do_device_del,
d7f9b689
LC
560 },
561
3418bd25
GH
562STEXI
563@item device_del @var{id}
564
565Remove device @var{id}.
566ETEXI
567
d7f9b689
LC
568 {
569 .name = "cpu",
570 .args_type = "index:i",
d7f9b689
LC
571 .params = "index",
572 .help = "set the default CPU",
af4ce882 573 .mhandler.cmd = do_cpu_set,
d7f9b689 574 },
3418bd25 575
2313086a
BS
576STEXI
577Set the default CPU.
578ETEXI
579
d7f9b689
LC
580 {
581 .name = "mouse_move",
582 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
d7f9b689
LC
583 .params = "dx dy [dz]",
584 .help = "send mouse move events",
af4ce882 585 .mhandler.cmd = do_mouse_move,
d7f9b689
LC
586 },
587
2313086a
BS
588STEXI
589@item mouse_move @var{dx} @var{dy} [@var{dz}]
590Move the active mouse to the specified coordinates @var{dx} @var{dy}
591with optional scroll axis @var{dz}.
592ETEXI
593
d7f9b689
LC
594 {
595 .name = "mouse_button",
596 .args_type = "button_state:i",
d7f9b689
LC
597 .params = "state",
598 .help = "change mouse button state (1=L, 2=M, 4=R)",
af4ce882 599 .mhandler.cmd = do_mouse_button,
d7f9b689
LC
600 },
601
2313086a
BS
602STEXI
603@item mouse_button @var{val}
604Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
605ETEXI
606
d7f9b689
LC
607 {
608 .name = "mouse_set",
609 .args_type = "index:i",
d7f9b689
LC
610 .params = "index",
611 .help = "set which mouse device receives events",
af4ce882 612 .mhandler.cmd = do_mouse_set,
d7f9b689
LC
613 },
614
2313086a
BS
615STEXI
616@item mouse_set @var{index}
617Set which mouse device receives events at given @var{index}, index
618can be obtained with
619@example
620info mice
621@end example
622ETEXI
623
624#ifdef HAS_AUDIO
d7f9b689
LC
625 {
626 .name = "wavcapture",
627 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
d7f9b689
LC
628 .params = "path [frequency [bits [channels]]]",
629 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
af4ce882 630 .mhandler.cmd = do_wav_capture,
d7f9b689 631 },
2313086a
BS
632#endif
633STEXI
634@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
635Capture audio into @var{filename}. Using sample rate @var{frequency}
636bits per sample @var{bits} and number of channels @var{channels}.
637
638Defaults:
639@itemize @minus
640@item Sample rate = 44100 Hz - CD quality
641@item Bits = 16
642@item Number of channels = 2 - Stereo
643@end itemize
644ETEXI
645
646#ifdef HAS_AUDIO
d7f9b689
LC
647 {
648 .name = "stopcapture",
649 .args_type = "n:i",
d7f9b689
LC
650 .params = "capture index",
651 .help = "stop capture",
af4ce882 652 .mhandler.cmd = do_stop_capture,
d7f9b689 653 },
2313086a
BS
654#endif
655STEXI
656@item stopcapture @var{index}
657Stop capture with a given @var{index}, index can be obtained with
658@example
659info capture
660@end example
661ETEXI
662
d7f9b689
LC
663 {
664 .name = "memsave",
665 .args_type = "val:l,size:i,filename:s",
d7f9b689
LC
666 .params = "addr size file",
667 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
af4ce882 668 .mhandler.cmd = do_memory_save,
d7f9b689
LC
669 },
670
2313086a
BS
671STEXI
672@item memsave @var{addr} @var{size} @var{file}
673save to disk virtual memory dump starting at @var{addr} of size @var{size}.
674ETEXI
675
d7f9b689
LC
676 {
677 .name = "pmemsave",
678 .args_type = "val:l,size:i,filename:s",
d7f9b689
LC
679 .params = "addr size file",
680 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
af4ce882 681 .mhandler.cmd = do_physical_memory_save,
d7f9b689
LC
682 },
683
2313086a
BS
684STEXI
685@item pmemsave @var{addr} @var{size} @var{file}
686save to disk physical memory dump starting at @var{addr} of size @var{size}.
687ETEXI
688
d7f9b689
LC
689 {
690 .name = "boot_set",
691 .args_type = "bootdevice:s",
d7f9b689
LC
692 .params = "bootdevice",
693 .help = "define new values for the boot device list",
af4ce882 694 .mhandler.cmd = do_boot_set,
d7f9b689
LC
695 },
696
2313086a
BS
697STEXI
698@item boot_set @var{bootdevicelist}
699
700Define new values for the boot device list. Those values will override
701the values specified on the command line through the @code{-boot} option.
702
703The values that can be specified here depend on the machine type, but are
704the same that can be specified in the @code{-boot} command line option.
705ETEXI
706
707#if defined(TARGET_I386)
d7f9b689
LC
708 {
709 .name = "nmi",
710 .args_type = "cpu_index:i",
d7f9b689
LC
711 .params = "cpu",
712 .help = "inject an NMI on the given CPU",
af4ce882 713 .mhandler.cmd = do_inject_nmi,
d7f9b689 714 },
2313086a
BS
715#endif
716STEXI
717@item nmi @var{cpu}
718Inject an NMI on the given CPU (x86 only).
719ETEXI
720
d7f9b689
LC
721 {
722 .name = "migrate",
723 .args_type = "detach:-d,uri:s",
d7f9b689
LC
724 .params = "[-d] uri",
725 .help = "migrate to URI (using -d to not wait for completion)",
af4ce882 726 .mhandler.cmd = do_migrate,
d7f9b689
LC
727 },
728
2313086a
BS
729STEXI
730@item migrate [-d] @var{uri}
731Migrate to @var{uri} (using -d to not wait for completion).
732ETEXI
733
d7f9b689
LC
734 {
735 .name = "migrate_cancel",
736 .args_type = "",
d7f9b689
LC
737 .params = "",
738 .help = "cancel the current VM migration",
af4ce882 739 .mhandler.cmd = do_migrate_cancel,
d7f9b689
LC
740 },
741
2313086a
BS
742STEXI
743@item migrate_cancel
744Cancel the current VM migration.
745ETEXI
746
d7f9b689
LC
747 {
748 .name = "migrate_set_speed",
749 .args_type = "value:s",
d7f9b689
LC
750 .params = "value",
751 .help = "set maximum speed (in bytes) for migrations",
af4ce882 752 .mhandler.cmd = do_migrate_set_speed,
d7f9b689
LC
753 },
754
2313086a
BS
755STEXI
756@item migrate_set_speed @var{value}
757Set maximum speed to @var{value} (in bytes) for migrations.
2ea42952
GC
758ETEXI
759
d7f9b689
LC
760 {
761 .name = "migrate_set_downtime",
762 .args_type = "value:s",
d7f9b689
LC
763 .params = "value",
764 .help = "set maximum tolerated downtime (in seconds) for migrations",
af4ce882 765 .mhandler.cmd = do_migrate_set_downtime,
d7f9b689 766 },
2ea42952
GC
767
768STEXI
769@item migrate_set_downtime @var{second}
770Set maximum tolerated downtime (in seconds) for migration.
2313086a
BS
771ETEXI
772
773#if defined(TARGET_I386)
d7f9b689
LC
774 {
775 .name = "drive_add",
776 .args_type = "pci_addr:s,opts:s",
d7f9b689
LC
777 .params = "[[<domain>:]<bus>:]<slot>\n"
778 "[file=file][,if=type][,bus=n]\n"
779 "[,unit=m][,media=d][index=i]\n"
780 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
781 "[snapshot=on|off][,cache=on|off]",
782 .help = "add drive to PCI storage controller",
af4ce882 783 .mhandler.cmd = drive_hot_add,
d7f9b689 784 },
2313086a 785#endif
d7f9b689 786
2313086a
BS
787STEXI
788@item drive_add
789Add drive to PCI storage controller.
790ETEXI
791
792#if defined(TARGET_I386)
d7f9b689
LC
793 {
794 .name = "pci_add",
795 .args_type = "pci_addr:s,type:s,opts:s?",
d7f9b689
LC
796 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
797 .help = "hot-add PCI device",
af4ce882 798 .mhandler.cmd = pci_device_hot_add,
d7f9b689 799 },
2313086a 800#endif
d7f9b689 801
2313086a
BS
802STEXI
803@item pci_add
804Hot-add PCI device.
805ETEXI
806
807#if defined(TARGET_I386)
d7f9b689
LC
808 {
809 .name = "pci_del",
810 .args_type = "pci_addr:s",
d7f9b689
LC
811 .params = "[[<domain>:]<bus>:]<slot>",
812 .help = "hot remove PCI device",
af4ce882 813 .mhandler.cmd = do_pci_device_hot_remove,
d7f9b689 814 },
2313086a 815#endif
d7f9b689 816
2313086a
BS
817STEXI
818@item pci_del
819Hot remove PCI device.
820ETEXI
821
d7f9b689
LC
822 {
823 .name = "host_net_add",
824 .args_type = "device:s,opts:s?",
d7f9b689
LC
825 .params = "tap|user|socket|vde|dump [options]",
826 .help = "add host VLAN client",
af4ce882 827 .mhandler.cmd = net_host_device_add,
d7f9b689
LC
828 },
829
2313086a
BS
830STEXI
831@item host_net_add
832Add host VLAN client.
833ETEXI
834
d7f9b689
LC
835 {
836 .name = "host_net_remove",
837 .args_type = "vlan_id:i,device:s",
d7f9b689
LC
838 .params = "vlan_id name",
839 .help = "remove host VLAN client",
af4ce882 840 .mhandler.cmd = net_host_device_remove,
d7f9b689
LC
841 },
842
2313086a
BS
843STEXI
844@item host_net_remove
845Remove host VLAN client.
846ETEXI
847
848#ifdef CONFIG_SLIRP
d7f9b689
LC
849 {
850 .name = "hostfwd_add",
851 .args_type = "arg1:s,arg2:s?,arg3:s?",
d7f9b689
LC
852 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
853 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
af4ce882 854 .mhandler.cmd = net_slirp_hostfwd_add,
d7f9b689
LC
855 },
856
857 {
858 .name = "hostfwd_remove",
859 .args_type = "arg1:s,arg2:s?,arg3:s?",
d7f9b689
LC
860 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
861 .help = "remove host-to-guest TCP or UDP redirection",
af4ce882 862 .mhandler.cmd = net_slirp_hostfwd_remove,
d7f9b689
LC
863 },
864
2313086a
BS
865#endif
866STEXI
867@item host_net_redir
868Redirect TCP or UDP connections from host to guest (requires -net user).
869ETEXI
870
d7f9b689
LC
871 {
872 .name = "balloon",
873 .args_type = "value:i",
d7f9b689
LC
874 .params = "target",
875 .help = "request VM to change it's memory allocation (in MB)",
af4ce882 876 .mhandler.cmd = do_balloon,
d7f9b689
LC
877 },
878
2313086a
BS
879STEXI
880@item balloon @var{value}
881Request VM to change its memory allocation to @var{value} (in MB).
882ETEXI
883
d7f9b689
LC
884 {
885 .name = "set_link",
886 .args_type = "name:s,up_or_down:s",
d7f9b689
LC
887 .params = "name up|down",
888 .help = "change the link status of a network adapter",
af4ce882 889 .mhandler.cmd = do_set_link,
d7f9b689
LC
890 },
891
2313086a
BS
892STEXI
893@item set_link @var{name} [up|down]
894Set link @var{name} up or down.
895ETEXI
896
d7f9b689
LC
897 {
898 .name = "watchdog_action",
899 .args_type = "action:s",
d7f9b689
LC
900 .params = "[reset|shutdown|poweroff|pause|debug|none]",
901 .help = "change watchdog action",
af4ce882 902 .mhandler.cmd = do_watchdog_action,
d7f9b689
LC
903 },
904
2313086a
BS
905STEXI
906@item watchdog_action
907Change watchdog action.
908ETEXI
909
d7f9b689
LC
910 {
911 .name = "acl_show",
912 .args_type = "aclname:s",
d7f9b689
LC
913 .params = "aclname",
914 .help = "list rules in the access control list",
af4ce882 915 .mhandler.cmd = do_acl_show,
d7f9b689
LC
916 },
917
2313086a 918STEXI
15dfcd45
JK
919@item acl_show @var{aclname}
920List all the matching rules in the access control list, and the default
921policy. There are currently two named access control lists,
922@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
923certificate distinguished name, and SASL username respectively.
924ETEXI
2313086a 925
d7f9b689
LC
926 {
927 .name = "acl_policy",
928 .args_type = "aclname:s,policy:s",
d7f9b689
LC
929 .params = "aclname allow|deny",
930 .help = "set default access control list policy",
af4ce882 931 .mhandler.cmd = do_acl_policy,
d7f9b689
LC
932 },
933
15dfcd45 934STEXI
cbbfacc6 935@item acl_policy @var{aclname} @code{allow|deny}
15dfcd45 936Set the default access control list policy, used in the event that
2313086a 937none of the explicit rules match. The default policy at startup is
15dfcd45
JK
938always @code{deny}.
939ETEXI
940
d7f9b689
LC
941 {
942 .name = "acl_add",
943 .args_type = "aclname:s,match:s,policy:s,index:i?",
d7f9b689
LC
944 .params = "aclname match allow|deny [index]",
945 .help = "add a match rule to the access control list",
af4ce882 946 .mhandler.cmd = do_acl_add,
d7f9b689
LC
947 },
948
15dfcd45
JK
949STEXI
950@item acl_allow @var{aclname} @var{match} @code{allow|deny} [@var{index}]
951Add a match rule to the access control list, allowing or denying access.
952The match will normally be an exact username or x509 distinguished name,
953but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
954allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
2313086a 955normally be appended to the end of the ACL, but can be inserted
15dfcd45
JK
956earlier in the list if the optional @var{index} parameter is supplied.
957ETEXI
958
d7f9b689
LC
959 {
960 .name = "acl_remove",
961 .args_type = "aclname:s,match:s",
d7f9b689
LC
962 .params = "aclname match",
963 .help = "remove a match rule from the access control list",
af4ce882 964 .mhandler.cmd = do_acl_remove,
d7f9b689
LC
965 },
966
15dfcd45
JK
967STEXI
968@item acl_remove @var{aclname} @var{match}
969Remove the specified match rule from the access control list.
970ETEXI
971
d7f9b689
LC
972 {
973 .name = "acl_reset",
974 .args_type = "aclname:s",
d7f9b689
LC
975 .params = "aclname",
976 .help = "reset the access control list",
af4ce882 977 .mhandler.cmd = do_acl_reset,
d7f9b689
LC
978 },
979
15dfcd45
JK
980STEXI
981@item acl_remove @var{aclname} @var{match}
982Remove all matches from the access control list, and set the default
2313086a 983policy back to @code{deny}.
2313086a
BS
984ETEXI
985
79c4f6b0 986#if defined(TARGET_I386)
d7f9b689
LC
987
988 {
989 .name = "mce",
990 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
d7f9b689
LC
991 .params = "cpu bank status mcgstatus addr misc",
992 .help = "inject a MCE on the given CPU",
af4ce882 993 .mhandler.cmd = do_inject_mce,
d7f9b689
LC
994 },
995
79c4f6b0
HY
996#endif
997STEXI
998@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
999Inject an MCE on the given CPU (x86 only).
f07918fd
MM
1000ETEXI
1001
d7f9b689
LC
1002 {
1003 .name = "getfd",
1004 .args_type = "fdname:s",
d7f9b689
LC
1005 .params = "getfd name",
1006 .help = "receive a file descriptor via SCM rights and assign it a name",
af4ce882 1007 .mhandler.cmd = do_getfd,
d7f9b689
LC
1008 },
1009
f07918fd
MM
1010STEXI
1011@item getfd @var{fdname}
1012If a file descriptor is passed alongside this command using the SCM_RIGHTS
1013mechanism on unix sockets, it is stored using the name @var{fdname} for
1014later use by other monitor commands.
1015ETEXI
1016
d7f9b689
LC
1017 {
1018 .name = "closefd",
1019 .args_type = "fdname:s",
d7f9b689
LC
1020 .params = "closefd name",
1021 .help = "close a file descriptor previously passed via SCM rights",
af4ce882 1022 .mhandler.cmd = do_closefd,
d7f9b689
LC
1023 },
1024
f07918fd
MM
1025STEXI
1026@item closefd @var{fdname}
1027Close the file descriptor previously assigned to @var{fdname} using the
1028@code{getfd} command. This is only needed if the file descriptor was never
1029used by another monitor command.
79c4f6b0
HY
1030ETEXI
1031
2313086a
BS
1032STEXI
1033@end table
1034ETEXI