Lines Matching +full:host +full:- +full:id

14     "-h or -help     display this help and exit\n", QEMU_ARCH_ALL)
16 ``-h``
21 "-version display version information and exit\n", QEMU_ARCH_ALL)
23 ``-version``
28 "-machine [type=]name[,prop[=value][,...]]\n"
29 " selects emulated machine ('-machine help' for list)\n"
33 " dump-guest-core=on|off include guest memory in a core dump (default=on)\n"
34 " mem-merge=on|off controls memory merge support (default: on)\n"
35 " aes-key-wrap=on|off controls support for AES key wrapping (default=on)\n"
36 " dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n"
37 " suppress-vmdesc=on|off disables self-describing migration (default=off)\n"
39 " memory-encryption=@var{} memory encryption object to use (default=none)\n"
42 " aux-ram-share=on|off allocate auxiliary guest RAM as shared (default: off)\n"
44 …" memory-backend='backend-id' specifies explicitly provided backend for main RAM (d…
45 …" cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=s…
46 " smp-cache.0.cache=cachename,smp-cache.0.topology=topologylevel\n",
49 ``-machine [type=]name[,prop=value[,...]]``
50 Select the emulated machine by name. Use ``-machine help`` to list
56 "pc-i440fx-2.8" and "pc-q35-2.8" for the x86\_64/i686 architectures.
59 version 2.9.0, the 2.9.0 version must support the "pc-i440fx-2.8"
60 and "pc-q35-2.8" machines too. To allow users live migrating VMs to
78 ``dump-guest-core=on|off``
81 ``mem-merge=on|off``
83 supported by the host, de-duplicates identical memory pages
86 ``aes-key-wrap=on|off``
87 Enables or disables AES key wrapping support on s390-ccw hosts.
92 ``dea-key-wrap=on|off``
93 Enables or disables DEA key wrapping support on s390-ccw hosts.
101 ``memory-encryption=``
108 ``aux-ram-share=on|off``
112 It does not apply to memory-backend-objects, whether explicitly
113 specified on the command line, or implicitly created by the -m
116 To use the cpr-transfer migration mode, you must set aux-ram-share=on.
118 ``memory-backend='id'``
119 An alternative to legacy ``-mem-path`` and ``mem-prealloc`` options.
125 -object memory-backend-file,id=pc.ram,size=512M,mem-path=/hugetlbfs,prealloc=on,share=on
126 -machine memory-backend=pc.ram
127 -m 512M
131 * as backend id one shall use value of 'default-ram-id', advertised by
132 machine type (available via ``query-machines`` QMP command), if migration
135 use ``x-use-canonical-path-for-ramblock-id=off`` backend option
141 -object memory-backend-ram,id=pc.ram,size=512M,x-use-canonical-path-for-ramblock-id=off
142 -machine memory-backend=pc.ram
143 -m 512M
145 …``cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.…
150 They are regions of Host Physical Addresses (HPA) on a system which
151 may be interleaved across one or more CXL host bridges. The system
153 configure the downstream Host-managed Device Memory (HDM) decoders
157 ``targets.X=target`` provides the mapping to CXL host bridges
158 which may be identified by the id provided in the -device entry.
167 ``interleave-granularity=granularity`` sets the granularity of
175-machine cxl-fmw.0.targets.0=cxl.0,cxl-fmw.0.targets.1=cxl.1,cxl-fmw.0.size=128G,cxl-fmw.0.interle…
177 ``smp-cache.0.cache=cachename,smp-cache.0.topology=topologylevel``
202-machine smp-cache.0.cache=l1d,smp-cache.0.topology=core,smp-cache.1.cache=l1i,smp-cache.1.topolog…
206 " sgx-epc.0.memdev=memid,sgx-epc.0.node=numaid\n",
210 ``sgx-epc.0.memdev=@var{memid},sgx-epc.0.node=@var{numaid}``
215 "-cpu cpu select CPU ('-cpu help' for list)\n", QEMU_ARCH_ALL)
217 ``-cpu model``
218 Select CPU model (``-cpu help`` for list and additional feature
223 "-accel [accel=]accelerator[,prop[=value][,...]]\n"
225 …" igd-passthru=on|off (enable Xen integrated Intel graphics passthrough, default=of…
226 … " kernel-irqchip=on|off|split controls accelerated irqchip support (default=on)\n"
227 " kvm-shadow-mem=size of KVM shadow MMU in bytes\n"
228 " one-insn-per-tb=on|off (one guest instruction per TCG translation block)\n"
229 " split-wx=on|off (enable TCG split w^x mapping)\n"
230 " tb-size=n (TCG translation block cache size)\n"
231 " dirty-ring-size=n (KVM dirty ring GFN count, default 0)\n"
232 …" eager-split-size=n (KVM Eager Page Split chunk size, default 0, disabled. ARM onl…
233 …" notify-vmexit=run|internal-error|disable,notify-window=n (enable notify VM exit a…
234 " thread=single|multi (enable multi-threaded TCG)\n"
237 ``-accel name[,prop=value[,...]]``
244 ``igd-passthru=on|off``
249 ``kernel-irqchip=on|off|split``
250 Controls KVM in-kernel irqchip support. The default is full
253 non-MSI interrupts. Disabling the in-kernel irqchip completely
256 ``kvm-shadow-mem=size``
259 ``one-insn-per-tb=on|off``
263 the logs produced by the ``-d`` option.
265 ``split-wx=on|off``
271 ``tb-size=n``
275 Controls number of TCG threads. When the TCG is multi-threaded
277 additional host cores. The default is to enable multi-threading
278 where both the back-end and front-ends support it and no
282 ``dirty-ring-size=n``
283 When the KVM accelerator is used, it controls the size of the per-vCPU
289 is disabled (dirty-ring-size=0). When enabled, KVM will instead
292 ``eager-split-size=n``
294 enabling dirty-logging on a huge-page requires breaking it into
296 lazily by default. There are performance benefits in doing huge-page
298 with break-before-make sequences are considerable and also if guest
304 (eager-split-size=0).
306 ``notify-vmexit=run|internal-error|disable,notify-window=n``
307 Enables or disables notify VM exit support on x86 host and specify
310 if the exit happens. ``internal-error`` option enables the feature.
313 open up for a specified of time (i.e. notify-window).
314 Default: notify-vmexit=run,notify-window=0.
324 "-smp [[cpus=]n][,maxcpus=maxcpus][,drawers=drawers][,books=books][,sockets=sockets]\n"
341 " three-level CPU hierarchy of sockets/cores/threads, the parameters will\n"
347 " can be defined through the supported sub-option. Unsupported parameters\n"
348 " can also be provided in addition to the sub-option, but their values\n"
352 ``-smp [[cpus=]n][,maxcpus=maxcpus][,drawers=drawers][,books=books][,sockets=sockets][,dies=dies][,…
371 be defined through the supported sub-option. Unsupported parameters can
372 also be provided in addition to the sub-option, but their values must be
380 For example, the following sub-option defines a CPU topology hierarchy
388 -smp 8,sockets=2,cores=2,threads=2,maxcpus=8
390 The following sub-option defines a CPU topology hierarchy (2 sockets
398 -smp 32,sockets=2,dies=2,modules=2,cores=2,threads=2,maxcpus=32
400 The following sub-option defines a CPU topology hierarchy (2 sockets
408 -smp 16,sockets=2,clusters=2,cores=2,threads=2,maxcpus=16
421 -smp 2
424 to guest if it's explicitly specified in -smp.
428 "-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n"
429 "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n"
430 "-numa dist,src=source,dst=destination,val=distance\n"
431 "-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]\n"
432 …"-numa hmat-lb,initiator=node,target=node,hierarchy=memory|first-level|second-level|third-level,da…
433 …"-numa hmat-cache,node-id=node,size=size,level=level[,associativity=none|direct|complex][,policy=n…
436 ``-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=initiator]``
438 ``-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=initiator]``
440 ``-numa dist,src=source,dst=destination,val=distance``
442 ``-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]``
444 ``-numa hmat-lb,initiator=node,target=node,hierarchy=hierarchy,data-type=type[,latency=lat][,bandwi…
446 ``-numa hmat-cache,node-id=node,size=size,level=level[,associativity=str][,policy=str][,line=size]``
454 omitted). A non-contiguous set of VCPUs can be represented by
463 -numa node,cpus=0-2,cpus=5
466 which uses '\ ``socket-id|core-id|thread-id``\ ' properties to
470 '\ ``hotpluggable-cpus``\ ' monitor command. '\ ``node-id``\ '
479 -M pc \
480 -smp 1,sockets=2,maxcpus=2 \
481 -numa node,nodeid=0 -numa node,nodeid=1 \
482 -numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
489 '\ ``-memory-backend-ram``\ ' allows memory preallocation).
499 for '\ ``-numa node``\ ' without memory specified was removed.
513 -machine hmat=on \
514 -m 2G,slots=2,maxmem=4G \
515 -object memory-backend-ram,size=1G,id=m0 \
516 -object memory-backend-ram,size=1G,id=m1 \
517 -numa node,nodeid=0,memdev=m0 \
518 -numa node,nodeid=1,memdev=m1,initiator=0 \
519 -smp 2,sockets=2,maxcpus=2 \
520 -numa cpu,node-id=0,socket-id=0 \
521 -numa cpu,node-id=0,socket-id=1
534 Note that the -``numa`` option doesn't allocate any of the specified
536 means that one still has to use the ``-m``, ``-smp`` options to
539 Use '\ ``hmat-lb``\ ' to set System Locality Latency and Bandwidth
545 In '\ ``hmat-lb``\ ' option, node are NUMA node IDs. hierarchy is
548 hierarchy is 'first-level\|second-level\|third-level', this
550 for each domain. type of 'data-type' is type of data represented by
551 this structure instance: if 'hierarchy' is 'memory', 'data-type' is
554 'first-level\|second-level\|third-level', 'data-type' is
564 In '\ ``hmat-cache``\ ' option, node-id is the NUMA-id of the memory
567 level 0 should not be used with '\ ``hmat-cache``\ ' option.
569 'none/direct(direct-mapped)/complex(complex cache indexing)'. policy
574 access memory in node 0 with access-latency 5 nanoseconds,
575 access-bandwidth is 200 MB/s; The processors in NUMA node 0 access
576 memory in NUMA node 1 with access-latency 10 nanoseconds,
577 access-bandwidth is 100 MB/s. And for memory side cache information,
579 policy is write-back, the cache Line size is 8 bytes:
583 -machine hmat=on \
584 -m 2G \
585 -object memory-backend-ram,size=1G,id=m0 \
586 -object memory-backend-ram,size=1G,id=m1 \
587 -smp 2,sockets=2,maxcpus=2 \
588 -numa node,nodeid=0,memdev=m0 \
589 -numa node,nodeid=1,memdev=m1,initiator=0 \
590 -numa cpu,node-id=0,socket-id=0 \
591 -numa cpu,node-id=0,socket-id=1 \
592 -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5 \
593-numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=200M \
594 -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=10 \
595-numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M \
596 -numa hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8 \
597 -numa hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8
600 DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd,
601 "-add-fd fd=fd,set=set[,opaque=opaque]\n"
604 ``-add-fd fd=fd,set=set[,opaque=opaque]``
613 This option defines the ID of the fd set to add the file
617 This option defines a free-form string that can be used to
620 You can open an image using pre-opened file descriptors from an fd
623 .. parsed-literal::
626 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" \\
627 -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" \\
628 -drive file=/dev/fdset/2,index=0,media=disk
632 "-set group.id.arg=value\n"
633 " set <arg> parameter for item <id> of type <group>\n"
634 " i.e. -set drive.$id.file=/path/to/image\n", QEMU_ARCH_ALL)
636 ``-set group.id.arg=value``
637 Set parameter arg for item id of type group
641 "-global driver.property=value\n"
642 "-global driver=driver,property=property,value=value\n"
646 ``-global driver.prop=value``
648 ``-global driver=driver,property=property,value=value``
651 .. parsed-literal::
653 |qemu_system_x86| -global ide-hd.physical_block_size=4096 disk-image.img
658 use -``device``.
660 -global driver.prop=value is shorthand for -global
666 "-boot [order=drives][,once=drives][,menu=on|off]\n"
667 " [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n"
668 " 'drives': floppy (a), hard disk (c), CD-ROM (d), network (n)\n"
674 ``-boot [order=drives][,once=drives][,menu=on|off][,splash=sp_name][,splash-time=sp_time][,reboot-t…
677 (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p
678 (Etherboot from network adapter 1-4), hard disk boot is the default.
686 as firmware/BIOS supports them. The default is non-interactive boot.
697 ms when boot failed, then reboot. If rb\_timeout is '-1', guest will
698 not reboot, qemu passes '-1' to bios by default. Currently Seabios
703 options. The default is non-strict boot.
705 .. parsed-literal::
708 |qemu_system_x86| -boot order=nc
709 # boot from CD-ROM first, switch back to default order after reboot
710 |qemu_system_x86| -boot once=d
712 |qemu_system_x86| -boot menu=on,splash=/root/boot.bmp,splash-time=5000
714 Note: The legacy format '-boot drives' is still supported but its
719 "-m [size=]megs[,slots=n,maxmem=size]\n"
727 ``-m [size=]megs[,slots=n,maxmem=size]``
734 For example, the following command-line sets the guest startup RAM
738 .. parsed-literal::
740 |qemu_system| -m 1G,slots=3,maxmem=4G
746 DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
747 "-mem-path FILE provide backing storage for guest RAM\n", QEMU_ARCH_ALL)
749 ``-mem-path path``
753 DEF("mem-prealloc", 0, QEMU_OPTION_mem_prealloc,
754 "-mem-prealloc preallocate guest memory (use with -mem-path)\n",
757 ``-mem-prealloc``
758 Preallocate memory when using -mem-path.
762 "-k language use keyboard layout (for example 'fr' for French)\n",
765 ``-k language``
776 ar de-ch es fo fr-ca hu ja mk no pt-br sv
777 da en-gb et fr fr-ch is lt nl pl ru th
778 de en-us fi fr-be hr it lv nl-be pt sl tr
780 The default is ``en-us``.
785 "-audio [driver=]driver[,prop[=value][,...]]\n"
788 " options are the same as for -audiodev\n"
789 "-audio [driver=]driver,model=value[,prop[=value][,...]]\n"
791 " apart from 'model', options are the same as for -audiodev.\n"
792 " use '-audio model=help' to show possible devices.\n",
795 ``-audio [driver=]driver[,model=value][,prop[=value][,...]]``
796 If the ``model`` option is specified, ``-audio`` is a shortcut
797 for configuring both the guest audio hardware and the host audio
802 The following two example do exactly the same, to show how ``-audio``
805 .. parsed-literal::
807 |qemu_system| -audiodev pa,id=pa -device sb16,audiodev=pa
808 |qemu_system| -audio pa,model=sb16
810 If the ``model`` option is not specified, ``-audio`` is used to
813 particular, ``-audio none`` ensures that no audio is produced even
817 ``-audiodev`` option below. Use ``driver=help`` to list the available
823 "-audiodev [driver=]driver,id=id[,prop[=value][,...]]\n"
825 " Use ``-audiodev help`` to list the available drivers\n"
826 " id= identifier of the backend\n"
827 " timer-period= timer period in microseconds\n"
828 " in|out.mixing-engine= use mixing engine to mix streams inside QEMU\n"
829 " in|out.fixed-settings= use fixed settings for host audio\n"
835 " in|out.buffer-length= length of buffer in microseconds\n"
836 "-audiodev none,id=id,[,prop[=value][,...]]\n"
839 "-audiodev alsa,id=id[,prop[=value][,...]]\n"
841 " in|out.period-length= length of period in microseconds\n"
842 " in|out.try-poll= attempt to use poll mode\n"
846 "-audiodev coreaudio,id=id[,prop[=value][,...]]\n"
847 " in|out.buffer-count= number of buffers\n"
850 "-audiodev dsound,id=id[,prop[=value][,...]]\n"
854 "-audiodev oss,id=id[,prop[=value][,...]]\n"
856 " in|out.buffer-count= number of buffers\n"
857 " in|out.try-poll= attempt to use poll mode\n"
858 " try-mmap= try using memory mapped access\n"
860 " dsp-policy= set timing policy (0..10), -1 to use fragment mode\n"
863 "-audiodev pa,id=id[,prop[=value][,...]]\n"
869 "-audiodev pipewire,id=id[,prop[=value][,...]]\n"
871 " in|out.stream-name= name of pipewire stream\n"
875 "-audiodev sdl,id=id[,prop[=value][,...]]\n"
876 " in|out.buffer-count= number of buffers\n"
879 "-audiodev sndio,id=id[,prop[=value][,...]]\n"
882 "-audiodev spice,id=id[,prop[=value][,...]]\n"
885 "-audiodev dbus,id=id[,prop[=value][,...]]\n"
887 "-audiodev wav,id=id[,prop[=value][,...]]\n"
891 ``-audiodev [driver=]driver,id=id[,prop[=value][,...]]``
892 Adds a new audio backend driver identified by id. There are global
900 -audiodev alsa,id=example,in.frequency=44110,out.frequency=8000
901 -audiodev alsa,id=example,out.channels=1 # leaves in.channels unspecified
909 ``id=identifier``
912 ``timer-period=period``
916 ``in|out.mixing-engine=on|off``
919 off, fixed-settings must be off too. Note that disabling this
926 ``in|out.fixed-settings=on|off``
927 Use fixed settings for host audio. When off, it will change
932 Specify the frequency to use when using fixed-settings. Default
936 Specify the number of channels to use when using fixed-settings.
940 Specify the sample format to use when using fixed-settings.
947 ``in|out.buffer-length=usecs``
950 ``-audiodev none,id=id[,prop[=value][,...]]``
954 ``-audiodev alsa,id=id[,prop[=value][,...]]``
964 ``in|out.period-length=usecs``
967 ``in|out.try-poll=on|off``
973 ``-audiodev coreaudio,id=id[,prop[=value][,...]]``
979 ``in|out.buffer-count=count``
982 ``-audiodev dsound,id=id[,prop[=value][,...]]``
992 ``-audiodev oss,id=id[,prop[=value][,...]]``
994 Unix-like systems.
1002 ``in|out.buffer-count=count``
1005 ``in|out.try-poll=on|of``
1008 ``try-mmap=on|off``
1015 ``dsp-policy=policy``
1017 means smaller latency but higher CPU usage). Use -1 to use
1018 buffer sizes specified by ``buffer`` and ``buffer-count``. This
1021 ``-audiodev pa,id=id[,prop[=value][,...]]``
1037 ``-audiodev pipewire,id=id[,prop[=value][,...]]``
1049 ``in|out.stream-name``
1052 ``-audiodev sdl,id=id[,prop[=value][,...]]``
1059 ``in|out.buffer-count=count``
1062 ``-audiodev sndio,id=id[,prop[=value][,...]]``
1064 OpenBSD and most other Unix-like systems.
1075 ``-audiodev spice,id=id[,prop[=value][,...]]``
1077 requires ``-spice`` and automatically selected in that case, so
1081 ``-audiodev wav,id=id[,prop[=value][,...]]``
1092 "-device driver[,prop[=value][,...]]\n"
1095 " use '-device help' to print all possible drivers\n"
1096 " use '-device driver,help' to print all possible properties\n",
1099 ``-device driver[,prop[=value][,...]]``
1102 properties, use ``-device help`` and ``-device driver,help``.
1106 ``-device ipmi-bmc-sim,id=id[,prop[=value][,...]]``
1117 ``id=id``
1118 The BMC id for interfaces to use this device.
1140 ``-device ipmi-bmc-extern,id=id,chardev=id[,slave_addr=val]``
1146 it is strongly recommended that you use the "reconnect-ms=" chardev
1157 ``-device isa-ipmi-kcs,bmc=id[,ioport=val][,irq=val]``
1161 ``bmc=id``
1162 The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern
1173 ``-device isa-ipmi-bt,bmc=id[,ioport=val][,irq=val]``
1177 ``-device pci-ipmi-kcs,bmc=id``
1180 ``bmc=id``
1181 The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
1183 ``-device pci-ipmi-bt,bmc=id``
1186 ``-device intel-iommu[,option=...]``
1187 This is only supported by ``-machine q35``, which will enable Intel VT-d
1192 complete x2apic. Currently it only supports kvm kernel-irqchip modes
1193 ``off`` or ``split``, while full kernel-irqchip is not yet supported.
1195 kernel-irqchip.
1197 ``caching-mode=on|off`` (default: off)
1198 This enables caching mode for the VT-d emulated device. When
1199 caching-mode is enabled, each guest DMA buffer mapping will generate an
1201 a synchronous way. It is required for ``-device vfio-pci`` to work
1202 with the VT-d device, because host assigned devices requires to setup
1203 the DMA mapping on the host before guest DMA starts.
1205 ``device-iotlb=on|off`` (default: off)
1206 This enables device-iotlb capability for the emulated VT-d device. So
1210 ``aw-bits=39|48`` (default: 39)
1212 space has 39 bits width for 3-level IOMMU page tables, and 48 bits for
1213 4-level IOMMU page tables.
1215 Please also refer to the wiki page for general scenarios of VT-d
1216 emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
1218 ``-device virtio-iommu-pci[,option=...]``
1219 This is only supported by ``-machine q35`` (x86_64) and ``-machine virt`` (ARM).
1222 ``granule=val`` (possible values are 4k, 8k, 16k, 64k and host; default: host)
1224 virtio-iommu. If host, the granule matches the host page size.
1226 ``aw-bits=val`` (val between 32 and 64, default depends on machine)
1232 "-name string1[,process=string2][,debug-threads=on|off]\n"
1235 " When debug-threads is enabled, individual threads are given a separate name\n"
1239 ``-name name``
1247 "-uuid %08x-%04x-%04x-%04x-%012x\n"
1250 ``-uuid uuid``
1265 ``-device`` to specify the hardware device and ``-blockdev`` to
1271 The ``-drive`` option combines the device and backend into a single
1276 Older options like ``-hda`` are essentially macros which expand into
1277 ``-drive`` options for various drive interfaces. The original forms
1284 "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
1287 ``-fda file``
1289 ``-fdb file``
1295 "-hda/-hdb file use 'file' as hard disk 0/1 image\n", QEMU_ARCH_ALL)
1298 "-hdc/-hdd file use 'file' as hard disk 2/3 image\n", QEMU_ARCH_ALL)
1301 ``-hda file``
1303 ``-hdb file``
1305 ``-hdc file``
1307 ``-hdd file``
1316 "-cdrom file use 'file' as CD-ROM image\n",
1319 ``-cdrom file``
1320 Use file as CD-ROM image on the default bus of the emulated machine
1321 (which is IDE1 master on x86, so you cannot use ``-hdc`` and ``-cdrom``
1323 host CD-ROM by using ``/dev/cdrom`` as filename.
1327 "-blockdev [driver=]driver[,node-name=N][,discard=ignore|unmap]\n"
1328 " [,cache.direct=on|off][,cache.no-flush=on|off]\n"
1329 " [,read-only=on|off][,auto-read-only=on|off]\n"
1330 " [,force-share=on|off][,detect-zeroes=on|off|unmap]\n"
1334 ``-blockdev option[,option[,option[,...]]]``
1342 existing node (file=node-name), or you define a new node inline,
1346 A block driver node created with ``-blockdev`` can be used for a
1348 in a ``-device`` argument that defines a block device.
1354 ``node-name``
1358 (if you use ``-drive`` as well) the ID of a drive.
1365 ``read-only``
1366 Open the node read-only. Guest write attempts will fail.
1368 Note that some block drivers support only read-only access,
1370 the default value ``read-only=off`` does not work and the
1373 ``auto-read-only``
1374 If ``auto-read-only=on`` is set, QEMU may fall back to
1375 read-only usage even when ``read-only=off`` is requested, or
1380 ``force-share``
1389 Enabling ``force-share=on`` requires ``read-only=on``.
1392 The host page cache can be avoided with ``cache.direct=on``.
1396 ``cache.no-flush``
1397 In case you don't care about data integrity over host
1398 failures, you can use ``cache.no-flush=on``. This option
1401 wrong, like your host losing power, the disk storage getting
1411 ``detect-zeroes=detect-zeroes``
1412 detect-zeroes is "off", "on" or "unmap" and enables the
1418 ``Driver-specific options for file``
1419 This is the protocol-level block driver for accessing regular
1439 -blockdev driver=file,node-name=disk,filename=disk.img
1441 ``Driver-specific options for raw``
1454 -blockdev driver=file,node-name=disk_file,filename=disk.img
1455 -blockdev driver=raw,node-name=disk,file=disk_file
1461 -blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
1463 ``Driver-specific options for qcow2``
1478 ``lazy-refcounts``
1482 ``cache-size``
1484 caches in bytes (default: the sum of l2-cache-size and
1485 refcount-cache-size)
1487 ``l2-cache-size``
1489 cache-size is not specified - 32M on Linux platforms, and 8M
1490 on non-Linux platforms; otherwise, as large as possible
1491 within the cache-size, while permitting the requested or the
1494 ``refcount-cache-size``
1496 (default: 4 times the cluster size; or if cache-size is
1500 ``cache-clean-interval``
1506 ``pass-discard-request``
1511 ``pass-discard-snapshot``
1516 ``pass-discard-other``
1521 ``discard-no-unref``
1526 setting of the pass-discard-request option. Keeping the clusters
1528 caused by freeing and re-allocating them later. Besides potential
1537 ``overlap-check``
1541 ``blockdev-add``.
1547 -blockdev driver=file,node-name=my_file,filename=/tmp/disk.qcow2
1548 -blockdev driver=qcow2,node-name=hda,file=my_file,overlap-check=none,cache-size=16777216
1554-blockdev driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
1556 ``Driver-specific options for other drivers``
1557 Please refer to the QAPI documentation of the ``blockdev-add``
1562 "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
1565 " [,werror=ignore|stop|report|enospc][,id=name]\n"
1567 " [,readonly=on|off][,copy-on-read=on|off]\n"
1568 " [,discard=ignore|unmap][,detect-zeroes=on|off|unmap]\n"
1577 ``-drive option[,option[,option[,...]]]``
1580 defining the corresponding ``-blockdev`` and ``-device`` options.
1582 ``-drive`` accepts all options that are accepted by ``-blockdev``.
1602 the bus number and the unit id.
1614 given drive (see ``-snapshot``).
1618 "writethrough" and controls how the host cache is used to access
1620 and ``cache.no-flush`` options (as in ``-blockdev``), and
1622 the ``write-cache`` option of block guest devices (as in
1623 ``-device``). The modes correspond to the following settings:
1626 \ cache.writeback cache.direct cache.no-flush
1650 "enospc" (pause QEMU only if the host disk is full; report the
1654 ``copy-on-read=copy-on-read``
1655 copy-on-read is "on" or "off" and enables whether to copy read
1691 data writes as completed as soon as the data is present in the host
1694 handle volatile disk write caches correctly and your host crashes or
1698 This means that the host page cache will be used to read and write
1703 When using the ``-snapshot`` option, unsafe caching is always used.
1705 Copy-on-read avoids accessing the same backing file sectors
1707 network. By default copy-on-read is off.
1709 Instead of ``-cdrom`` you can use:
1711 .. parsed-literal::
1713 |qemu_system| -drive file=file,index=2,media=cdrom
1715 Instead of ``-hda``, ``-hdb``, ``-hdc``, ``-hdd``, you can use:
1717 .. parsed-literal::
1719 |qemu_system| -drive file=file,index=0,media=disk
1720 |qemu_system| -drive file=file,index=1,media=disk
1721 |qemu_system| -drive file=file,index=2,media=disk
1722 |qemu_system| -drive file=file,index=3,media=disk
1724 You can open an image using pre-opened file descriptors from an fd
1727 .. parsed-literal::
1730 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" \\
1731 -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" \\
1732 -drive file=/dev/fdset/2,index=0,media=disk
1736 .. parsed-literal::
1738 |qemu_system_x86| -drive file=file,if=ide,index=1,media=cdrom
1743 .. parsed-literal::
1745 |qemu_system_x86| -drive if=ide,index=1,media=cdrom
1747 Instead of ``-fda``, ``-fdb``, you can use:
1749 .. parsed-literal::
1751 |qemu_system_x86| -drive file=file,index=0,if=floppy
1752 |qemu_system_x86| -drive file=file,index=1,if=floppy
1757 .. parsed-literal::
1759 |qemu_system_x86| -drive file=a -drive file=b
1763 .. parsed-literal::
1765 |qemu_system_x86| -hda a -hdb b
1769 "-mtdblock file use 'file' as on-board Flash memory image\n",
1772 ``-mtdblock file``
1773 Use file as on-board Flash memory image.
1777 "-sd file use 'file' as SecureDigital card image\n", QEMU_ARCH_ALL)
1779 ``-sd file``
1784 "-snapshot write to temporary files instead of disk image files\n",
1787 ``-snapshot``
1790 force the write back by pressing C-a s (see the :ref:`disk images`
1794 snapshot is incompatible with ``-blockdev`` (instead use qemu-img
1796 If you have mixed ``-blockdev`` and ``-drive`` declarations you
1803 "-fsdev local,id=id,path=path,security_model=mapped-xattr|mapped-file|passthrough|none\n"
1805 " [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]\n"
1806 " [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]\n"
1807 …" [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n"
1808 …" [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm…
1809 " [[,throttling.iops-size=is]]\n"
1810 "-fsdev synth,id=id\n",
1814 ``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly=on][,fm…
1816 ``-fsdev synth,id=id[,readonly=on]``
1825 ``id=id``
1834 Supported security models are "passthrough", "mapped-xattr",
1835 "mapped-file" and "none". In "passthrough" security model, files
1837 guest. This requires QEMU to run as root. In "mapped-xattr"
1840 "mapped-file" these attributes are stored in the hidden
1849 "immediate". This means that host page cache will be used to
1856 default read-write access is given.
1859 Specifies the default mode for newly created files on the host.
1860 Works only with security models "mapped-xattr" and
1861 "mapped-file".
1865 host. Works only with security models "mapped-xattr" and
1866 "mapped-file".
1868 ``throttling.bps-total=b,throttling.bps-read=r,throttling.bps-write=w``
1872 ``throttling.bps-total-max=bm,bps-read-max=rm,bps-write-max=wm``
1877 ``throttling.iops-total=i,throttling.iops-read=r, throttling.iops-write=w``
1881 ``throttling.iops-total-max=im,throttling.iops-read-max=irm, throttling.iops-write-max=iwm``
1886 ``throttling.iops-size=is``
1890 -fsdev option is used along with -device driver "virtio-9p-...".
1892 ``-device virtio-9p-type,fsdev=id,mount_tag=mount_tag``
1893 Options for virtio-9p-... driver are:
1899 ``fsdev=id``
1900 Specifies the id value specified along with -fsdev option.
1908 … "-virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none\n"
1909 …" [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|…
1910 "-virtfs synth,mount_tag=tag[,id=id][,readonly=on]\n",
1914 ``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,r…
1916 ``-virtfs synth,mount_tag=mount_tag``
1918 a virtio-9p-device (a.k.a. 9pfs), which essentially means that a certain
1919 directory on host is made directly accessible by guest as a pass-through
1921 host and guests, if desired even accessible, shared by several guests
1924 Note that ``-virtfs`` is actually just a convenience shortcut for its
1925 generalized form ``-fsdev -device virtio-9p-pci``.
1927 The general form of pass-through file system options are:
1935 ``id=id``
1944 Supported security models are "passthrough", "mapped-xattr",
1945 "mapped-file" and "none". In "passthrough" security model, files
1947 guest. This requires QEMU to run as root. In "mapped-xattr"
1950 "mapped-file" these attributes are stored in the hidden
1959 "immediate". This means that host page cache will be used to
1966 default read-write access is given.
1969 Specifies the default mode for newly created files on the host.
1970 Works only with security models "mapped-xattr" and
1971 "mapped-file".
1975 host. Works only with security models "mapped-xattr" and
1976 "mapped-file".
1984 the same 9p export in order to avoid file ID collisions on guest.
1989 shared with the same 9p export. Therefore inode numbers from host
1990 are remapped for guest in a way that would prevent file ID
1992 because the original device IDs from host are never passed and
1994 virtfs always share the same device ID on guest. So two files
1996 on host would otherwise cause a file ID collision and hence
2002 logged (once) by qemu on host side. No further action is performed
2003 in this case that would prevent file ID collisions on guest. This
2016 "-iscsi [user=user][,password=password][,password-secret=secret-id]\n"
2017 " [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE]\n"
2018 " [,initiator-name=initiator-iqn][,id=target-iqn]\n"
2023 ``-iscsi``
2032 "-usb enable on-board USB host controller (if not enabled by default)\n",
2035 ``-usb``
2036 Enable USB emulation on machine types with an on-board USB host
2037 controller (if not enabled by default). Note that on-board USB host
2039 ``-device qemu-xhci`` can be used instead on machines with PCI.
2043 "-usbdevice name add the host or guest USB device 'name'\n",
2046 ``-usbdevice devname``
2047 Add the USB device devname, and enable an on-board USB controller
2049 ``-machine usb=on``). Note that this option is mainly intended for
2050 the user's convenience only. More fine-grained control can be
2051 achieved by selecting a USB host controller (if necessary) and the
2052 desired USB device via the ``-device`` option instead. For example,
2053 instead of using ``-usbdevice mouse`` it is possible to use
2054 ``-device qemu-xhci -device usb-mouse`` to connect the USB mouse
2065 ``usb-braille`` USB device).
2080 ``wacom-tablet``
2092 "-display spice-app[,gl=on|off]\n"
2095 "-display sdl[,gl=on|core|es|off][,grab-mod=<mod>][,show-cursor=on|off]\n"
2096 " [,window-close=on|off]\n"
2099 "-display gtk[,full-screen=on|off][,gl=on|off][,grab-on-hover=on|off]\n"
2100 " [,show-tabs=on|off][,show-cursor=on|off][,window-close=on|off]\n"
2101 " [,show-menubar=on|off][,zoom-to-fit=on|off]\n"
2104 "-display vnc=<display>[,<optargs>]\n"
2107 "-display curses[,charset=<encoding>]\n"
2110 "-display cocoa[,full-grab=on|off][,swap-opt-cmd=on|off]\n"
2111 " [,show-cursor=on|off][,left-command-key=on|off]\n"
2112 " [,full-screen=on|off][,zoom-to-fit=on|off]\n"
2115 "-display egl-headless[,rendernode=<file>]\n"
2118 "-display dbus[,addr=<dbusaddr>]\n"
2121 "-display none\n"
2125 "\"-display gtk\"\n"
2127 "\"-display sdl\"\n"
2129 "\"-display cocoa\"\n"
2131 "\"-vnc localhost:0,to=99,id=default\"\n"
2133 "\"-display none\"\n"
2137 ``-display type``
2138 Select type of display to use. Use ``-display help`` to list the available
2141 ``spice-app[,gl=on|off]``
2147 Export the display over D-Bus interfaces. (Since 7.0)
2152 ``addr=<dbusaddr>`` : D-Bus bus address to connect to.
2154 ``p2p=yes|no`` : Use peer-to-peer connection, accepted via QMP ``add_client``.
2156 ``gl=on|off|core|es`` : Use OpenGL for rendering (the D-Bus interface
2164 ``grab-mod=<mods>`` : Used to select the modifier keys for toggling
2166 either ``lshift-lctrl-lalt`` or ``rctrl``.
2170 ``show-cursor=on|off`` : Force showing the mouse cursor
2172 ``window-close=on|off`` : Allow to quit qemu with window close button
2176 drop-down menus and other UI elements to configure and control
2179 ``full-screen=on|off`` : Start in fullscreen mode
2183 ``grab-on-hover=on|off`` : Grab keyboard input on mouse hover
2185 ``show-tabs=on|off`` : Display the tab bar for switching between the
2189 ``show-cursor=on|off`` : Force showing the mouse cursor
2191 ``window-close=on|off`` : Allow to quit qemu with window close button
2193 ``show-menubar=on|off`` : Display the main window menubar, defaults to "on"
2195 ``zoom-to-fit=on|off`` : Expand video output to the window size,
2211 provides drop-down menus and other UI elements to configure and
2214 ``full-grab=on|off`` : Capture all key presses, including system combos.
2218 https://support.apple.com/en-in/guide/mac-help/mh32356/mac
2220 ``swap-opt-cmd=on|off`` : Swap the Option and Command keys so that their
2221 key codes match their position on non-Mac
2225 ``show-cursor=on|off`` : Force showing the mouse cursor
2227 ``left-command-key=on|off`` : Disable forwarding left command key to host
2229 ``full-screen=on|off`` : Start in fullscreen mode
2231 ``zoom-to-fit=on|off`` : Expand video output to the window size,
2234 ``egl-headless[,rendernode=<file>]``
2245 the QEMU user. This option differs from the -nographic option in
2246 that it only affects what is done with video output; -nographic
2252 "-nographic disable graphical output and redirect serial I/Os to console\n",
2255 ``-nographic``
2263 Use C-a h for help on switching between the console and monitor.
2268 "-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]\n"
2269 " [,x509-key-file=<file>][,x509-key-password=<file>]\n"
2270 " [,x509-cert-file=<file>][,x509-cacert-file=<file>]\n"
2271 " [,x509-dh-key-file=<file>][,addr=addr]\n"
2273 " [,tls-ciphers=<list>]\n"
2274 " [,tls-channel=[main|display|cursor|inputs|record|playback]]\n"
2275 " [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n"
2276 " [,sasl=on|off][,disable-ticketing=on|off]\n"
2277 " [,password-secret=<secret-id>]\n"
2278 " [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]\n"
2279 " [,jpeg-wan-compression=[auto|never|always]]\n"
2280 " [,zlib-glz-wan-compression=[auto|never|always]]\n"
2281 " [,streaming-video=[off|all|filter]][,disable-copy-paste=on|off]\n"
2282 " [,disable-agent-file-xfer=on|off][,agent-mouse=[on|off]]\n"
2283 " [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n"
2286 " at least one of {port, tls-port} is mandatory\n",
2290 ``-spice option[,option[,...]]``
2303 ``password-secret=<secret-id>``
2304 Set the ID of the ``secret`` object containing the password
2321 ``disable-ticketing=on|off``
2324 ``disable-copy-paste=on|off``
2327 ``disable-agent-file-xfer=on|off``
2328 Disable spice-vdagent based file-xfer between the client and the
2331 ``tls-port=<nr>``
2334 ``x509-dir=<dir>``
2335 Set the x509 file directory. Expects same filenames as -vnc
2338 …``x509-key-file=<file>``; \ ``x509-key-password=<file>``; \ ``x509-cert-file=<file>``; \ ``x509-ca…
2341 ``tls-ciphers=<list>``
2344 …``tls-channel=[main|display|cursor|inputs|record|playback]``; \ ``plaintext-channel=[main|display|…
2352 ``image-compression=[auto_glz|auto_lz|quic|glz|lz|off]``
2355 ``jpeg-wan-compression=[auto|never|always]``; \ ``zlib-glz-wan-compression=[auto|never|always]``
2359 ``streaming-video=[off|all|filter]``
2362 ``agent-mouse=[on|off]``
2365 ``playback-compression=[on|off]``
2369 ``seamless-migration=[on|off]``
2381 "-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none]\n"
2384 ``-vga type``
2391 the host OS. (This card was the default before QEMU 2.2)
2401 VMWare SVGA-II compatible adapter. Use it if you have
2413 framebuffer for sun4m machines and offers both 8-bit and 24-bit
2417 (sun4m only) Sun cgthree framebuffer. This is a simple 8-bit
2429 DEF("full-screen", 0, QEMU_OPTION_full_screen,
2430 "-full-screen start in full screen\n", QEMU_ARCH_ALL)
2432 ``-full-screen``
2437 "-g WxH[xDEPTH] Set the initial graphical resolution and depth\n",
2440 ``-g`` *width*\ ``x``\ *height*\ ``[x``\ *depth*\ ``]``
2453 "-vnc <display> shorthand for -display vnc=<display>\n", QEMU_ARCH_ALL)
2456 ``-vnc display[,option[,option[,...]]]``
2462 using this option (option ``-device usb-tablet``). When using the
2463 VNC display, you must use the ``-k`` parameter to set the keyboard
2464 layout if you are not using en-us. Valid syntax for the display is
2468 until the number L, if the originally defined "-vnc display" is
2472 ``host:d``
2473 TCP connections will only be allowed from host on display d. By
2474 convention the TCP port is 5900+d. Optionally, host can be
2476 any host.
2492 connections (host:d,``reverse``), the d argument is a TCP port
2501 If host is specified connections will only be allowed from this
2502 host. It is possible to control the websocket listen address
2503 independently, using the syntax ``websocket``\ =host:port.
2524 should use ``expire_password <protocol> <expiration-time>``
2535 ``password-secret=<secret-id>``
2538 object identified by ``secret-id``.
2540 ``tls-creds=ID``
2541 Provides the ID of a set of TLS credentials to use to secure the
2546 using the ``-object tls-creds`` argument.
2548 ``tls-authz=ID``
2549 Provides the ID of the QAuthZ authorization object against which
2571 ``sasl-authz=ID``
2572 Provides the ID of the QAuthZ authorization object against which
2581 creation of two ``authz-list`` objects with IDs of
2586 ``sasl-authz`` and ``tls-authz`` options are a replacement.
2594 ``non-adaptive=on|off``
2602 ``share=[allow-exclusive|force-shared|ignore]``
2603 Set display sharing policy. 'allow-exclusive' allows clients to
2607 session (vncviewer: -shared switch). This is the default.
2608 'force-shared' disables exclusive client access. Useful for
2610 specify -shared disconnect everybody else. 'ignore' completely
2615 ``key-delay-ms``
2617 milliseconds. Default is 10. Keyboards are low-bandwidth
2625 transmission. When not using an -audiodev argument, this option
2629 ``power-control=on|off``
2638 DEF("win2k-hack", 0, QEMU_OPTION_win2k_hack,
2639 "-win2k-hack use it when installing Windows 2000 to avoid a disk full bug\n",
2642 ``-win2k-hack``
2645 option slows down the IDE transfers). Synonym of ``-global
2646 ide-device.win2k-install-hack=on``.
2649 DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk,
2650 "-no-fd-bootchk disable boot signature checking for floppy disks\n",
2653 ``-no-fd-bootchk``
2655 needed to boot from old floppy disks. Synonym of ``-m fd-bootchk=off``.
2659 …"-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,a…
2662 ``-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n] [,asl_compiler_id=str][,…
2675 "-smbios file=binary\n"
2677 "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]\n"
2680 "-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
2683 "-smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
2686 "-smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str]\n"
2689 "-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]\n"
2690 " [,asset=str][,part=str][,max-speed=%d][,current-speed=%d]\n"
2691 " [,processor-family=%d][,processor-id=%d]\n"
2693 …"-smbios type=8[,external_reference=str][,internal_reference=str][,connector_type=%d][,port_type=%…
2695 "-smbios type=11[,value=str][,path=filename]\n"
2697 "-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
2700 "-smbios type=41[,designation=str][,kind=str][,instance=%d][,pcidev=str]\n"
2704 ``-smbios file=binary``
2707 ``-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d][,uefi=on|off]``
2710 ``-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str][,uuid=uuid][,sku=str][…
2713 ``-smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str][,asset=str][,location=…
2716 ``-smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str][,sku=str]``
2719 ``-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str][,asset=str][,part=str…
2722 ``-smbios type=9[,slot_designation=str][,slot_type=%d][,slot_data_bus_width=%d][,current_usage=%d][…
2725 ``-smbios type=11[,value=str][,path=filename]``
2742 data set, for example, by specifying the serial ID of a block device.
2746 .. parsed-literal::
2748 -smbios type=11,value=cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/,\\
2754 .. parsed-literal::
2756 $ dmidecode -t 11
2759 String 1: cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/
2764 ``-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str][,asset=str][,part=str][,…
2767 ``-smbios type=41[,designation=str][,kind=str][,instance=%d][,pcidev=str]``
2776 .. parsed-literal::
2778 -netdev user,id=internet \\
2779 -device virtio-net-pci,mac=50:54:00:00:00:42,netdev=internet,id=internet-dev \\
2780 -smbios type=41,designation='Onboard LAN',instance=1,kind=ethernet,pcidev=internet-dev
2784 ..parsed-literal::
2786 $ ip -brief l
2800 "-netdev user,id=str[,ipv4=on|off][,net=addr[/mask]][,host=addr]\n"
2801 " [,ipv6=on|off][,ipv6-net=addr[/int]][,ipv6-host=addr]\n"
2802 " [,restrict=on|off][,hostname=host][,dhcpstart=addr]\n"
2803 " [,dns=addr][,ipv6-dns=addr][,dnssearch=domain][,domainname=domain]\n"
2804 " [,tftp=dir][,tftp-server-name=name][,bootfile=f][,hostfwd=rule][,guestfwd=rule]"
2808 " configure a user mode network backend with ID 'str',\n"
2812 "-netdev tap,id=str,ifname=name\n"
2813 " configure a host TAP network backend with ID 'str'\n"
2815 "-netdev tap,id=str[,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile]\n"
2818 " [,poll-us=n]\n"
2819 " configure a host TAP network backend with ID 'str'\n"
2835 " use vhostforce=on to force vhost on for non-MSIX virtio guests\n"
2839 " use 'poll-us=n' to specify the maximum number of microseconds that could be\n"
2841 "-netdev bridge,id=str[,br=bridge][,helper=helper]\n"
2842 " configure a host TAP network backend with ID 'str' that is\n"
2847 "-netdev l2tpv3,id=str,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport]\n"
2851 " configure a network backend with ID 'str' connected to\n"
2855 " VM to a router and even VM to Host. It is a nearly-universal\n"
2856 " standard (RFC3931). Note - this implementation uses static\n"
2857 " pre-configured tunnels (same as the Linux kernel).\n"
2869 " use 'counter=off' to force a 'cut-down' L2TPv3 with no counter\n"
2873 "-netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port]\n"
2876 "-netdev socket,id=str[,fd=h][,mcast=maddr:port[,localaddr=addr]]\n"
2878 " use 'localaddr=addr' to specify the host address to send packets from\n"
2879 "-netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port]\n"
2882-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,n…
2883 …"-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|o…
2884 …"-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect-ms=millise…
2887 …"-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=inet,local.h…
2888 …"-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=fd,local.str…
2890 " use ``local.host=addr`` to specify the host address to send packets from\n"
2891 …"-netdev dgram,id=str,local.type=inet,local.host=addr,local.port=port[,remote.type=inet,remote.hos…
2892 "-netdev dgram,id=str,local.type=unix,local.path=path[,remote.type=unix,remote.path=path]\n"
2893 "-netdev dgram,id=str,local.type=fd,local.str=file-descriptor\n"
2897 "-netdev vde,id=str[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n"
2899 " running on host and listening for incoming connections on 'socketpath'.\n"
2904 "-netdev netmap,id=str,ifname=name[,devname=nmname]\n"
2905 " attach to the existing netmap-enabled network interface 'name', or to a\n"
2910 "-netdev af-xdp,id=str,ifname=name[,mode=native|skb][,force-copy=on|off]\n"
2911 " [,queues=n][,start-queue=m][,inhibit=on|off][,sock-fds=x:y:...:z]\n"
2914 …" use 'force-copy=on|off' to force XDP copy mode even if device supports zero-copy …
2917 " use 'sock-fds' to provide file descriptors for already open AF_XDP sockets\n"
2920 " use 'start-queue=m' to specify the first queue that should be used\n"
2923 "-netdev vhost-user,id=str,chardev=dev[,vhostforce=on|off]\n"
2924 " configure a vhost-user network, backed by a chardev 'dev'\n"
2927 "-netdev vhost-vdpa,id=str[,vhostdev=/path/to/dev][,vhostfd=h]\n"
2928 " configure a vhost-vdpa network,Establish a vhost-vdpa netdev\n"
2933 "-netdev vmnet-host,id=str[,isolated=on|off][,net-uuid=uuid]\n"
2934 " [,start-address=addr,end-address=addr,subnet-mask=mask]\n"
2935 " configure a vmnet network backend in host mode with ID 'str',\n"
2939 " vmnet-host interfaces within this isolated network\n"
2940 "-netdev vmnet-shared,id=str[,isolated=on|off][,nat66-prefix=addr]\n"
2941 " [,start-address=addr,end-address=addr,subnet-mask=mask]\n"
2942 " configure a vmnet network backend in shared mode with ID 'str',\n"
2946 "-netdev vmnet-bridged,id=str,ifname=name[,isolated=on|off]\n"
2947 " configure a vmnet network backend in bridged mode with ID 'str',\n"
2951 "-netdev hubport,id=str,hubid=n[,netdev=nd]\n"
2952 " configure a hub port on the hub with ID 'n'\n", QEMU_ARCH_ALL)
2954 "-nic [tap|bridge|"
2968 "af-xdp|"
2971 "vhost-user|"
2974 "vmnet-host|vmnet-shared|vmnet-bridged|"
2977 " initialize an on-board / default host NIC (using MAC address\n"
2978 " macaddr) and connect it to the given host network backend\n"
2979 "-nic none use it alone to have zero network devices (the default is to\n"
2983 "-net nic[,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n"
2984 " configure or create an on-board (or machine default) NIC and\n"
2985 " connect it to hub 0 (please use -nic unless you need a hub)\n"
2986 "-net ["
2999 "af-xdp|"
3002 "vmnet-host|vmnet-shared|vmnet-bridged|"
3005 " old way to initialize a host network interface\n"
3006 " (use the -netdev option if possible instead)\n", QEMU_ARCH_ALL)
3008 ``-nic [tap|bridge|user|l2tpv3|vde|netmap|af-xdp|vhost-user|socket][,...][,mac=macaddr][,model=mn]``
3009 This option is a shortcut for configuring both the on-board
3010 (default) guest NIC hardware and the host network backend in one go.
3011 The host backend options are the same as with the corresponding
3012 ``-netdev`` options below. The guest NIC model can be set with
3016 The following two example do exactly the same, to show how ``-nic``
3019 .. parsed-literal::
3021 |qemu_system| -netdev user,id=n1,ipv6=off -device e1000,netdev=n1,mac=52:54:98:76:54:32
3022 |qemu_system| -nic user,ipv6=off,model=e1000,mac=52:54:98:76:54:32
3024 ``-nic none``
3026 override the default configuration (default NIC with "user" host
3030 ``-netdev user,id=id[,option][,option][,...]``
3031 Configure user mode host network backend which requires no
3034 ``id=id``
3044 top-most bits. Default is 10.0.2.0/24.
3046 ``host=addr``
3047 Specify the guest-visible address of the host. Default is the
3050 ``ipv6-net=addr[/int]``
3054 as the number of valid top-most bits (default is 64).
3056 ``ipv6-host=addr``
3057 Specify the guest-visible IPv6 address of the host. Default is
3062 will not be able to contact the host and no guest IP packets
3063 will be routed over the host to the outside. This option does
3067 Specifies the client hostname reported by the built-in DHCP
3071 Specify the first of the 16 IPs the built-in DHCP server can
3076 Specify the guest-visible address of the virtual nameserver. The
3077 address must be different from the host address. Default is the
3080 ``ipv6-dns=addr``
3081 Specify the guest-visible address of the IPv6 virtual
3082 nameserver. The address must be different from the host address.
3086 Provides an entry for the domain-search list sent by the
3087 built-in DHCP server. More than one domain suffix can be
3095 .. parsed-literal::
3097 |qemu_system| -nic user,dnssearch=mgmt.example.org,dnssearch=example.org
3100 Specifies the client domain name reported by the built-in DHCP
3104 When using the user mode network stack, activate a built-in TFTP
3108 The built-in TFTP server is read-only; it does not implement any
3111 ``tftp-server-name=name``
3115 the host address.
3124 .. parsed-literal::
3126 |qemu_system| -hda linux.img -boot n -device e1000,netdev=n1 \\
3127 -netdev user,id=n1,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
3130 When using the user mode network stack, activate a built-in SMB
3131 server so that Windows OSes can access to the host files in
3148 Note that a SAMBA server must be installed on the host OS.
3150 ``hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport``
3151 Redirect incoming TCP or UDP connections to the host port
3154 (default first address given by the built-in DHCP server). By
3155 specifying hostaddr, the rule can be bound to a specific host
3159 For example, to redirect host X11 connection from screen 1 to
3162 .. parsed-literal::
3164 # on the host
3165 |qemu_system| -nic user,hostfwd=tcp:127.0.0.1:6001-:6000
3166 # this host xterm should open in the guest X11 server
3167 xterm -display :1
3169 To redirect telnet connections from host port 5555 to telnet
3172 .. parsed-literal::
3174 # on the host
3175 |qemu_system| -nic user,hostfwd=tcp::5555-:23
3178 Then when you use on the host ``telnet localhost 5555``, you
3181 ``guestfwd=[tcp]:server:port-dev``; \ ``guestfwd=[tcp]:server:port-cmd:command``
3190 .. parsed-literal::
3194 |qemu_system| -nic user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321
3200 .. parsed-literal::
3204 |qemu_system| -nic 'user,id=n1,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
3206 ``-netdev tap,id=id[,fd=h][,ifname=name][,script=file][,downscript=dfile][,br=bridge][,helper=helpe…
3207 Configure a host TAP network backend with ID id.
3212 ``/etc/qemu-ifup`` and the default network deconfigure script is
3213 ``/etc/qemu-ifdown``. Use ``script=no`` or ``downscript=no`` to
3219 ``/path/to/qemu-bridge-helper`` and the default bridge device is
3223 host TAP interface.
3227 .. parsed-literal::
3230 |qemu_system| linux.img -nic tap
3232 .. parsed-literal::
3237 -netdev tap,id=nd0,ifname=tap0 -device e1000,netdev=nd0 \\
3238 -netdev tap,id=nd1,ifname=tap1 -device rtl8139,netdev=nd1
3240 .. parsed-literal::
3244 |qemu_system| linux.img -device virtio-net-pci,netdev=n1 \\
3245 -netdev tap,id=n1,"helper=/path/to/qemu-bridge-helper"
3247 ``-netdev bridge,id=id[,br=bridge][,helper=helper]``
3248 Connect a host TAP network interface to a host bridge device.
3252 ``/path/to/qemu-bridge-helper`` and the default bridge device is
3257 .. parsed-literal::
3261 |qemu_system| linux.img -netdev bridge,id=n1 -device virtio-net,netdev=n1
3263 .. parsed-literal::
3267 |qemu_system| linux.img -netdev bridge,br=qemubr0,id=n1 -device virtio-net,netdev=n1
3269 ``-netdev socket,id=id[,fd=h][,listen=[host]:port][,connect=host:port]``
3270 This host network backend can be used to connect the guest's network
3273 (host is optional). ``connect`` is used to connect to another QEMU
3279 .. parsed-literal::
3283 -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\
3284 -netdev socket,id=n1,listen=:1234
3287 -device e1000,netdev=n2,mac=52:54:00:12:34:57 \\
3288 -netdev socket,id=n2,connect=127.0.0.1:1234
3290 ``-netdev socket,id=id[,fd=h][,mcast=maddr:port[,localaddr=addr]]``
3291 Configure a socket host network backend to share the guest's network
3300 ``ethN=mcast``), see http://user-mode-linux.sf.net.
3306 .. parsed-literal::
3310 -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\
3311 -netdev socket,id=n1,mcast=230.0.0.1:1234
3314 -device e1000,netdev=n2,mac=52:54:00:12:34:57 \\
3315 -netdev socket,id=n2,mcast=230.0.0.1:1234
3318 -device e1000,netdev=n3,mac=52:54:00:12:34:58 \\
3319 -netdev socket,id=n3,mcast=230.0.0.1:1234
3323 .. parsed-literal::
3327 -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\
3328 -netdev socket,id=n1,mcast=239.192.168.1:1102
3332 Example (send packets from host's 1.2.3.4):
3334 .. parsed-literal::
3337 -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\
3338 -netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4
3340-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,n…
3346 ``addr.host=host,addr.port=port``
3353 …if ``on`` ``host`` and ``port`` are guaranteed to be numeric, otherwise a name resolution should b…
3355 ``keep-alive=on|off``
3356 enable keep-alive when connecting to this socket. Not supported for passive sockets.
3367 ``reconnect-ms=milliseconds``
3373 .. parsed-literal::
3377 -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
3378-netdev stream,id=net0,server=on,addr.type=inet,addr.host=localhost,addr.port=1234
3381 -device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
3382-netdev stream,id=net0,server=off,addr.type=inet,addr.host=localhost,addr.port=1234,reconnect-ms=5…
3384 ``-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|o…
3399 ``reconnect-ms=milliseconds``
3403 Example (using passt as a replacement of -netdev user):
3405 .. parsed-literal::
3412 -device virtio-net,netdev=net0 \\
3413 -netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/passt_1.socket
3417 .. parsed-literal::
3421 -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
3422 netdev stream,id=net0,server=on,addr.type=unix,addr.path=/tmp/qemu0
3425 -device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
3426-netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/qemu0,reconnect-ms=5000
3428 ``-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect-ms=millise…
3434 ``addr.str=file-descriptor``
3437 ``reconnect-ms=milliseconds``
3441 ``-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=inet,local.h…
3444 ``remote.host=maddr,remote.port=port``
3447 ``local.host=addr``
3448 specify the host address to send packets from
3452 .. parsed-literal::
3456 -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
3457 -netdev dgram,id=net0,remote.type=inet,remote.host=224.0.0.1,remote.port=1234
3460 -device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
3461 -netdev dgram,id=net0,remote.type=inet,remote.host=224.0.0.1,remote.port=1234
3464 -device virtio-net,netdev=net0,mac=52:54:00:12:34:58 \\
3465 -netdev dgram,id=net0,remote.type=inet,remote.host=224.0.0.1,remote.port=1234
3467 ``-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=fd,local.str…
3470 ``remote.host=maddr,remote.port=port``
3473 ``local.str=file-descriptor``
3476 ``-netdev dgram,id=str,local.type=inet,local.host=addr,local.port=port[,remote.type=inet,remote.hos…
3480 ``local.host=addr,local.port=port``
3483 ``remote.host=addr,remote.port=port``
3488 .. parsed-literal::
3492 -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
3493-netdev dgram,id=net0,local.type=inet,local.host=localhost,local.port=1234,remote.type=inet,remote…
3496 -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
3497-netdev dgram,id=net0,local.type=inet,local.host=localhost,local.port=1235,remote.type=inet,remote…
3499 ``-netdev dgram,id=str,local.type=unix,local.path=path[,remote.type=unix,remote.path=path]``
3511 .. parsed-literal::
3515 -device virtio-net,netdev=net0,mac=52:54:00:12:34:56 \\
3516-netdev dgram,id=net0,local.type=unix,local.path=/tmp/qemu0,remote.type=unix,remote.path=/tmp/qemu1
3519 -device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
3520-netdev dgram,id=net0,local.type=unix,local.path=/tmp/qemu1,remote.type=unix,remote.path=/tmp/qemu0
3522 ``-netdev dgram,id=str,local.type=fd,local.str=file-descriptor``
3526 ``local.str=file-descriptor``
3529 ``-netdev l2tpv3,id=id,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport],txsession=txsess…
3530 Configure a L2TPv3 pseudowire host network backend. L2TPv3 (RFC3931)
3565 Force a 'cut-down' L2TPv3 with no counter as in
3566 draft-mkonstan-l2tpext-keyed-ipv6-tunnel-00
3575 For example, to attach a VM running on host 4.3.2.1 via L2TPv3 to
3576 the bridge br-lan on the remote Linux host 1.2.3.4:
3578 .. parsed-literal::
3580 # Setup tunnel on linux host using raw ip as encapsulation
3588 brctl addif br-lan vmtunnel0
3592 # launch QEMU instance - if your network has reorder or is very lossy add ,pincounter
3594 |qemu_system| linux.img -device e1000,netdev=n1 \\
3595-netdev l2tpv3,id=n1,src=4.2.3.1,dst=1.2.3.4,udp=on,srcport=16384,dstport=16384,rxsession=0xffffff…
3597 ``-netdev vde,id=id[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]``
3599 on host and listening for incoming connections on socketpath. Use
3606 .. parsed-literal::
3609 vde_switch -F -sock /tmp/myswitch
3611 |qemu_system| linux.img -nic vde,sock=/tmp/myswitch
3613 ``-netdev af-xdp,id=str,ifname=name[,mode=native|skb][,force-copy=on|off][,queues=n][,start-queue=m…
3616 XDP program can be forced with 'mode', defaults to best-effort,
3619 defaults to 1. Traffic arriving on non-configured device queues will
3622 .. parsed-literal::
3625 ethtool -L eth0 combined 4
3627 |qemu_system| linux.img -device virtio-net-pci,netdev=n1 \\
3628 -netdev af-xdp,id=n1,ifname=eth0,queues=4
3630 'start-queue' option can be specified if a particular range of queues
3638 .. parsed-literal::
3641 ethtool -L eth0 combined 1
3642 # redirect all the traffic to the second queue (id: 1)
3643 # note: drivers may require non-empty key/mask pair.
3644 ethtool -N eth0 flow-type ether \\
3646 ethtool -N eth0 flow-type ether \\
3649 |qemu_system| linux.img -device virtio-net-pci,netdev=n1 \\
3650 -netdev af-xdp,id=n1,ifname=eth0,queues=1,start-queue=1
3653 should be set to 'on' and 'sock-fds' provided with file descriptors for
3657 .. parsed-literal::
3659 |qemu_system| linux.img -device virtio-net-pci,netdev=n1 \\
3660 -netdev af-xdp,id=n1,ifname=eth0,queues=3,inhibit=on,sock-fds=15:16:17
3662 ``-netdev vhost-user,chardev=id[,vhostforce=on|off][,queues=n]``
3663 Establish a vhost-user netdev, backed by a chardev id. The chardev
3664 should be a unix domain socket backed one. The vhost-user uses a
3667 non-MSIX guests, the feature can be forced with vhostforce. Use
3669 multiqueue vhost-user.
3675 qemu -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
3676 -numa node,memdev=mem \
3677 -chardev socket,id=chr0,path=/path/to/socket \
3678 -netdev type=vhost-user,id=net0,chardev=chr0 \
3679 -device virtio-net-pci,netdev=net0
3681 ``-netdev vhost-vdpa[,vhostdev=/path/to/dev][,vhostfd=h]``
3682 Establish a vhost-vdpa netdev.
3689 ``-netdev hubport,id=id,hubid=hubid[,netdev=nd]``
3690 Create a hub port on the emulated hub with ID hubid.
3694 hubport to another netdev with ID nd by using the ``netdev=nd``
3697 ``-net nic[,netdev=nd][,macaddr=mac][,model=type] [,name=name][,addr=addr][,vectors=v]``
3698 Legacy option to configure or create an on-board (or machine
3700 emulated hub with ID 0 (i.e. the default hub), or to the netdev nd.
3707 can specify the number v of MSI-X vectors that the card should have;
3709 disable MSI-X. If no ``-net`` option is specified, a single NIC is
3711 Use ``-net nic,model=help`` for a list of available devices for your
3714 ``-net user|tap|bridge|socket|l2tpv3|vde[,...][,name=name]``
3715 Configure a host network backend (with the options corresponding to
3716 the same ``-netdev`` option) and connect it to the emulated hub 0
3725 "-chardev help\n"
3726 "-chardev null,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3727 …"-chardev socket,id=id[,host=host],port=port[,to=to][,ipv4=on|off][,ipv6=on|off][,nodelay=on|off]\…
3728 …" [,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect-ms=millisec…
3729 " [,logfile=PATH][,logappend=on|off][,tls-creds=ID][,tls-authz=ID] (tcp)\n"
3730 …"-chardev socket,id=id,path=path[,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][…
3732 "-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n"
3735 "-chardev msmouse,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3736 "-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n"
3738 "-chardev ringbuf,id=id[,size=size][,logfile=PATH][,logappend=on|off]\n"
3739 …"-chardev file,id=id,path=path[,input-path=input-file][,mux=on|off][,logfile=PATH][,logappend=on|o…
3740 "-chardev pipe,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3742 "-chardev console,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3743 "-chardev serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3745 "-chardev pty,id=id[,path=path][,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3746 "-chardev stdio,id=id[,mux=on|off][,signal=on|off][,logfile=PATH][,logappend=on|off]\n"
3749 "-chardev braille,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3753 "-chardev serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3756 "-chardev parallel,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
3759 "-chardev spicevmc,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off]\n"
3760 "-chardev spiceport,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off]\n"
3768 ``-chardev backend,id=id[,mux=on|off][,options]``
3775 Use ``-chardev help`` to print all available chardev backend types.
3777 All devices must have an id, which can be any string up to 127
3782 front-ends. Specify ``mux=on`` to enable this mode. A multiplexer is
3785 to a chardev. If you create a chardev with ``id=myid`` and
3786 ``mux=on``, QEMU will create a multiplexer with your specified ID,
3788 ID for their input/output. Up to four different front ends can be
3796 -chardev stdio,mux=on,id=char0 \
3797 -mon chardev=char0,mode=readline \
3798 -serial chardev:char0 \
3799 -serial chardev:char0
3808 -chardev stdio,mux=on,id=char0 \
3809 -mon chardev=char0,mode=readline \
3810 -parallel chardev:char0 \
3811 -chardev tcp,...,mux=on,id=char1 \
3812 -serial chardev:char1 \
3813 -serial chardev:char1
3821 multiplexed character backends; for instance ``-serial mon:stdio``
3823 the QEMU monitor, and ``-nographic`` also multiplexes the console
3838 ``-chardev null,id=id``
3842-chardev socket,id=id[,TCP options or unix options][,server=on|off][,wait=on|off][,telnet=on|off][…
3843 Create a two-way stream socket, which can be either a TCP or a unix
3859 ``reconnect-ms`` sets the timeout for reconnecting on non-server
3864 ``tls-creds`` requests enablement of the TLS protocol for
3865 encryption, and specifies the id of the TLS credentials to use for
3867 ``-object tls-creds`` argument.
3869 ``tls-auth`` provides the ID of the QAuthZ authorization object
3877 ``TCP options: port=port[,host=host][,to=to][,ipv4=on|off][,ipv6=on|off][,nodelay=on|off]``
3878 ``host`` for a listening socket specifies the local address to
3879 be bound. For a connecting socket species the remote host to
3880 connect to. ``host`` is optional for listening sockets. If not
3885 host to connect to. ``port`` can be given as either a port
3907 ``-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr][,localport=localport][,ipv4=on|off…
3908 Sends all traffic from the guest to a remote host over UDP.
3910 ``host`` specifies the remote host to connect to. If not specified
3913 ``port`` specifies the port on the remote host to connect to.
3925 ``-chardev msmouse,id=id``
3929 ``-chardev hub,id=id,chardevs.0=id[,chardevs.N=id]``
3949 -chardev pty,path=/tmp/pty,id=pty0 \
3950 -chardev vc,id=vc0 \
3951 -chardev hub,id=hub0,chardevs.0=pty0,chardevs.1=vc0 \
3952 -device virtconsole,chardev=hub0 \
3953 -vnc 0.0.0.0:0
3963 # Start VNC client and switch to virtual console Ctrl-Alt-2
3969 ``-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]``
3979 ``-chardev ringbuf,id=id[,size=size]``
3983 ``-chardev file,id=id,path=path[,input-path=input-path]``
3990 If ``input-path`` is specified, this is the path of a second file
3991 which will be used for input. If ``input-path`` is not specified,
3994 Note that ``input-path`` is not supported on Windows hosts.
3996 ``-chardev pipe,id=id,path=path``
3997 Create a two-way connection to the guest. The behaviour differs
4011 ``-chardev console,id=id``
4017 ``-chardev serial,id=id,path=path``
4018 Send traffic from the guest to a serial device on the host.
4025 ``-chardev pty,id=id[,path=path]``
4026 Create a new pseudo-terminal on the host and connect to it.
4041 ``-chardev stdio,id=id[,signal=on|off]``
4045 includes exiting QEMU with the key sequence Control-c. This option
4048 ``-chardev braille,id=id``
4052 ``-chardev parallel,id=id,path=path``
4062 ``-chardev spicevmc,id=id,debug=debug,name=name``
4071 ``-chardev spiceport,id=id,debug=debug,name=name``
4088 "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
4090 " use cancel-path to provide path to TPM's cancel sysfs entry; if\n"
4092 "-tpmdev emulator,id=id,chardev=dev\n"
4098 ``-tpmdev backend,id=id[,options]``
4100 ``-tpmdev`` option creates the TPM backend and requires a
4101 ``-device`` option that specifies the TPM frontend interface model.
4103 Use ``-tpmdev help`` to print all available TPM backend types.
4107 ``-tpmdev passthrough,id=id,path=path,cancel-path=cancel-path``
4108 (Linux-host only) Enable access to the host's TPM using the
4111 ``path`` specifies the path to the host's TPM device, i.e., on a
4112 Linux host this would be ``/dev/tpm0``. ``path`` is optional and by
4115 ``cancel-path`` specifies the path to the host TPM device's sysfs
4117 ``cancel-path`` is optional and by default QEMU will search for the
4120 Some notes about using the host's TPM with the passthrough driver:
4123 by any other application on the host.
4125 Since the host's firmware (BIOS/UEFI) has already initialized the
4127 the TPM again and may therefore not show a TPM-specific menu that
4130 TPM ownership is released from within a VM then the host's TPM will
4132 afterwards, the host has to be rebooted and the user is required to
4140 -tpmdev passthrough,id=tpm0 -device tpm-tis,tpmdev=tpm0
4142 Note that the ``-tpmdev`` id is ``tpm0`` and is referenced by
4145 ``-tpmdev emulator,id=id,chardev=dev``
4146 (Linux-host only) Enable access to a TPM emulator using Unix domain
4149 ``chardev`` specifies the unique ID of a character device backend
4156-chardev socket,id=chrtpm,path=/tmp/swtpm-sock -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm
4167 - specify a firmware and let it control finding a kernel
4168 - specify a firmware and pass a hint to the kernel to boot
4169 - direct kernel image boot
4170 - manually load files into the guest's address space
4188 For x86 machines and some other architectures ``-bios`` will generally
4190 more strict ``-pflash`` option needs an image that is sized for the
4193 Please see the :ref:`system-targets-ref` section of the manual for
4199 "-bios file set the filename for the BIOS\n", QEMU_ARCH_ALL)
4201 ``-bios file``
4206 "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_ALL)
4208 ``-pflash file``
4228 "-kernel bzImage use 'bzImage' as kernel image\n", QEMU_ARCH_ALL)
4230 ``-kernel bzImage``
4236 "-shim shim.efi use 'shim.efi' to boot the kernel\n", QEMU_ARCH_ALL)
4238 ``-shim shim.efi``
4243 "-append cmdline use 'cmdline' as kernel command line\n", QEMU_ARCH_ALL)
4245 ``-append cmdline``
4250 "-initrd file use 'file' as initial ram disk\n", QEMU_ARCH_ALL)
4253 ``-initrd file``
4256 ``-initrd "file1 arg=foo,file2"``
4263 ``-initrd "bzImage earlyprintk=xen,,keep root=/dev/xvda1,initrd.img"``
4271 "-dtb file use 'file' as device tree image\n", QEMU_ARCH_ALL)
4273 ``-dtb file``
4287 ``-device loader,addr=<addr>,data=<data>,data-len=<data-len>[,data-be=<data-be>][,cpu-num=<cpu-num>…
4290 tweaks the DTB so a hypervisor loaded via ``-kernel`` can find where
4293 ``-device guest-loader,addr=<addr>[,kernel=<path>,[bootargs=<arguments>]][,initrd=<path>]``
4302 "-compat [deprecated-input=accept|reject|crash][,deprecated-output=accept|hide]\n"
4304 "-compat [unstable-input=accept|reject|crash][,unstable-output=accept|hide]\n"
4308 ``-compat [deprecated-input=@var{input-policy}][,deprecated-output=@var{output-policy}]``
4311 ``deprecated-input=accept`` (default)
4313 ``deprecated-input=reject``
4315 ``deprecated-input=crash``
4317 ``deprecated-output=accept`` (default)
4319 ``deprecated-output=hide``
4324 ``-compat [unstable-input=@var{input-policy}][,unstable-output=@var{output-policy}]``
4327 ``unstable-input=accept`` (default)
4329 ``unstable-input=reject``
4331 ``unstable-input=crash``
4333 ``unstable-output=accept`` (default)
4335 ``unstable-output=hide``
4342 "-fw_cfg [name=]<name>,file=<file>\n"
4344 "-fw_cfg [name=]<name>,string=<str>\n"
4348 ``-fw_cfg [name=]name,file=file``
4353 ``-fw_cfg [name=]name,string=str``
4368 -fw_cfg name=opt/com.mycompany/blob,file=./my_blob.bin
4375 "-serial dev redirect the serial port to char device 'dev'\n",
4378 ``-serial dev``
4379 Redirect the virtual serial port to host character device dev. The
4386 You can use ``-serial none`` to suppress the creation of default
4432 ``chardev:id``
4433 Use a named character device defined with the ``-chardev``
4437 [Linux only] Use host tty, e.g. ``/dev/ttyS0``. The host serial
4441 [Linux only, parallel port only] Use host parallel port N.
4454 [Windows only] Use host serial port n
4463 ``-serial udp::4555`` and nc as: ``nc -u -l -p 4555``. Any time
4469 the same source port each time by using something like ``-serial
4479 -serial udp::4555@:4556
4482 -u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
4487 ``tcp:[host]:port[,server=on|off][,wait=on|off][,nodelay=on|off][,reconnect-ms=milliseconds]``
4490 location. By default the TCP Net Console is sent to host at the
4494 option disables the Nagle buffering algorithm. The ``reconnect-ms``
4496 down it will attempt to reconnect at the given interval. If host
4502 -serial tcp:192.168.0.2:4444
4505 -serial tcp::4444,server=on
4508 -serial tcp:192.168.0.100:4444,server=on,wait=off
4510 ``telnet:host:port[,server=on|off][,wait=on|off][,nodelay=on|off]``
4512 options work the same as if you had specified ``-serial tcp``.
4517 you do it with Control-] and then type "send break" followed by
4520 ``websocket:host:port,server=on[,wait=on|off][,nodelay=on|off]``
4524 ``unix:path[,server=on|off][,wait=on|off][,reconnect-ms=milliseconds]``
4526 works the same as if you had specified ``-serial tcp`` except
4532 sequence of Control-a and then pressing c. dev\_string should be
4537 ``-serial mon:telnet::4444,server=on,wait=off``
4553 "-parallel dev redirect the parallel port to char device 'dev'\n",
4556 ``-parallel dev``
4557 Redirect the virtual parallel port to host device dev (same devices
4559 to use hardware devices connected on the corresponding host parallel
4565 Use ``-parallel none`` to disable all parallel ports.
4569 "-monitor dev redirect the monitor to char device 'dev'\n",
4572 ``-monitor dev``
4573 Redirect the monitor to host device dev (same devices as the serial
4575 in non graphical mode. Use ``-monitor none`` to disable the default
4579 "-qmp dev like -monitor but opens in 'control' mode\n",
4582 ``-qmp dev``
4583 Like ``-monitor`` but opens in 'control' mode. For example, to make
4586 -qmp tcp:localhost:4444,server=on,wait=off
4589 flexibility use the ``-mon`` option and an accompanying ``-chardev``.
4592 DEF("qmp-pretty", HAS_ARG, QEMU_OPTION_qmp_pretty, \
4593 "-qmp-pretty dev like -qmp but uses pretty JSON formatting\n",
4596 ``-qmp-pretty dev``
4597 Like ``-qmp`` but uses pretty JSON formatting.
4601 "-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]\n", QEMU_ARCH_ALL)
4603 ``-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]``
4607 (QMP; a JSON RPC-style protocol).
4615 -chardev socket,id=mon1,host=localhost,port=4444,server=on,wait=off \
4616 -mon chardev=mon1,mode=control,pretty=on
4618 enables the QMP monitor on localhost port 4444 with pretty-printing.
4622 "-debugcon dev redirect the debug console to char device 'dev'\n",
4625 ``-debugcon dev``
4626 Redirect the debug console to host device dev (same devices as the
4634 "-pidfile file write PID to 'file'\n", QEMU_ARCH_ALL)
4636 ``-pidfile file``
4642 "--preconfig pause QEMU before machine is initialized (experimental)\n",
4645 ``--preconfig``
4648 affect machine initialization. Use QMP command 'x-exit-preconfig' to
4650 if -S isn't used or pause the second time if -S is used). This
4655 "-S freeze CPU at startup (use 'c' to start execution)\n",
4658 ``-S``
4663 "-overcommit [mem-lock=on|off|on-fault][cpu-pm=on|off]\n"
4665 " mem-lock=on|off|on-fault controls memory lock support (default: off)\n"
4666 " cpu-pm=on|off controls cpu power management (default: off)\n",
4669 ``-overcommit mem-lock=on|off|on-fault``
4671 ``-overcommit cpu-pm=on|off``
4672 Run qemu with hints about host resource overcommit. The default is
4673 to assume that host overcommits all resources.
4675 Locking qemu and guest memory can be enabled via ``mem-lock=on``
4676 or ``mem-lock=on-fault`` (disabled by default). This works when
4677 host memory is not overcommitted and reduces the worst-case latency for
4678 guest. The on-fault option is better for reducing the memory footprint
4683 Guest ability to manage power state of host cpus (increasing latency
4684 for other processes on the same host cpu, but decreasing latency for
4685 guest) can be enabled via ``cpu-pm=on`` (disabled by default). This
4686 works best when host CPU is not overcommitted. When used, host
4692 "-gdb dev accept gdb connection on 'dev'. (QEMU defaults to starting\n"
4693 " the guest without waiting for gdb to connect; use -S too\n"
4697 ``-gdb dev``
4700 execution -- if you want QEMU to not start the guest until you
4702 also pass the ``-S`` option to QEMU.
4706 -gdb tcp::3117
4713 .. parsed-literal::
4715 (gdb) target remote | exec |qemu_system| -gdb stdio ...
4719 "-s shorthand for -gdb tcp::" DEFAULT_GDBSTUB_PORT "\n",
4722 ``-s``
4723 Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
4728 "-d item1,... enable logging of specified items (use '-d help' for a list of log items)\n",
4731 ``-d item1[,...]``
4732 Enable logging of specified items. Use '-d help' for a list of log
4737 "-D logfile output log to logfile (default stderr)\n",
4740 ``-D logfile``
4745 "-dfilter range,.. filter debug output to range of addresses (useful for -d cpu,exec,etc..)\n",
4748 ``-dfilter range1[,...]``
4750 The filter spec can be either start+size, start-size or start..end
4756 -dfilter 0x8000..0x8fff,0xffffffc000080000+0x200,0xffffffc000060000-0x1000
4764 "-seed number seed the pseudo-random number generator\n",
4767 ``-seed number``
4768 Force the guest to use a deterministic pseudo-random number
4770 within the host.
4774 "-L path set the directory for the BIOS, VGA BIOS and keymaps\n",
4777 ``-L path``
4780 To list all the data directories, use ``-L help``.
4783 DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \
4784 "-enable-kvm enable KVM full virtualization support\n",
4788 ``-enable-kvm``
4793 DEF("xen-domid", HAS_ARG, QEMU_OPTION_xen_domid,
4794 "-xen-domid id specify xen guest domain id\n",
4796 DEF("xen-attach", 0, QEMU_OPTION_xen_attach,
4797 "-xen-attach attach to existing xen domain\n"
4800 DEF("xen-domid-restrict", 0, QEMU_OPTION_xen_domid_restrict,
4801 "-xen-domid-restrict restrict set of available xen operations\n"
4802 " to specified domain id. (Does not affect\n"
4806 ``-xen-domid id``
4807 Specify xen guest domain id (XEN only).
4809 ``-xen-attach``
4812 specified domain id (XEN only).
4815 DEF("no-reboot", 0, QEMU_OPTION_no_reboot, \
4816 "-no-reboot exit instead of rebooting\n", QEMU_ARCH_ALL)
4818 ``-no-reboot``
4822 DEF("no-shutdown", 0, QEMU_OPTION_no_shutdown, \
4823 "-no-shutdown stop before shutdown\n", QEMU_ARCH_ALL)
4825 ``-no-shutdown``
4832 "-action reboot=reset|shutdown\n"
4834 "-action shutdown=poweroff|pause\n"
4836 "-action panic=pause|shutdown|exit-failure|none\n"
4838 "-action watchdog=reset|shutdown|poweroff|inject-nmi|pause|debug|none\n"
4842 ``-action event=action``
4845 same behaviors that are modified by the ``-no-reboot`` and ``-no-shutdown``
4850 ``-action panic=none``
4851 ``-action reboot=shutdown,shutdown=pause``
4852 ``-device i6300esb -action watchdog=pause``
4857 "-loadvm [tag|id]\n" \
4861 ``-loadvm file``
4867 "-daemonize daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
4870 ``-daemonize``
4878 DEF("option-rom", HAS_ARG, QEMU_OPTION_option_rom, \
4879 "-option-rom rom load a file, rom, into the option ROM space\n",
4882 ``-option-rom file``
4888 "-rtc [base=utc|localtime|<datetime>][,clock=host|rt|vm][,driftfix=none|slew]\n" \
4893 ``-rtc [base=utc|localtime|datetime][,clock=host|rt|vm][,driftfix=none|slew]``
4896 required for correct date in MS-DOS or Windows. To start at a
4898 ``2006-06-17T16:01:21`` or ``2006-06-17``. The default base is UTC.
4900 By default the RTC is driven by the host system time. This allows
4902 specifically if the host time is smoothly following an accurate
4904 guest time from the host, you can set ``clock`` to ``rt`` instead,
4905 which provides a host monotonic clock if host support it. To even
4910 virtual clock is variable and can in general differ from the host
4916 Windows guest and will re-inject them.
4920 …"-icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=<filename>[,rrsnaps…
4922 " instruction, enable aligning the host and virtual clocks\n" \
4924 " record-and-replay mode\n", QEMU_ARCH_ALL)
4926 ``-icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=filename[,rrsnapsho…
4949 synchronise the host clock and the virtual clock. The goal is to
4951 option. Whenever the guest clock is behind the host clock and if
4955 shift values for which the guest clock runs ahead of the host clock.
4957 depends on the host machine). The default if icount is enabled
4970 DEF("watchdog-action", HAS_ARG, QEMU_OPTION_watchdog_action, \
4971 "-watchdog-action reset|shutdown|poweroff|inject-nmi|pause|debug|none\n" \
4975 ``-watchdog-action action``
4980 ``inject-nmi`` (inject a NMI into the guest), ``pause`` (pause the
4987 ``-watchdog-action shutdown`` is not recommended for production use.
4991 ``-device i6300esb -watchdog-action pause``
4996 "-echr chr set terminal escape character instead of ctrl-a\n",
4999 ``-echr numeric_ascii_value``
5002 the ``-nographic`` option. ``0x01`` is equal to pressing
5003 ``Control-a``. You can select a different character from the ascii
5004 control keys where 1 through 26 map to Control-a through Control-z.
5006 escape character to Control-t.
5008 ``-echr 0x14``; \ ``-echr 20``
5013 "-incoming tcp:[host]:port[,to=maxport][,ipv4=on|off][,ipv6=on|off]\n" \
5014 "-incoming rdma:host:port[,ipv4=on|off][,ipv6=on|off]\n" \
5015 "-incoming unix:socketpath\n" \
5018 "-incoming fd:fd\n" \
5019 "-incoming file:filename[,offset=offset]\n" \
5020 "-incoming exec:cmdline\n" \
5023 "-incoming <channel>\n" \
5025 "-incoming defer\n" \
5029 The -incoming option specifies the migration channel for an incoming
5032 or is 'main' for all other forms of -incoming. If multiple -incoming
5035 ``-incoming tcp:[host]:port[,to=maxport][,ipv4=on|off][,ipv6=on|off]``
5037 ``-incoming rdma:host:port[,ipv4=on|off][,ipv6=on|off]``
5040 ``-incoming unix:socketpath``
5043 ``-incoming fd:fd``
5046 ``-incoming file:filename[,offset=offset]``
5050 ``-incoming exec:cmdline``
5054 ``-incoming <channel>``
5060 -incoming '{"channel-type": "main",
5065 -incoming main,addr.transport=socket,addr.type=unix,addr.path=my.sock
5067 ``-incoming defer``
5073 DEF("only-migratable", 0, QEMU_OPTION_only_migratable, \
5074 "-only-migratable allow only migratable devices\n", QEMU_ARCH_ALL)
5076 ``-only-migratable``
5082 "-nodefaults don't create default devices\n", QEMU_ARCH_ALL)
5084 ``-nodefaults``
5087 device, VGA adapter, floppy and CD-ROM drive and others. The
5088 ``-nodefaults`` option will disable all those default devices.
5091 DEF("prom-env", HAS_ARG, QEMU_OPTION_prom_env,
5092 "-prom-env variable=value\n"
5096 ``-prom-env variable=value``
5101 qemu-system-sparc -prom-env 'auto-boot?=false' \
5102 -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
5106 qemu-system-ppc -prom-env 'auto-boot?=false' \
5107 -prom-env 'boot-device=hd:2,\yaboot' \
5108 -prom-env 'boot-args=conf=hd:2,\yaboot.conf'
5111 "-semihosting semihosting mode\n",
5115 ``-semihosting``
5116 Enable :ref:`Semihosting` mode (ARM, M68K, Xtensa, MIPS, RISC-V only).
5119 Note that this allows guest direct access to the host filesystem, so
5122 See the -semihosting-config option documentation for further
5125 DEF("semihosting-config", HAS_ARG, QEMU_OPTION_semihosting_config,
5126 …"-semihosting-config [enable=on|off][,target=native|gdb|auto][,chardev=id][,userspace=on|off][,arg…
5131 ``-semihosting-config [enable=on|off][,target=native|gdb|auto][,chardev=id][,userspace=on|off][,arg…
5132 Enable and configure :ref:`Semihosting` (ARM, M68K, Xtensa, MIPS, RISC-V
5136 Note that this allows guest direct access to the host filesystem, so
5153 bare-metal test case code).
5157 multiple times to build up a list. The old-style
5158 ``-kernel``/``-append`` method of passing a command line is
5160 ``--semihosting-config arg`` and the ``-kernel``/``-append`` are
5164 DEF("old-param", 0, QEMU_OPTION_old_param,
5165 "-old-param old param mode\n", QEMU_ARCH_ARM)
5167 ``-old-param``
5172 "-sandbox on[,obsolete=allow|deny][,elevateprivileges=allow|deny|children]\n" \
5187 ``-sandbox arg[,obsolete=string][,elevateprivileges=string][,spawn=string][,resourcecontrol=string]…
5205 "-readconfig <file>\n"
5208 ``-readconfig file``
5214 DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,
5215 "-no-user-config\n"
5216 " do not load default user-provided config files at startup\n",
5219 ``-no-user-config``
5220 The ``-no-user-config`` option makes QEMU not load any of the
5221 user-provided config files on sysconfdir.
5225 "-trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n"
5229 ``-trace [[enable=]pattern][,events=file][,file=file]``
5230 .. include:: ../qemu-option-trace.rst.inc
5234 "-plugin [file=]<file>[,<argname>=<argvalue>]\n"
5238 ``-plugin file=file[,argname=argvalue]``
5250 DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
5253 DEF("run-with", HAS_ARG, QEMU_OPTION_run_with,
5254 "-run-with [async-teardown=on|off][,chroot=dir][user=username|uid:gid]\n"
5256 " async-teardown=on enables asynchronous teardown (Linux only)\n"
5259 " user=uid:gid ditto, but use specified user-ID and group-ID instead\n",
5262 ``-run-with [async-teardown=on|off][,chroot=dir][user=username|uid:gid]``
5265 ``async-teardown=on`` enables asynchronous teardown. A new process called
5290 "-msg [timestamp[=on|off]][,guest-name=[on|off]]\n"
5293 " guest-name=on enables guest name prefix but only if\n"
5294 " -name guest option is set (default: off)\n",
5297 ``-msg [timestamp[=on|off]][,guest-name[=on|off]]``
5303 ``guest-name=on|off``
5304 Prefix messages with guest name but only if -name guest option is set
5308 DEF("dump-vmstate", HAS_ARG, QEMU_OPTION_dump_vmstate,
5309 "-dump-vmstate <file>\n"
5311 " Use the scripts/vmstate-static-checker.py file to\n"
5316 ``-dump-vmstate file``
5317 Dump json-encoded vmstate information for current machine type to
5321 DEF("enable-sync-profile", 0, QEMU_OPTION_enable_sync_profile,
5322 "-enable-sync-profile\n"
5326 ``-enable-sync-profile``
5332 "-perfmap generate a /tmp/perf-${pid}.map file for perf\n",
5335 ``-perfmap``
5341 "-jitdump generate a jit-${pid}.dump file for perf\n",
5344 ``-jitdump``
5355 "-object TYPENAME[,PROP1=VALUE1,...]\n"
5357 " in the order they are specified. Note that the 'id'\n"
5362 ``-object typename[,prop1=value1,...]``
5364 they are specified. Note that the 'id' property must be set. These
5367 …``-object memory-backend-file,id=id,size=size,mem-path=dir,share=on|off,discard-data=on|off,merge=…
5371 The ``id`` parameter is a unique ID that will be used to
5372 reference this memory region in other parameters, e.g. ``-numa``,
5373 ``-device nvdimm``, etc.
5378 The ``mem-path`` provides the path to either a shared memory or
5383 allows a co-operating external process to access the QEMU memory
5391 Setting the ``discard-data`` boolean option to on indicates that
5394 ``discard-data`` is only an optimization, and QEMU might not
5407 The ``host-nodes`` option binds the memory range to a list of
5408 NUMA host nodes.
5414 default host policy
5417 prefer the given host node list for allocation
5420 restrict memory allocation to the given host node list
5423 interleave memory allocations across the given host node
5427 QEMU mmap(2) ``mem-path``, and accepts common suffixes, eg
5428 ``2M``. Some backend store specified by ``mem-path`` requires an
5439 by ``mem-path`` is in host persistent memory that can be
5443 ``mem-path`` (e.g. in vNVDIMM label emulation and live
5444 migration). Also, we will map the backend-file with MAP\_SYNC
5446 ``mem-path`` in case of host crash or a power failure. MAP\_SYNC
5447 requires support from both the host kernel (since Linux kernel
5448 4.15) and the filesystem of ``mem-path`` mounted with DAX
5452 read-only or read-write (default).
5468 …``-object memory-backend-ram,id=id,merge=on|off,dump=on|off,share=on|off,prealloc=on|off,size=size…
5471 ``-m`` option that is traditionally used to define guest RAM.
5472 Please refer to ``memory-backend-file`` for a description of the
5475 …``-object memory-backend-memfd,id=id,merge=on|off,dump=on|off,share=on|off,prealloc=on|off,size=si…
5478 using vhost-user). The memory is allocated with memfd and
5481 The ``seal`` option creates a sealed-file, that will block
5495 Please refer to ``memory-backend-file`` for a description of the
5500 …``-object memory-backend-shm,id=id,merge=on|off,dump=on|off,share=on|off,prealloc=on|off,size=size…
5503 using vhost-user).
5505 ``memory-backend-shm`` is a more portable and less featureful version
5506 of ``memory-backend-memfd``. It can then be used in any POSIX system,
5509 Please refer to ``memory-backend-file`` for a description of the
5516 ``-object iommufd,id=id[,fd=fd]``
5520 The ``id`` parameter is a unique ID which frontends (such as
5521 vfio-pci of vdpa) will use to connect with the iommufd backend.
5523 The ``fd`` parameter is an optional pre-opened file descriptor
5528 ``-object rng-builtin,id=id``
5530 from QEMU builtin functions. The ``id`` parameter is a unique ID
5532 ``virtio-rng`` device. By default, the ``virtio-rng`` device
5535 ``-object rng-random,id=id,filename=/dev/random``
5537 from a device on the host. The ``id`` parameter is a unique ID
5539 ``virtio-rng`` device. The ``filename`` parameter specifies
5543 ``-object rng-egd,id=id,chardev=chardevid``
5545 from an external daemon running on the host. The ``id``
5546 parameter is a unique ID that will be used to reference this
5547 entropy backend from the ``virtio-rng`` device. The ``chardev``
5548 parameter is the unique ID of a character device backend that
5551 ``-object tls-creds-anon,id=id,endpoint=endpoint,dir=/path/to/cred/dir,verify-peer=on|off``
5553 provide TLS support on network backends. The ``id`` parameter is
5554 a unique ID which network backends will use to access the
5558 ``verify-peer`` is enabled (the default) then once the handshake
5560 is a no-op for anonymous credentials.
5564 dh-params.pem providing diffie-hellman parameters to use for the
5571 ``-object tls-creds-psk,id=id,endpoint=endpoint,dir=/path/to/keys/dir[,username=username]``
5572 Creates a TLS Pre-Shared Keys (PSK) credentials object, which
5574 ``id`` parameter is a unique ID which network backends will use
5586 For server endpoints, dir may also contain a file dh-params.pem
5587 providing diffie-hellman parameters to use for the TLS server.
5594 …``-object tls-creds-x509,id=id,endpoint=endpoint,dir=/path/to/cred/dir,priority=priority,verify-pe…
5596 provide TLS support on network backends. The ``id`` parameter is
5597 a unique ID which network backends will use to access the
5601 ``verify-peer`` is enabled (the default) then once the handshake
5608 dh-params.pem providing diffie-hellman parameters to use for the
5617 must be stored in PEM format, in filenames ca-cert.pem,
5618 ca-crl.pem (optional), server-cert.pem (only servers),
5619 server-key.pem (only servers), client-cert.pem (only clients),
5620 and client-key.pem (only clients).
5622 For the server-key.pem and client-key.pem files which contain
5625 ID of a previously created ``secret`` object containing the
5636 https://gnutls.org/manual/html_node/Priority-Strings.html.
5638 ``-object tls-cipher-suites,id=id,priority=priority``
5643 The ``id`` parameter is a unique ID which frontends will use to
5645 host.
5655 https://gnutls.org/manual/html_node/Priority-Strings.html.
5658 The tls-cipher-suites object exposes the ordered list of permitted
5659 TLS cipher suites from the host side to the guest firmware, via
5662 guest-side TLS.
5664 In the following example, the priority at which the host-side policy
5667 refer to /etc/crypto-policies/back-ends/gnutls.config.
5669 .. parsed-literal::
5672 -object tls-cipher-suites,id=mysuite0,priority=@SYSTEM \\
5673 -fw_cfg name=etc/edk2/https/ciphers,gen_id=mysuite0
5675 …``-object filter-buffer,id=id,netdev=netdevid,interval=t[,queue=all|rx|tx][,status=on|off][,positi…
5695 position head\|tail\|id=<id> is an option to specify where the
5705 ``id=<id>``: the filter is inserted before or behind the filter
5706 specified by <id>, see the insert option below.
5710 position=id=<id>. It can be applied to any netfilter.
5716 …``-object filter-mirror,id=id,netdev=netdevid,outdev=chardevid,queue=all|rx|tx[,vnet_hdr_support][…
5717 filter-mirror on netdev netdevid,mirror net packet to
5719 filter-mirror will mirror packet with vnet\_hdr\_len.
5721 …``-object filter-redirector,id=id,netdev=netdevid,indev=chardevid,outdev=chardevid,queue=all|rx|tx…
5722 filter-redirector on netdev netdevid,redirect filter's net
5724 filter.if it has the vnet\_hdr\_support flag, filter-redirector
5726 filter-redirector we need to differ outdev id from indev id, id
5730 …``-object filter-rewriter,id=id,netdev=netdevid,queue=all|rx|tx,[vnet_hdr_support][,position=head|…
5731 Filter-rewriter is a part of COLO project.It will rewrite tcp
5737 usage: colo secondary: -object
5738 filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0 -object
5739 filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 -object
5740 filter-rewriter,id=rew0,netdev=hn0,queue=all
5742 …``-object filter-dump,id=id,netdev=dev[,file=filename][,maxlen=len][,position=head|tail|id=<id>][,…
5748 …``-object colo-compare,id=id,primary_in=chardevid,secondary_in=chardevid,outdev=chardevid,iothread…
5749 Colo-compare gets packet from primary\_in chardevid and
5752 primary packet to out\_dev, else it will notify COLO-framework to do
5758 colo-compare hold the packet. The expired\_scan\_cycle=@var{ms}
5763 notify Xen colo-frame to do checkpoint.
5765 COLO-compare must be used with the help of filter-mirror,
5766 filter-redirector and filter-rewriter.
5773 -netdev tap,id=hn0,vhost=off
5774 -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
5775 -chardev socket,id=mirror0,host=3.3.3.3,port=9003,server=on,wait=off
5776 -chardev socket,id=compare1,host=3.3.3.3,port=9004,server=on,wait=off
5777 -chardev socket,id=compare0,host=3.3.3.3,port=9001,server=on,wait=off
5778 -chardev socket,id=compare0-0,host=3.3.3.3,port=9001
5779 -chardev socket,id=compare_out,host=3.3.3.3,port=9005,server=on,wait=off
5780 -chardev socket,id=compare_out0,host=3.3.3.3,port=9005
5781 -object iothread,id=iothread1
5782 -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
5783 -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
5784 -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
5785-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,ioth…
5788 -netdev tap,id=hn0,vhost=off
5789 -device e1000,netdev=hn0,mac=52:a4:00:12:78:66
5790 -chardev socket,id=red0,host=3.3.3.3,port=9003
5791 -chardev socket,id=red1,host=3.3.3.3,port=9004
5792 -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
5793 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
5799 -netdev tap,id=hn0,vhost=off
5800 -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
5801 -chardev socket,id=mirror0,host=3.3.3.3,port=9003,server=on,wait=off
5802 -chardev socket,id=compare1,host=3.3.3.3,port=9004,server=on,wait=off
5803 -chardev socket,id=compare0,host=3.3.3.3,port=9001,server=on,wait=off
5804 -chardev socket,id=compare0-0,host=3.3.3.3,port=9001
5805 -chardev socket,id=compare_out,host=3.3.3.3,port=9005,server=on,wait=off
5806 -chardev socket,id=compare_out0,host=3.3.3.3,port=9005
5807 -chardev socket,id=notify_way,host=3.3.3.3,port=9009,server=on,wait=off
5808 -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
5809 -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
5810 -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
5811 -object iothread,id=iothread1
5812-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,noti…
5815 -netdev tap,id=hn0,vhost=off
5816 -device e1000,netdev=hn0,mac=52:a4:00:12:78:66
5817 -chardev socket,id=red0,host=3.3.3.3,port=9003
5818 -chardev socket,id=red1,host=3.3.3.3,port=9004
5819 -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
5820 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
5823 read the colo-compare git log.
5825 ``-object cryptodev-backend-builtin,id=id[,queues=queues]``
5827 the QEMU cipher APIs. The id parameter is a unique ID that will
5829 ``virtio-crypto`` device. The queues parameter is optional,
5833 .. parsed-literal::
5837 -object cryptodev-backend-builtin,id=cryptodev0 \\
5838 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \\
5841 ``-object cryptodev-vhost-user,id=id,chardev=chardevid[,queues=queues]``
5842 Creates a vhost-user cryptodev backend, backed by a chardev
5843 chardevid. The id parameter is a unique ID that will be used to
5844 reference this cryptodev backend from the ``virtio-crypto``
5846 The vhost-user uses a specifically defined protocol to pass
5850 vhost-user, the default of queues is 1.
5852 .. parsed-literal::
5856 -chardev socket,id=chardev0,path=/path/to/socket \\
5857 -object cryptodev-vhost-user,id=cryptodev0,chardev=chardev0 \\
5858 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \\
5861 ``-object secret,id=id,data=string,format=raw|base64[,keyid=secretid,iv=string]``
5863 ``-object secret,id=id,file=filename,format=raw|base64[,keyid=secretid,iv=string]``
5872 valid UTF-8 characters, so base64 is recommended for sending
5879 associated with a secret using the AES-256-CBC cipher. Use of
5881 parameters. The keyid parameter provides the ID of a previously
5882 defined secret that contains the AES-256 decryption key. This
5883 key should be 32-bytes long and be base64 encoded. The iv
5886 encrypted string of the 16-byte IV.
5890 .. parsed-literal::
5892 # |qemu_system| -object secret,id=sec0,data=letmein,format=raw
5896 # printf "letmein" > mypasswd.txt # QEMU\_SYSTEM\_MACRO -object
5897 secret,id=sec0,file=mypasswd.txt,format=raw
5899 For greater security, AES-256-CBC should be used. To illustrate
5909 # openssl rand -base64 32 > key.b64
5910 # KEY=$(base64 -d key.b64 | hexdump -v -e '/1 "%02X"')
5918 # openssl rand -base64 16 > iv.b64
5919 # IV=$(base64 -d iv.b64 | hexdump -v -e '/1 "%02X"')
5928 openssl enc -aes-256-cbc -a -K $KEY -iv $IV)
5934 .. parsed-literal::
5937 -object secret,id=secmaster0,format=base64,file=key.b64 \\
5938 -object secret,id=sec0,keyid=secmaster0,format=base64,\\
5941-object sev-guest,id=id,cbitpos=cbitpos,reduced-phys-bits=val,[sev-device=string,policy=policy,han…
5947 bit (aka the C-bit) is utilized to mark if a memory page is
5948 protected. The ``cbitpos`` is used to provide the C-bit
5949 position. The C-bit position is Host family dependent hence user
5953 physical address space. The ``reduced-phys-bits`` is used to
5955 Similar to C-bit, the value is Host family dependent. On EPYC,
5958 The ``sev-device`` provides the device file to use for
5975 The ``dh-cert-file`` and ``session-file`` provides the guest
5976 owner's Public Diffie-Hillman key defined in SEV spec. The PDH
5981 The ``kernel-hashes`` adds the hashes of given kernel/initrd/
5983 boot with -kernel. The default is off. (Since 6.2)
5987 .. parsed-literal::
5991 -object sev-guest,id=sev0,cbitpos=47,reduced-phys-bits=1 \\
5992 -machine ...,memory-encryption=sev0 \\
5995 ``-object authz-simple,id=id,identity=string``
6008 .. parsed-literal::
6012-object 'authz-simple,id=auth0,identity=CN=laptop.example.com,,O=Example Org,,L=London,,ST=London,…
6018 ``-object authz-listfile,id=id,filename=path,refresh=on|off``
6052 As with the ``authz-simple`` object, the format of the identity
6059 .. parsed-literal::
6063 -object authz-simple,id=auth0,filename=/etc/qemu/vnc-sasl.acl,refresh=on \\
6066 ``-object authz-pam,id=id,service=string``
6078 .. parsed-literal::
6082 -object authz-pam,id=auth0,service=qemu-vnc \\
6086 ``/etc/pam.d/qemu-vnc`` that contains:
6100 …``-object iothread,id=id,poll-max-ns=poll-max-ns,poll-grow=poll-grow,poll-shrink=poll-shrink,aio-m…
6105 emulation and I/O to run on other host CPUs.
6107 The ``id`` parameter is a unique ID that will be used to
6108 reference this IOThread from ``-device ...,iothread=id``.
6112 The ``query-iothreads`` QMP command lists IOThreads and reports
6113 their thread IDs so that the user can configure host CPU
6122 workload and/or host device latency.
6124 The ``poll-max-ns`` parameter is the maximum number of
6128 The ``poll-grow`` parameter is the multiplier used to increase
6132 The ``poll-shrink`` parameter is the divisor used to decrease
6136 The ``aio-max-batch`` parameter is the maximum number of requests
6140 The IOThread parameters can be modified at run-time using the
6141 ``qom-set`` command (where ``iothread1`` is the IOThread's
6142 ``id``):
6146 (qemu) qom-set /objects/iothread1 poll-max-ns 100000