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