]> Git Repo - qemu.git/blob - qemu-options.hx
intel-iommu: add Intel IOMMU emulation to q35 and add a machine option "iommu" as...
[qemu.git] / qemu-options.hx
1 HXCOMM Use DEFHEADING() to define headings in both help text and texi
2 HXCOMM Text between STEXI and ETEXI are copied to texi version and
3 HXCOMM discarded from C version
4 HXCOMM DEF(option, HAS_ARG/0, opt_enum, opt_help, arch_mask) is used to
5 HXCOMM construct option structures, enums and help message for specified
6 HXCOMM architectures.
7 HXCOMM HXCOMM can be used for comments, discarded from both texi and C
8
9 DEFHEADING(Standard options:)
10 STEXI
11 @table @option
12 ETEXI
13
14 DEF("help", 0, QEMU_OPTION_h,
15     "-h or -help     display this help and exit\n", QEMU_ARCH_ALL)
16 STEXI
17 @item -h
18 @findex -h
19 Display help and exit
20 ETEXI
21
22 DEF("version", 0, QEMU_OPTION_version,
23     "-version        display version information and exit\n", QEMU_ARCH_ALL)
24 STEXI
25 @item -version
26 @findex -version
27 Display version information and exit
28 ETEXI
29
30 DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
31     "-machine [type=]name[,prop[=value][,...]]\n"
32     "                selects emulated machine ('-machine help' for list)\n"
33     "                property accel=accel1[:accel2[:...]] selects accelerator\n"
34     "                supported accelerators are kvm, xen, tcg (default: tcg)\n"
35     "                kernel_irqchip=on|off controls accelerated irqchip support\n"
36     "                kvm_shadow_mem=size of KVM shadow MMU\n"
37     "                dump-guest-core=on|off include guest memory in a core dump (default=on)\n"
38     "                mem-merge=on|off controls memory merge support (default: on)\n"
39     "                iommu=on|off controls emulated Intel IOMMU (VT-d) support (default=off)\n",
40     QEMU_ARCH_ALL)
41 STEXI
42 @item -machine [type=]@var{name}[,prop=@var{value}[,...]]
43 @findex -machine
44 Select the emulated machine by @var{name}. Use @code{-machine help} to list
45 available machines. Supported machine properties are:
46 @table @option
47 @item accel=@var{accels1}[:@var{accels2}[:...]]
48 This is used to enable an accelerator. Depending on the target architecture,
49 kvm, xen, or tcg can be available. By default, tcg is used. If there is more
50 than one accelerator specified, the next one is used if the previous one fails
51 to initialize.
52 @item kernel_irqchip=on|off
53 Enables in-kernel irqchip support for the chosen accelerator when available.
54 @item kvm_shadow_mem=size
55 Defines the size of the KVM shadow MMU.
56 @item dump-guest-core=on|off
57 Include guest memory in a core dump. The default is on.
58 @item mem-merge=on|off
59 Enables or disables memory merge support. This feature, when supported by
60 the host, de-duplicates identical memory pages among VMs instances
61 (enabled by default).
62 @item iommu=on|off
63 Enables or disables emulated Intel IOMMU (VT-d) support. The default is off.
64 @end table
65 ETEXI
66
67 HXCOMM Deprecated by -machine
68 DEF("M", HAS_ARG, QEMU_OPTION_M, "", QEMU_ARCH_ALL)
69
70 DEF("cpu", HAS_ARG, QEMU_OPTION_cpu,
71     "-cpu cpu        select CPU ('-cpu help' for list)\n", QEMU_ARCH_ALL)
72 STEXI
73 @item -cpu @var{model}
74 @findex -cpu
75 Select CPU model (@code{-cpu help} for list and additional feature selection)
76 ETEXI
77
78 DEF("smp", HAS_ARG, QEMU_OPTION_smp,
79     "-smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]\n"
80     "                set the number of CPUs to 'n' [default=1]\n"
81     "                maxcpus= maximum number of total cpus, including\n"
82     "                offline CPUs for hotplug, etc\n"
83     "                cores= number of CPU cores on one socket\n"
84     "                threads= number of threads on one CPU core\n"
85     "                sockets= number of discrete sockets in the system\n",
86         QEMU_ARCH_ALL)
87 STEXI
88 @item -smp [cpus=]@var{n}[,cores=@var{cores}][,threads=@var{threads}][,sockets=@var{sockets}][,maxcpus=@var{maxcpus}]
89 @findex -smp
90 Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
91 CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
92 to 4.
93 For the PC target, the number of @var{cores} per socket, the number
94 of @var{threads} per cores and the total number of @var{sockets} can be
95 specified. Missing values will be computed. If any on the three values is
96 given, the total number of CPUs @var{n} can be omitted. @var{maxcpus}
97 specifies the maximum number of hotpluggable CPUs.
98 ETEXI
99
100 DEF("numa", HAS_ARG, QEMU_OPTION_numa,
101     "-numa node[,mem=size][,cpus=cpu[-cpu]][,nodeid=node]\n"
102     "-numa node[,memdev=id][,cpus=cpu[-cpu]][,nodeid=node]\n", QEMU_ARCH_ALL)
103 STEXI
104 @item -numa node[,mem=@var{size}][,cpus=@var{cpu[-cpu]}][,nodeid=@var{node}]
105 @item -numa node[,memdev=@var{id}][,cpus=@var{cpu[-cpu]}][,nodeid=@var{node}]
106 @findex -numa
107 Simulate a multi node NUMA system. If @samp{mem}, @samp{memdev}
108 and @samp{cpus} are omitted, resources are split equally. Also, note
109 that the -@option{numa} option doesn't allocate any of the specified
110 resources. That is, it just assigns existing resources to NUMA nodes. This
111 means that one still has to use the @option{-m}, @option{-smp} options
112 to allocate RAM and VCPUs respectively, and possibly @option{-object}
113 to specify the memory backend for the @samp{memdev} suboption.
114
115 @samp{mem} and @samp{memdev} are mutually exclusive.  Furthermore, if one
116 node uses @samp{memdev}, all of them have to use it.
117 ETEXI
118
119 DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd,
120     "-add-fd fd=fd,set=set[,opaque=opaque]\n"
121     "                Add 'fd' to fd 'set'\n", QEMU_ARCH_ALL)
122 STEXI
123 @item -add-fd fd=@var{fd},set=@var{set}[,opaque=@var{opaque}]
124 @findex -add-fd
125
126 Add a file descriptor to an fd set.  Valid options are:
127
128 @table @option
129 @item fd=@var{fd}
130 This option defines the file descriptor of which a duplicate is added to fd set.
131 The file descriptor cannot be stdin, stdout, or stderr.
132 @item set=@var{set}
133 This option defines the ID of the fd set to add the file descriptor to.
134 @item opaque=@var{opaque}
135 This option defines a free-form string that can be used to describe @var{fd}.
136 @end table
137
138 You can open an image using pre-opened file descriptors from an fd set:
139 @example
140 qemu-system-i386
141 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
142 -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
143 -drive file=/dev/fdset/2,index=0,media=disk
144 @end example
145 ETEXI
146
147 DEF("set", HAS_ARG, QEMU_OPTION_set,
148     "-set group.id.arg=value\n"
149     "                set <arg> parameter for item <id> of type <group>\n"
150     "                i.e. -set drive.$id.file=/path/to/image\n", QEMU_ARCH_ALL)
151 STEXI
152 @item -set @var{group}.@var{id}.@var{arg}=@var{value}
153 @findex -set
154 Set parameter @var{arg} for item @var{id} of type @var{group}\n"
155 ETEXI
156
157 DEF("global", HAS_ARG, QEMU_OPTION_global,
158     "-global driver.prop=value\n"
159     "                set a global default for a driver property\n",
160     QEMU_ARCH_ALL)
161 STEXI
162 @item -global @var{driver}.@var{prop}=@var{value}
163 @findex -global
164 Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
165
166 @example
167 qemu-system-i386 -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk
168 @end example
169
170 In particular, you can use this to set driver properties for devices which are 
171 created automatically by the machine model. To create a device which is not 
172 created automatically and set properties on it, use -@option{device}.
173 ETEXI
174
175 DEF("boot", HAS_ARG, QEMU_OPTION_boot,
176     "-boot [order=drives][,once=drives][,menu=on|off]\n"
177     "      [,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n"
178     "                'drives': floppy (a), hard disk (c), CD-ROM (d), network (n)\n"
179     "                'sp_name': the file's name that would be passed to bios as logo picture, if menu=on\n"
180     "                'sp_time': the period that splash picture last if menu=on, unit is ms\n"
181     "                'rb_timeout': the timeout before guest reboot when boot failed, unit is ms\n",
182     QEMU_ARCH_ALL)
183 STEXI
184 @item -boot [order=@var{drives}][,once=@var{drives}][,menu=on|off][,splash=@var{sp_name}][,splash-time=@var{sp_time}][,reboot-timeout=@var{rb_timeout}][,strict=on|off]
185 @findex -boot
186 Specify boot order @var{drives} as a string of drive letters. Valid
187 drive letters depend on the target achitecture. The x86 PC uses: a, b
188 (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot
189 from network adapter 1-4), hard disk boot is the default. To apply a
190 particular boot order only on the first startup, specify it via
191 @option{once}.
192
193 Interactive boot menus/prompts can be enabled via @option{menu=on} as far
194 as firmware/BIOS supports them. The default is non-interactive boot.
195
196 A splash picture could be passed to bios, enabling user to show it as logo,
197 when option splash=@var{sp_name} is given and menu=on, If firmware/BIOS
198 supports them. Currently Seabios for X86 system support it.
199 limitation: The splash file could be a jpeg file or a BMP file in 24 BPP
200 format(true color). The resolution should be supported by the SVGA mode, so
201 the recommended is 320x240, 640x480, 800x640.
202
203 A timeout could be passed to bios, guest will pause for @var{rb_timeout} ms
204 when boot failed, then reboot. If @var{rb_timeout} is '-1', guest will not
205 reboot, qemu passes '-1' to bios by default. Currently Seabios for X86
206 system support it.
207
208 Do strict boot via @option{strict=on} as far as firmware/BIOS
209 supports it. This only effects when boot priority is changed by
210 bootindex options. The default is non-strict boot.
211
212 @example
213 # try to boot from network first, then from hard disk
214 qemu-system-i386 -boot order=nc
215 # boot from CD-ROM first, switch back to default order after reboot
216 qemu-system-i386 -boot once=d
217 # boot with a splash picture for 5 seconds.
218 qemu-system-i386 -boot menu=on,splash=/root/boot.bmp,splash-time=5000
219 @end example
220
221 Note: The legacy format '-boot @var{drives}' is still supported but its
222 use is discouraged as it may be removed from future versions.
223 ETEXI
224
225 DEF("m", HAS_ARG, QEMU_OPTION_m,
226     "-m[emory] [size=]megs[,slots=n,maxmem=size]\n"
227     "                configure guest RAM\n"
228     "                size: initial amount of guest memory (default: "
229     stringify(DEFAULT_RAM_SIZE) "MiB)\n"
230     "                slots: number of hotplug slots (default: none)\n"
231     "                maxmem: maximum amount of guest memory (default: none)\n",
232     QEMU_ARCH_ALL)
233 STEXI
234 @item -m [size=]@var{megs}
235 @findex -m
236 Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB.  Optionally,
237 a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
238 gigabytes respectively. Optional pair @var{slots}, @var{maxmem} could be used
239 to set amount of hotluggable memory slots and possible maximum amount of memory.
240 ETEXI
241
242 DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
243     "-mem-path FILE  provide backing storage for guest RAM\n", QEMU_ARCH_ALL)
244 STEXI
245 @item -mem-path @var{path}
246 @findex -mem-path
247 Allocate guest RAM from a temporarily created file in @var{path}.
248 ETEXI
249
250 DEF("mem-prealloc", 0, QEMU_OPTION_mem_prealloc,
251     "-mem-prealloc   preallocate guest memory (use with -mem-path)\n",
252     QEMU_ARCH_ALL)
253 STEXI
254 @item -mem-prealloc
255 @findex -mem-prealloc
256 Preallocate memory when using -mem-path.
257 ETEXI
258
259 DEF("k", HAS_ARG, QEMU_OPTION_k,
260     "-k language     use keyboard layout (for example 'fr' for French)\n",
261     QEMU_ARCH_ALL)
262 STEXI
263 @item -k @var{language}
264 @findex -k
265 Use keyboard layout @var{language} (for example @code{fr} for
266 French). This option is only needed where it is not easy to get raw PC
267 keycodes (e.g. on Macs, with some X11 servers or with a VNC
268 display). You don't normally need to use it on PC/Linux or PC/Windows
269 hosts.
270
271 The available layouts are:
272 @example
273 ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
274 da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
275 de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr
276 @end example
277
278 The default is @code{en-us}.
279 ETEXI
280
281
282 DEF("audio-help", 0, QEMU_OPTION_audio_help,
283     "-audio-help     print list of audio drivers and their options\n",
284     QEMU_ARCH_ALL)
285 STEXI
286 @item -audio-help
287 @findex -audio-help
288 Will show the audio subsystem help: list of drivers, tunable
289 parameters.
290 ETEXI
291
292 DEF("soundhw", HAS_ARG, QEMU_OPTION_soundhw,
293     "-soundhw c1,... enable audio support\n"
294     "                and only specified sound cards (comma separated list)\n"
295     "                use '-soundhw help' to get the list of supported cards\n"
296     "                use '-soundhw all' to enable all of them\n", QEMU_ARCH_ALL)
297 STEXI
298 @item -soundhw @var{card1}[,@var{card2},...] or -soundhw all
299 @findex -soundhw
300 Enable audio and selected sound hardware. Use 'help' to print all
301 available sound hardware.
302
303 @example
304 qemu-system-i386 -soundhw sb16,adlib disk.img
305 qemu-system-i386 -soundhw es1370 disk.img
306 qemu-system-i386 -soundhw ac97 disk.img
307 qemu-system-i386 -soundhw hda disk.img
308 qemu-system-i386 -soundhw all disk.img
309 qemu-system-i386 -soundhw help
310 @end example
311
312 Note that Linux's i810_audio OSS kernel (for AC97) module might
313 require manually specifying clocking.
314
315 @example
316 modprobe i810_audio clocking=48000
317 @end example
318 ETEXI
319
320 DEF("balloon", HAS_ARG, QEMU_OPTION_balloon,
321     "-balloon none   disable balloon device\n"
322     "-balloon virtio[,addr=str]\n"
323     "                enable virtio balloon device (default)\n", QEMU_ARCH_ALL)
324 STEXI
325 @item -balloon none
326 @findex -balloon
327 Disable balloon device.
328 @item -balloon virtio[,addr=@var{addr}]
329 Enable virtio balloon device (default), optionally with PCI address
330 @var{addr}.
331 ETEXI
332
333 DEF("device", HAS_ARG, QEMU_OPTION_device,
334     "-device driver[,prop[=value][,...]]\n"
335     "                add device (based on driver)\n"
336     "                prop=value,... sets driver properties\n"
337     "                use '-device help' to print all possible drivers\n"
338     "                use '-device driver,help' to print all possible properties\n",
339     QEMU_ARCH_ALL)
340 STEXI
341 @item -device @var{driver}[,@var{prop}[=@var{value}][,...]]
342 @findex -device
343 Add device @var{driver}.  @var{prop}=@var{value} sets driver
344 properties.  Valid properties depend on the driver.  To get help on
345 possible drivers and properties, use @code{-device help} and
346 @code{-device @var{driver},help}.
347 ETEXI
348
349 DEF("name", HAS_ARG, QEMU_OPTION_name,
350     "-name string1[,process=string2][,debug-threads=on|off]\n"
351     "                set the name of the guest\n"
352     "                string1 sets the window title and string2 the process name (on Linux)\n"
353     "                When debug-threads is enabled, individual threads are given a separate name (on Linux)\n"
354     "                NOTE: The thread names are for debugging and not a stable API.\n",
355     QEMU_ARCH_ALL)
356 STEXI
357 @item -name @var{name}
358 @findex -name
359 Sets the @var{name} of the guest.
360 This name will be displayed in the SDL window caption.
361 The @var{name} will also be used for the VNC server.
362 Also optionally set the top visible process name in Linux.
363 Naming of individual threads can also be enabled on Linux to aid debugging.
364 ETEXI
365
366 DEF("uuid", HAS_ARG, QEMU_OPTION_uuid,
367     "-uuid %08x-%04x-%04x-%04x-%012x\n"
368     "                specify machine UUID\n", QEMU_ARCH_ALL)
369 STEXI
370 @item -uuid @var{uuid}
371 @findex -uuid
372 Set system UUID.
373 ETEXI
374
375 STEXI
376 @end table
377 ETEXI
378 DEFHEADING()
379
380 DEFHEADING(Block device options:)
381 STEXI
382 @table @option
383 ETEXI
384
385 DEF("fda", HAS_ARG, QEMU_OPTION_fda,
386     "-fda/-fdb file  use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
387 DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
388 STEXI
389 @item -fda @var{file}
390 @item -fdb @var{file}
391 @findex -fda
392 @findex -fdb
393 Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You can
394 use the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}).
395 ETEXI
396
397 DEF("hda", HAS_ARG, QEMU_OPTION_hda,
398     "-hda/-hdb file  use 'file' as IDE hard disk 0/1 image\n", QEMU_ARCH_ALL)
399 DEF("hdb", HAS_ARG, QEMU_OPTION_hdb, "", QEMU_ARCH_ALL)
400 DEF("hdc", HAS_ARG, QEMU_OPTION_hdc,
401     "-hdc/-hdd file  use 'file' as IDE hard disk 2/3 image\n", QEMU_ARCH_ALL)
402 DEF("hdd", HAS_ARG, QEMU_OPTION_hdd, "", QEMU_ARCH_ALL)
403 STEXI
404 @item -hda @var{file}
405 @item -hdb @var{file}
406 @item -hdc @var{file}
407 @item -hdd @var{file}
408 @findex -hda
409 @findex -hdb
410 @findex -hdc
411 @findex -hdd
412 Use @var{file} as hard disk 0, 1, 2 or 3 image (@pxref{disk_images}).
413 ETEXI
414
415 DEF("cdrom", HAS_ARG, QEMU_OPTION_cdrom,
416     "-cdrom file     use 'file' as IDE cdrom image (cdrom is ide1 master)\n",
417     QEMU_ARCH_ALL)
418 STEXI
419 @item -cdrom @var{file}
420 @findex -cdrom
421 Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and
422 @option{-cdrom} at the same time). You can use the host CD-ROM by
423 using @file{/dev/cdrom} as filename (@pxref{host_drives}).
424 ETEXI
425
426 DEF("drive", HAS_ARG, QEMU_OPTION_drive,
427     "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
428     "       [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
429     "       [,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n"
430     "       [,serial=s][,addr=A][,rerror=ignore|stop|report]\n"
431     "       [,werror=ignore|stop|report|enospc][,id=name][,aio=threads|native]\n"
432     "       [,readonly=on|off][,copy-on-read=on|off]\n"
433     "       [,discard=ignore|unmap][,detect-zeroes=on|off|unmap]\n"
434     "       [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]]\n"
435     "       [[,iops=i]|[[,iops_rd=r][,iops_wr=w]]]\n"
436     "       [[,bps_max=bm]|[[,bps_rd_max=rm][,bps_wr_max=wm]]]\n"
437     "       [[,iops_max=im]|[[,iops_rd_max=irm][,iops_wr_max=iwm]]]\n"
438     "       [[,iops_size=is]]\n"
439     "                use 'file' as a drive image\n", QEMU_ARCH_ALL)
440 STEXI
441 @item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
442 @findex -drive
443
444 Define a new drive. Valid options are:
445
446 @table @option
447 @item file=@var{file}
448 This option defines which disk image (@pxref{disk_images}) to use with
449 this drive. If the filename contains comma, you must double it
450 (for instance, "file=my,,file" to use file "my,file").
451
452 Special files such as iSCSI devices can be specified using protocol
453 specific URLs. See the section for "Device URL Syntax" for more information.
454 @item if=@var{interface}
455 This option defines on which type on interface the drive is connected.
456 Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio.
457 @item bus=@var{bus},unit=@var{unit}
458 These options define where is connected the drive by defining the bus number and
459 the unit id.
460 @item index=@var{index}
461 This option defines where is connected the drive by using an index in the list
462 of available connectors of a given interface type.
463 @item media=@var{media}
464 This option defines the type of the media: disk or cdrom.
465 @item cyls=@var{c},heads=@var{h},secs=@var{s}[,trans=@var{t}]
466 These options have the same definition as they have in @option{-hdachs}.
467 @item snapshot=@var{snapshot}
468 @var{snapshot} is "on" or "off" and controls snapshot mode for the given drive
469 (see @option{-snapshot}).
470 @item cache=@var{cache}
471 @var{cache} is "none", "writeback", "unsafe", "directsync" or "writethrough" and controls how the host cache is used to access block data.
472 @item aio=@var{aio}
473 @var{aio} is "threads", or "native" and selects between pthread based disk I/O and native Linux AIO.
474 @item discard=@var{discard}
475 @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) requests are ignored or passed to the filesystem.  Some machine types may not support discard requests.
476 @item format=@var{format}
477 Specify which disk @var{format} will be used rather than detecting
478 the format.  Can be used to specifiy format=raw to avoid interpreting
479 an untrusted format header.
480 @item serial=@var{serial}
481 This option specifies the serial number to assign to the device.
482 @item addr=@var{addr}
483 Specify the controller's PCI address (if=virtio only).
484 @item werror=@var{action},rerror=@var{action}
485 Specify which @var{action} to take on write and read errors. Valid actions are:
486 "ignore" (ignore the error and try to continue), "stop" (pause QEMU),
487 "report" (report the error to the guest), "enospc" (pause QEMU only if the
488 host disk is full; report the error to the guest otherwise).
489 The default setting is @option{werror=enospc} and @option{rerror=report}.
490 @item readonly
491 Open drive @option{file} as read-only. Guest write attempts will fail.
492 @item copy-on-read=@var{copy-on-read}
493 @var{copy-on-read} is "on" or "off" and enables whether to copy read backing
494 file sectors into the image file.
495 @item detect-zeroes=@var{detect-zeroes}
496 @var{detect-zeroes} is "off", "on" or "unmap" and enables the automatic
497 conversion of plain zero writes by the OS to driver specific optimized
498 zero write commands. You may even choose "unmap" if @var{discard} is set
499 to "unmap" to allow a zero write to be converted to an UNMAP operation.
500 @end table
501
502 By default, the @option{cache=writeback} mode is used. It will report data
503 writes as completed as soon as the data is present in the host page cache.
504 This is safe as long as your guest OS makes sure to correctly flush disk caches
505 where needed. If your guest OS does not handle volatile disk write caches
506 correctly and your host crashes or loses power, then the guest may experience
507 data corruption.
508
509 For such guests, you should consider using @option{cache=writethrough}. This
510 means that the host page cache will be used to read and write data, but write
511 notification will be sent to the guest only after QEMU has made sure to flush
512 each write to the disk. Be aware that this has a major impact on performance.
513
514 The host page cache can be avoided entirely with @option{cache=none}.  This will
515 attempt to do disk IO directly to the guest's memory.  QEMU may still perform
516 an internal copy of the data. Note that this is considered a writeback mode and
517 the guest OS must handle the disk write cache correctly in order to avoid data
518 corruption on host crashes.
519
520 The host page cache can be avoided while only sending write notifications to
521 the guest when the data has been flushed to the disk using
522 @option{cache=directsync}.
523
524 In case you don't care about data integrity over host failures, use
525 @option{cache=unsafe}. This option tells QEMU that it never needs to write any
526 data to the disk but can instead keep things in cache. If anything goes wrong,
527 like your host losing power, the disk storage getting disconnected accidentally,
528 etc. your image will most probably be rendered unusable.   When using
529 the @option{-snapshot} option, unsafe caching is always used.
530
531 Copy-on-read avoids accessing the same backing file sectors repeatedly and is
532 useful when the backing file is over a slow network.  By default copy-on-read
533 is off.
534
535 Instead of @option{-cdrom} you can use:
536 @example
537 qemu-system-i386 -drive file=file,index=2,media=cdrom
538 @end example
539
540 Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you can
541 use:
542 @example
543 qemu-system-i386 -drive file=file,index=0,media=disk
544 qemu-system-i386 -drive file=file,index=1,media=disk
545 qemu-system-i386 -drive file=file,index=2,media=disk
546 qemu-system-i386 -drive file=file,index=3,media=disk
547 @end example
548
549 You can open an image using pre-opened file descriptors from an fd set:
550 @example
551 qemu-system-i386
552 -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
553 -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
554 -drive file=/dev/fdset/2,index=0,media=disk
555 @end example
556
557 You can connect a CDROM to the slave of ide0:
558 @example
559 qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
560 @end example
561
562 If you don't specify the "file=" argument, you define an empty drive:
563 @example
564 qemu-system-i386 -drive if=ide,index=1,media=cdrom
565 @end example
566
567 You can connect a SCSI disk with unit ID 6 on the bus #0:
568 @example
569 qemu-system-i386 -drive file=file,if=scsi,bus=0,unit=6
570 @end example
571
572 Instead of @option{-fda}, @option{-fdb}, you can use:
573 @example
574 qemu-system-i386 -drive file=file,index=0,if=floppy
575 qemu-system-i386 -drive file=file,index=1,if=floppy
576 @end example
577
578 By default, @var{interface} is "ide" and @var{index} is automatically
579 incremented:
580 @example
581 qemu-system-i386 -drive file=a -drive file=b"
582 @end example
583 is interpreted like:
584 @example
585 qemu-system-i386 -hda a -hdb b
586 @end example
587 ETEXI
588
589 DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
590     "-mtdblock file  use 'file' as on-board Flash memory image\n",
591     QEMU_ARCH_ALL)
592 STEXI
593 @item -mtdblock @var{file}
594 @findex -mtdblock
595 Use @var{file} as on-board Flash memory image.
596 ETEXI
597
598 DEF("sd", HAS_ARG, QEMU_OPTION_sd,
599     "-sd file        use 'file' as SecureDigital card image\n", QEMU_ARCH_ALL)
600 STEXI
601 @item -sd @var{file}
602 @findex -sd
603 Use @var{file} as SecureDigital card image.
604 ETEXI
605
606 DEF("pflash", HAS_ARG, QEMU_OPTION_pflash,
607     "-pflash file    use 'file' as a parallel flash image\n", QEMU_ARCH_ALL)
608 STEXI
609 @item -pflash @var{file}
610 @findex -pflash
611 Use @var{file} as a parallel flash image.
612 ETEXI
613
614 DEF("snapshot", 0, QEMU_OPTION_snapshot,
615     "-snapshot       write to temporary files instead of disk image files\n",
616     QEMU_ARCH_ALL)
617 STEXI
618 @item -snapshot
619 @findex -snapshot
620 Write to temporary files instead of disk image files. In this case,
621 the raw disk image you use is not written back. You can however force
622 the write back by pressing @key{C-a s} (@pxref{disk_images}).
623 ETEXI
624
625 DEF("hdachs", HAS_ARG, QEMU_OPTION_hdachs, \
626     "-hdachs c,h,s[,t]\n" \
627     "                force hard disk 0 physical geometry and the optional BIOS\n" \
628     "                translation (t=none or lba) (usually QEMU can guess them)\n",
629     QEMU_ARCH_ALL)
630 STEXI
631 @item -hdachs @var{c},@var{h},@var{s},[,@var{t}]
632 @findex -hdachs
633 Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=
634 @var{h} <= 16, 1 <= @var{s} <= 63) and optionally force the BIOS
635 translation mode (@var{t}=none, lba or auto). Usually QEMU can guess
636 all those parameters. This option is useful for old MS-DOS disk
637 images.
638 ETEXI
639
640 DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
641     "-fsdev fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]\n"
642     " [,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd]\n",
643     QEMU_ARCH_ALL)
644
645 STEXI
646
647 @item -fsdev @var{fsdriver},id=@var{id},path=@var{path},[security_model=@var{security_model}][,writeout=@var{writeout}][,readonly][,socket=@var{socket}|sock_fd=@var{sock_fd}]
648 @findex -fsdev
649 Define a new file system device. Valid options are:
650 @table @option
651 @item @var{fsdriver}
652 This option specifies the fs driver backend to use.
653 Currently "local", "handle" and "proxy" file system drivers are supported.
654 @item id=@var{id}
655 Specifies identifier for this device
656 @item path=@var{path}
657 Specifies the export path for the file system device. Files under
658 this path will be available to the 9p client on the guest.
659 @item security_model=@var{security_model}
660 Specifies the security model to be used for this export path.
661 Supported security models are "passthrough", "mapped-xattr", "mapped-file" and "none".
662 In "passthrough" security model, files are stored using the same
663 credentials as they are created on the guest. This requires QEMU
664 to run as root. In "mapped-xattr" security model, some of the file
665 attributes like uid, gid, mode bits and link target are stored as
666 file attributes. For "mapped-file" these attributes are stored in the
667 hidden .virtfs_metadata directory. Directories exported by this security model cannot
668 interact with other unix tools. "none" security model is same as
669 passthrough except the sever won't report failures if it fails to
670 set file attributes like ownership. Security model is mandatory
671 only for local fsdriver. Other fsdrivers (like handle, proxy) don't take
672 security model as a parameter.
673 @item writeout=@var{writeout}
674 This is an optional argument. The only supported value is "immediate".
675 This means that host page cache will be used to read and write data but
676 write notification will be sent to the guest only when the data has been
677 reported as written by the storage subsystem.
678 @item readonly
679 Enables exporting 9p share as a readonly mount for guests. By default
680 read-write access is given.
681 @item socket=@var{socket}
682 Enables proxy filesystem driver to use passed socket file for communicating
683 with virtfs-proxy-helper
684 @item sock_fd=@var{sock_fd}
685 Enables proxy filesystem driver to use passed socket descriptor for
686 communicating with virtfs-proxy-helper. Usually a helper like libvirt
687 will create socketpair and pass one of the fds as sock_fd
688 @end table
689
690 -fsdev option is used along with -device driver "virtio-9p-pci".
691 @item -device virtio-9p-pci,fsdev=@var{id},mount_tag=@var{mount_tag}
692 Options for virtio-9p-pci driver are:
693 @table @option
694 @item fsdev=@var{id}
695 Specifies the id value specified along with -fsdev option
696 @item mount_tag=@var{mount_tag}
697 Specifies the tag name to be used by the guest to mount this export point
698 @end table
699
700 ETEXI
701
702 DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
703     "-virtfs local,path=path,mount_tag=tag,security_model=[mapped-xattr|mapped-file|passthrough|none]\n"
704     "        [,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd]\n",
705     QEMU_ARCH_ALL)
706
707 STEXI
708
709 @item -virtfs @var{fsdriver}[,path=@var{path}],mount_tag=@var{mount_tag}[,security_model=@var{security_model}][,writeout=@var{writeout}][,readonly][,socket=@var{socket}|sock_fd=@var{sock_fd}]
710 @findex -virtfs
711
712 The general form of a Virtual File system pass-through options are:
713 @table @option
714 @item @var{fsdriver}
715 This option specifies the fs driver backend to use.
716 Currently "local", "handle" and "proxy" file system drivers are supported.
717 @item id=@var{id}
718 Specifies identifier for this device
719 @item path=@var{path}
720 Specifies the export path for the file system device. Files under
721 this path will be available to the 9p client on the guest.
722 @item security_model=@var{security_model}
723 Specifies the security model to be used for this export path.
724 Supported security models are "passthrough", "mapped-xattr", "mapped-file" and "none".
725 In "passthrough" security model, files are stored using the same
726 credentials as they are created on the guest. This requires QEMU
727 to run as root. In "mapped-xattr" security model, some of the file
728 attributes like uid, gid, mode bits and link target are stored as
729 file attributes. For "mapped-file" these attributes are stored in the
730 hidden .virtfs_metadata directory. Directories exported by this security model cannot
731 interact with other unix tools. "none" security model is same as
732 passthrough except the sever won't report failures if it fails to
733 set file attributes like ownership. Security model is mandatory only
734 for local fsdriver. Other fsdrivers (like handle, proxy) don't take security
735 model as a parameter.
736 @item writeout=@var{writeout}
737 This is an optional argument. The only supported value is "immediate".
738 This means that host page cache will be used to read and write data but
739 write notification will be sent to the guest only when the data has been
740 reported as written by the storage subsystem.
741 @item readonly
742 Enables exporting 9p share as a readonly mount for guests. By default
743 read-write access is given.
744 @item socket=@var{socket}
745 Enables proxy filesystem driver to use passed socket file for
746 communicating with virtfs-proxy-helper. Usually a helper like libvirt
747 will create socketpair and pass one of the fds as sock_fd
748 @item sock_fd
749 Enables proxy filesystem driver to use passed 'sock_fd' as the socket
750 descriptor for interfacing with virtfs-proxy-helper
751 @end table
752 ETEXI
753
754 DEF("virtfs_synth", 0, QEMU_OPTION_virtfs_synth,
755     "-virtfs_synth Create synthetic file system image\n",
756     QEMU_ARCH_ALL)
757 STEXI
758 @item -virtfs_synth
759 @findex -virtfs_synth
760 Create synthetic file system image
761 ETEXI
762
763 STEXI
764 @end table
765 ETEXI
766 DEFHEADING()
767
768 DEFHEADING(USB options:)
769 STEXI
770 @table @option
771 ETEXI
772
773 DEF("usb", 0, QEMU_OPTION_usb,
774     "-usb            enable the USB driver (will be the default soon)\n",
775     QEMU_ARCH_ALL)
776 STEXI
777 @item -usb
778 @findex -usb
779 Enable the USB driver (will be the default soon)
780 ETEXI
781
782 DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
783     "-usbdevice name add the host or guest USB device 'name'\n",
784     QEMU_ARCH_ALL)
785 STEXI
786
787 @item -usbdevice @var{devname}
788 @findex -usbdevice
789 Add the USB device @var{devname}. @xref{usb_devices}.
790
791 @table @option
792
793 @item mouse
794 Virtual Mouse. This will override the PS/2 mouse emulation when activated.
795
796 @item tablet
797 Pointer device that uses absolute coordinates (like a touchscreen). This
798 means QEMU is able to report the mouse position without having to grab the
799 mouse. Also overrides the PS/2 mouse emulation when activated.
800
801 @item disk:[format=@var{format}]:@var{file}
802 Mass storage device based on file. The optional @var{format} argument
803 will be used rather than detecting the format. Can be used to specifiy
804 @code{format=raw} to avoid interpreting an untrusted format header.
805
806 @item host:@var{bus}.@var{addr}
807 Pass through the host device identified by @var{bus}.@var{addr} (Linux only).
808
809 @item host:@var{vendor_id}:@var{product_id}
810 Pass through the host device identified by @var{vendor_id}:@var{product_id}
811 (Linux only).
812
813 @item serial:[vendorid=@var{vendor_id}][,productid=@var{product_id}]:@var{dev}
814 Serial converter to host character device @var{dev}, see @code{-serial} for the
815 available devices.
816
817 @item braille
818 Braille device.  This will use BrlAPI to display the braille output on a real
819 or fake device.
820
821 @item net:@var{options}
822 Network adapter that supports CDC ethernet and RNDIS protocols.
823
824 @end table
825 ETEXI
826
827 STEXI
828 @end table
829 ETEXI
830 DEFHEADING()
831
832 DEFHEADING(Display options:)
833 STEXI
834 @table @option
835 ETEXI
836
837 DEF("display", HAS_ARG, QEMU_OPTION_display,
838     "-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]\n"
839     "            [,window_close=on|off]|curses|none|\n"
840     "            gtk[,grab_on_hover=on|off]|\n"
841     "            vnc=<display>[,<optargs>]\n"
842     "                select display type\n", QEMU_ARCH_ALL)
843 STEXI
844 @item -display @var{type}
845 @findex -display
846 Select type of display to use. This option is a replacement for the
847 old style -sdl/-curses/... options. Valid values for @var{type} are
848 @table @option
849 @item sdl
850 Display video output via SDL (usually in a separate graphics
851 window; see the SDL documentation for other possibilities).
852 @item curses
853 Display video output via curses. For graphics device models which
854 support a text mode, QEMU can display this output using a
855 curses/ncurses interface. Nothing is displayed when the graphics
856 device is in graphical mode or if the graphics device does not support
857 a text mode. Generally only the VGA device models support text mode.
858 @item none
859 Do not display video output. The guest will still see an emulated
860 graphics card, but its output will not be displayed to the QEMU
861 user. This option differs from the -nographic option in that it
862 only affects what is done with video output; -nographic also changes
863 the destination of the serial and parallel port data.
864 @item gtk
865 Display video output in a GTK window. This interface provides drop-down
866 menus and other UI elements to configure and control the VM during
867 runtime.
868 @item vnc
869 Start a VNC server on display <arg>
870 @end table
871 ETEXI
872
873 DEF("nographic", 0, QEMU_OPTION_nographic,
874     "-nographic      disable graphical output and redirect serial I/Os to console\n",
875     QEMU_ARCH_ALL)
876 STEXI
877 @item -nographic
878 @findex -nographic
879 Normally, QEMU uses SDL to display the VGA output. With this option,
880 you can totally disable graphical output so that QEMU is a simple
881 command line application. The emulated serial port is redirected on
882 the console and muxed with the monitor (unless redirected elsewhere
883 explicitly). Therefore, you can still use QEMU to debug a Linux kernel
884 with a serial console.  Use @key{C-a h} for help on switching between
885 the console and monitor.
886 ETEXI
887
888 DEF("curses", 0, QEMU_OPTION_curses,
889     "-curses         use a curses/ncurses interface instead of SDL\n",
890     QEMU_ARCH_ALL)
891 STEXI
892 @item -curses
893 @findex -curses
894 Normally, QEMU uses SDL to display the VGA output.  With this option,
895 QEMU can display the VGA output when in text mode using a
896 curses/ncurses interface.  Nothing is displayed in graphical mode.
897 ETEXI
898
899 DEF("no-frame", 0, QEMU_OPTION_no_frame,
900     "-no-frame       open SDL window without a frame and window decorations\n",
901     QEMU_ARCH_ALL)
902 STEXI
903 @item -no-frame
904 @findex -no-frame
905 Do not use decorations for SDL windows and start them using the whole
906 available screen space. This makes the using QEMU in a dedicated desktop
907 workspace more convenient.
908 ETEXI
909
910 DEF("alt-grab", 0, QEMU_OPTION_alt_grab,
911     "-alt-grab       use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt)\n",
912     QEMU_ARCH_ALL)
913 STEXI
914 @item -alt-grab
915 @findex -alt-grab
916 Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also
917 affects the special keys (for fullscreen, monitor-mode switching, etc).
918 ETEXI
919
920 DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab,
921     "-ctrl-grab      use Right-Ctrl to grab mouse (instead of Ctrl-Alt)\n",
922     QEMU_ARCH_ALL)
923 STEXI
924 @item -ctrl-grab
925 @findex -ctrl-grab
926 Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also
927 affects the special keys (for fullscreen, monitor-mode switching, etc).
928 ETEXI
929
930 DEF("no-quit", 0, QEMU_OPTION_no_quit,
931     "-no-quit        disable SDL window close capability\n", QEMU_ARCH_ALL)
932 STEXI
933 @item -no-quit
934 @findex -no-quit
935 Disable SDL window close capability.
936 ETEXI
937
938 DEF("sdl", 0, QEMU_OPTION_sdl,
939     "-sdl            enable SDL\n", QEMU_ARCH_ALL)
940 STEXI
941 @item -sdl
942 @findex -sdl
943 Enable SDL.
944 ETEXI
945
946 DEF("spice", HAS_ARG, QEMU_OPTION_spice,
947     "-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]\n"
948     "       [,x509-key-file=<file>][,x509-key-password=<file>]\n"
949     "       [,x509-cert-file=<file>][,x509-cacert-file=<file>]\n"
950     "       [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6]\n"
951     "       [,tls-ciphers=<list>]\n"
952     "       [,tls-channel=[main|display|cursor|inputs|record|playback]]\n"
953     "       [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n"
954     "       [,sasl][,password=<secret>][,disable-ticketing]\n"
955     "       [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]\n"
956     "       [,jpeg-wan-compression=[auto|never|always]]\n"
957     "       [,zlib-glz-wan-compression=[auto|never|always]]\n"
958     "       [,streaming-video=[off|all|filter]][,disable-copy-paste]\n"
959     "       [,disable-agent-file-xfer][,agent-mouse=[on|off]]\n"
960     "       [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n"
961     "   enable spice\n"
962     "   at least one of {port, tls-port} is mandatory\n",
963     QEMU_ARCH_ALL)
964 STEXI
965 @item -spice @var{option}[,@var{option}[,...]]
966 @findex -spice
967 Enable the spice remote desktop protocol. Valid options are
968
969 @table @option
970
971 @item port=<nr>
972 Set the TCP port spice is listening on for plaintext channels.
973
974 @item addr=<addr>
975 Set the IP address spice is listening on.  Default is any address.
976
977 @item ipv4
978 @item ipv6
979 Force using the specified IP version.
980
981 @item password=<secret>
982 Set the password you need to authenticate.
983
984 @item sasl
985 Require that the client use SASL to authenticate with the spice.
986 The exact choice of authentication method used is controlled from the
987 system / user's SASL configuration file for the 'qemu' service. This
988 is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
989 unprivileged user, an environment variable SASL_CONF_PATH can be used
990 to make it search alternate locations for the service config.
991 While some SASL auth methods can also provide data encryption (eg GSSAPI),
992 it is recommended that SASL always be combined with the 'tls' and
993 'x509' settings to enable use of SSL and server certificates. This
994 ensures a data encryption preventing compromise of authentication
995 credentials.
996
997 @item disable-ticketing
998 Allow client connects without authentication.
999
1000 @item disable-copy-paste
1001 Disable copy paste between the client and the guest.
1002
1003 @item disable-agent-file-xfer
1004 Disable spice-vdagent based file-xfer between the client and the guest.
1005
1006 @item tls-port=<nr>
1007 Set the TCP port spice is listening on for encrypted channels.
1008
1009 @item x509-dir=<dir>
1010 Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir
1011
1012 @item x509-key-file=<file>
1013 @item x509-key-password=<file>
1014 @item x509-cert-file=<file>
1015 @item x509-cacert-file=<file>
1016 @item x509-dh-key-file=<file>
1017 The x509 file names can also be configured individually.
1018
1019 @item tls-ciphers=<list>
1020 Specify which ciphers to use.
1021
1022 @item tls-channel=[main|display|cursor|inputs|record|playback]
1023 @item plaintext-channel=[main|display|cursor|inputs|record|playback]
1024 Force specific channel to be used with or without TLS encryption.  The
1025 options can be specified multiple times to configure multiple
1026 channels.  The special name "default" can be used to set the default
1027 mode.  For channels which are not explicitly forced into one mode the
1028 spice client is allowed to pick tls/plaintext as he pleases.
1029
1030 @item image-compression=[auto_glz|auto_lz|quic|glz|lz|off]
1031 Configure image compression (lossless).
1032 Default is auto_glz.
1033
1034 @item jpeg-wan-compression=[auto|never|always]
1035 @item zlib-glz-wan-compression=[auto|never|always]
1036 Configure wan image compression (lossy for slow links).
1037 Default is auto.
1038
1039 @item streaming-video=[off|all|filter]
1040 Configure video stream detection.  Default is filter.
1041
1042 @item agent-mouse=[on|off]
1043 Enable/disable passing mouse events via vdagent.  Default is on.
1044
1045 @item playback-compression=[on|off]
1046 Enable/disable audio stream compression (using celt 0.5.1).  Default is on.
1047
1048 @item seamless-migration=[on|off]
1049 Enable/disable spice seamless migration. Default is off.
1050
1051 @end table
1052 ETEXI
1053
1054 DEF("portrait", 0, QEMU_OPTION_portrait,
1055     "-portrait       rotate graphical output 90 deg left (only PXA LCD)\n",
1056     QEMU_ARCH_ALL)
1057 STEXI
1058 @item -portrait
1059 @findex -portrait
1060 Rotate graphical output 90 deg left (only PXA LCD).
1061 ETEXI
1062
1063 DEF("rotate", HAS_ARG, QEMU_OPTION_rotate,
1064     "-rotate <deg>   rotate graphical output some deg left (only PXA LCD)\n",
1065     QEMU_ARCH_ALL)
1066 STEXI
1067 @item -rotate @var{deg}
1068 @findex -rotate
1069 Rotate graphical output some deg left (only PXA LCD).
1070 ETEXI
1071
1072 DEF("vga", HAS_ARG, QEMU_OPTION_vga,
1073     "-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|none]\n"
1074     "                select video card type\n", QEMU_ARCH_ALL)
1075 STEXI
1076 @item -vga @var{type}
1077 @findex -vga
1078 Select type of VGA card to emulate. Valid values for @var{type} are
1079 @table @option
1080 @item cirrus
1081 Cirrus Logic GD5446 Video card. All Windows versions starting from
1082 Windows 95 should recognize and use this graphic card. For optimal
1083 performances, use 16 bit color depth in the guest and the host OS.
1084 (This one is the default)
1085 @item std
1086 Standard VGA card with Bochs VBE extensions.  If your guest OS
1087 supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
1088 to use high resolution modes (>= 1280x1024x16) then you should use
1089 this option.
1090 @item vmware
1091 VMWare SVGA-II compatible adapter. Use it if you have sufficiently
1092 recent XFree86/XOrg server or Windows guest with a driver for this
1093 card.
1094 @item qxl
1095 QXL paravirtual graphic card.  It is VGA compatible (including VESA
1096 2.0 VBE support).  Works best with qxl guest drivers installed though.
1097 Recommended choice when using the spice protocol.
1098 @item tcx
1099 (sun4m only) Sun TCX framebuffer. This is the default framebuffer for
1100 sun4m machines and offers both 8-bit and 24-bit colour depths at a
1101 fixed resolution of 1024x768.
1102 @item cg3
1103 (sun4m only) Sun cgthree framebuffer. This is a simple 8-bit framebuffer
1104 for sun4m machines available in both 1024x768 (OpenBIOS) and 1152x900 (OBP)
1105 resolutions aimed at people wishing to run older Solaris versions.
1106 @item none
1107 Disable VGA card.
1108 @end table
1109 ETEXI
1110
1111 DEF("full-screen", 0, QEMU_OPTION_full_screen,
1112     "-full-screen    start in full screen\n", QEMU_ARCH_ALL)
1113 STEXI
1114 @item -full-screen
1115 @findex -full-screen
1116 Start in full screen.
1117 ETEXI
1118
1119 DEF("g", 1, QEMU_OPTION_g ,
1120     "-g WxH[xDEPTH]  Set the initial graphical resolution and depth\n",
1121     QEMU_ARCH_PPC | QEMU_ARCH_SPARC)
1122 STEXI
1123 @item -g @var{width}x@var{height}[x@var{depth}]
1124 @findex -g
1125 Set the initial graphical resolution and depth (PPC, SPARC only).
1126 ETEXI
1127
1128 DEF("vnc", HAS_ARG, QEMU_OPTION_vnc ,
1129     "-vnc display    start a VNC server on display\n", QEMU_ARCH_ALL)
1130 STEXI
1131 @item -vnc @var{display}[,@var{option}[,@var{option}[,...]]]
1132 @findex -vnc
1133 Normally, QEMU uses SDL to display the VGA output.  With this option,
1134 you can have QEMU listen on VNC display @var{display} and redirect the VGA
1135 display over the VNC session.  It is very useful to enable the usb
1136 tablet device when using this option (option @option{-usbdevice
1137 tablet}). When using the VNC display, you must use the @option{-k}
1138 parameter to set the keyboard layout if you are not using en-us. Valid
1139 syntax for the @var{display} is
1140
1141 @table @option
1142
1143 @item @var{host}:@var{d}
1144
1145 TCP connections will only be allowed from @var{host} on display @var{d}.
1146 By convention the TCP port is 5900+@var{d}. Optionally, @var{host} can
1147 be omitted in which case the server will accept connections from any host.
1148
1149 @item unix:@var{path}
1150
1151 Connections will be allowed over UNIX domain sockets where @var{path} is the
1152 location of a unix socket to listen for connections on.
1153
1154 @item none
1155
1156 VNC is initialized but not started. The monitor @code{change} command
1157 can be used to later start the VNC server.
1158
1159 @end table
1160
1161 Following the @var{display} value there may be one or more @var{option} flags
1162 separated by commas. Valid options are
1163
1164 @table @option
1165
1166 @item reverse
1167
1168 Connect to a listening VNC client via a ``reverse'' connection. The
1169 client is specified by the @var{display}. For reverse network
1170 connections (@var{host}:@var{d},@code{reverse}), the @var{d} argument
1171 is a TCP port number, not a display number.
1172
1173 @item websocket
1174
1175 Opens an additional TCP listening port dedicated to VNC Websocket connections.
1176 By definition the Websocket port is 5700+@var{display}. If @var{host} is
1177 specified connections will only be allowed from this host.
1178 As an alternative the Websocket port could be specified by using
1179 @code{websocket}=@var{port}.
1180 TLS encryption for the Websocket connection is supported if the required
1181 certificates are specified with the VNC option @option{x509}.
1182
1183 @item password
1184
1185 Require that password based authentication is used for client connections.
1186
1187 The password must be set separately using the @code{set_password} command in
1188 the @ref{pcsys_monitor}. The syntax to change your password is:
1189 @code{set_password <protocol> <password>} where <protocol> could be either
1190 "vnc" or "spice".
1191
1192 If you would like to change <protocol> password expiration, you should use
1193 @code{expire_password <protocol> <expiration-time>} where expiration time could
1194 be one of the following options: now, never, +seconds or UNIX time of
1195 expiration, e.g. +60 to make password expire in 60 seconds, or 1335196800
1196 to make password expire on "Mon Apr 23 12:00:00 EDT 2012" (UNIX time for this
1197 date and time).
1198
1199 You can also use keywords "now" or "never" for the expiration time to
1200 allow <protocol> password to expire immediately or never expire.
1201
1202 @item tls
1203
1204 Require that client use TLS when communicating with the VNC server. This
1205 uses anonymous TLS credentials so is susceptible to a man-in-the-middle
1206 attack. It is recommended that this option be combined with either the
1207 @option{x509} or @option{x509verify} options.
1208
1209 @item x509=@var{/path/to/certificate/dir}
1210
1211 Valid if @option{tls} is specified. Require that x509 credentials are used
1212 for negotiating the TLS session. The server will send its x509 certificate
1213 to the client. It is recommended that a password be set on the VNC server
1214 to provide authentication of the client when this is used. The path following
1215 this option specifies where the x509 certificates are to be loaded from.
1216 See the @ref{vnc_security} section for details on generating certificates.
1217
1218 @item x509verify=@var{/path/to/certificate/dir}
1219
1220 Valid if @option{tls} is specified. Require that x509 credentials are used
1221 for negotiating the TLS session. The server will send its x509 certificate
1222 to the client, and request that the client send its own x509 certificate.
1223 The server will validate the client's certificate against the CA certificate,
1224 and reject clients when validation fails. If the certificate authority is
1225 trusted, this is a sufficient authentication mechanism. You may still wish
1226 to set a password on the VNC server as a second authentication layer. The
1227 path following this option specifies where the x509 certificates are to
1228 be loaded from. See the @ref{vnc_security} section for details on generating
1229 certificates.
1230
1231 @item sasl
1232
1233 Require that the client use SASL to authenticate with the VNC server.
1234 The exact choice of authentication method used is controlled from the
1235 system / user's SASL configuration file for the 'qemu' service. This
1236 is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
1237 unprivileged user, an environment variable SASL_CONF_PATH can be used
1238 to make it search alternate locations for the service config.
1239 While some SASL auth methods can also provide data encryption (eg GSSAPI),
1240 it is recommended that SASL always be combined with the 'tls' and
1241 'x509' settings to enable use of SSL and server certificates. This
1242 ensures a data encryption preventing compromise of authentication
1243 credentials. See the @ref{vnc_security} section for details on using
1244 SASL authentication.
1245
1246 @item acl
1247
1248 Turn on access control lists for checking of the x509 client certificate
1249 and SASL party. For x509 certs, the ACL check is made against the
1250 certificate's distinguished name. This is something that looks like
1251 @code{C=GB,O=ACME,L=Boston,CN=bob}. For SASL party, the ACL check is
1252 made against the username, which depending on the SASL plugin, may
1253 include a realm component, eg @code{bob} or @code{bob@@EXAMPLE.COM}.
1254 When the @option{acl} flag is set, the initial access list will be
1255 empty, with a @code{deny} policy. Thus no one will be allowed to
1256 use the VNC server until the ACLs have been loaded. This can be
1257 achieved using the @code{acl} monitor command.
1258
1259 @item lossy
1260
1261 Enable lossy compression methods (gradient, JPEG, ...). If this
1262 option is set, VNC client may receive lossy framebuffer updates
1263 depending on its encoding settings. Enabling this option can save
1264 a lot of bandwidth at the expense of quality.
1265
1266 @item non-adaptive
1267
1268 Disable adaptive encodings. Adaptive encodings are enabled by default.
1269 An adaptive encoding will try to detect frequently updated screen regions,
1270 and send updates in these regions using a lossy encoding (like JPEG).
1271 This can be really helpful to save bandwidth when playing videos. Disabling
1272 adaptive encodings restores the original static behavior of encodings
1273 like Tight.
1274
1275 @item share=[allow-exclusive|force-shared|ignore]
1276
1277 Set display sharing policy.  'allow-exclusive' allows clients to ask
1278 for exclusive access.  As suggested by the rfb spec this is
1279 implemented by dropping other connections.  Connecting multiple
1280 clients in parallel requires all clients asking for a shared session
1281 (vncviewer: -shared switch).  This is the default.  'force-shared'
1282 disables exclusive client access.  Useful for shared desktop sessions,
1283 where you don't want someone forgetting specify -shared disconnect
1284 everybody else.  'ignore' completely ignores the shared flag and
1285 allows everybody connect unconditionally.  Doesn't conform to the rfb
1286 spec but is traditional QEMU behavior.
1287
1288 @end table
1289 ETEXI
1290
1291 STEXI
1292 @end table
1293 ETEXI
1294 ARCHHEADING(, QEMU_ARCH_I386)
1295
1296 ARCHHEADING(i386 target only:, QEMU_ARCH_I386)
1297 STEXI
1298 @table @option
1299 ETEXI
1300
1301 DEF("win2k-hack", 0, QEMU_OPTION_win2k_hack,
1302     "-win2k-hack     use it when installing Windows 2000 to avoid a disk full bug\n",
1303     QEMU_ARCH_I386)
1304 STEXI
1305 @item -win2k-hack
1306 @findex -win2k-hack
1307 Use it when installing Windows 2000 to avoid a disk full bug. After
1308 Windows 2000 is installed, you no longer need this option (this option
1309 slows down the IDE transfers).
1310 ETEXI
1311
1312 HXCOMM Deprecated by -rtc
1313 DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386)
1314
1315 DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk,
1316     "-no-fd-bootchk  disable boot signature checking for floppy disks\n",
1317     QEMU_ARCH_I386)
1318 STEXI
1319 @item -no-fd-bootchk
1320 @findex -no-fd-bootchk
1321 Disable boot signature checking for floppy disks in BIOS. May
1322 be needed to boot from old floppy disks.
1323 ETEXI
1324
1325 DEF("no-acpi", 0, QEMU_OPTION_no_acpi,
1326            "-no-acpi        disable ACPI\n", QEMU_ARCH_I386)
1327 STEXI
1328 @item -no-acpi
1329 @findex -no-acpi
1330 Disable ACPI (Advanced Configuration and Power Interface) support. Use
1331 it if your guest OS complains about ACPI problems (PC target machine
1332 only).
1333 ETEXI
1334
1335 DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
1336     "-no-hpet        disable HPET\n", QEMU_ARCH_I386)
1337 STEXI
1338 @item -no-hpet
1339 @findex -no-hpet
1340 Disable HPET support.
1341 ETEXI
1342
1343 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
1344     "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
1345     "                ACPI table description\n", QEMU_ARCH_I386)
1346 STEXI
1347 @item -acpitable [sig=@var{str}][,rev=@var{n}][,oem_id=@var{str}][,oem_table_id=@var{str}][,oem_rev=@var{n}] [,asl_compiler_id=@var{str}][,asl_compiler_rev=@var{n}][,data=@var{file1}[:@var{file2}]...]
1348 @findex -acpitable
1349 Add ACPI table with specified header fields and context from specified files.
1350 For file=, take whole ACPI table from the specified files, including all
1351 ACPI headers (possible overridden by other options).
1352 For data=, only data
1353 portion of the table is used, all header information is specified in the
1354 command line.
1355 ETEXI
1356
1357 DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
1358     "-smbios file=binary\n"
1359     "                load SMBIOS entry from binary file\n"
1360     "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d][,uefi=on|off]\n"
1361     "                specify SMBIOS type 0 fields\n"
1362     "-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
1363     "              [,uuid=uuid][,sku=str][,family=str]\n"
1364     "                specify SMBIOS type 1 fields\n", QEMU_ARCH_I386)
1365 STEXI
1366 @item -smbios file=@var{binary}
1367 @findex -smbios
1368 Load SMBIOS entry from binary file.
1369
1370 @item -smbios type=0[,vendor=@var{str}][,version=@var{str}][,date=@var{str}][,release=@var{%d.%d}][,uefi=on|off]
1371 Specify SMBIOS type 0 fields
1372
1373 @item -smbios type=1[,manufacturer=@var{str}][,product=@var{str}] [,version=@var{str}][,serial=@var{str}][,uuid=@var{uuid}][,sku=@var{str}] [,family=@var{str}]
1374 Specify SMBIOS type 1 fields
1375 ETEXI
1376
1377 STEXI
1378 @end table
1379 ETEXI
1380 DEFHEADING()
1381
1382 DEFHEADING(Network options:)
1383 STEXI
1384 @table @option
1385 ETEXI
1386
1387 HXCOMM Legacy slirp options (now moved to -net user):
1388 #ifdef CONFIG_SLIRP
1389 DEF("tftp", HAS_ARG, QEMU_OPTION_tftp, "", QEMU_ARCH_ALL)
1390 DEF("bootp", HAS_ARG, QEMU_OPTION_bootp, "", QEMU_ARCH_ALL)
1391 DEF("redir", HAS_ARG, QEMU_OPTION_redir, "", QEMU_ARCH_ALL)
1392 #ifndef _WIN32
1393 DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL)
1394 #endif
1395 #endif
1396
1397 DEF("net", HAS_ARG, QEMU_OPTION_net,
1398     "-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n"
1399     "                create a new Network Interface Card and connect it to VLAN 'n'\n"
1400 #ifdef CONFIG_SLIRP
1401     "-net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=on|off]\n"
1402     "         [,hostname=host][,dhcpstart=addr][,dns=addr][,dnssearch=domain][,tftp=dir]\n"
1403     "         [,bootfile=f][,hostfwd=rule][,guestfwd=rule]"
1404 #ifndef _WIN32
1405                                              "[,smb=dir[,smbserver=addr]]\n"
1406 #endif
1407     "                connect the user mode network stack to VLAN 'n', configure its\n"
1408     "                DHCP server and enabled optional services\n"
1409 #endif
1410 #ifdef _WIN32
1411     "-net tap[,vlan=n][,name=str],ifname=name\n"
1412     "                connect the host TAP network interface to VLAN 'n'\n"
1413 #else
1414     "-net tap[,vlan=n][,name=str][,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h][,vhostfds=x:y:...:z][,vhostforce=on|off][,queues=n]\n"
1415     "                connect the host TAP network interface to VLAN 'n'\n"
1416     "                use network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n"
1417     "                to configure it and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n"
1418     "                to deconfigure it\n"
1419     "                use '[down]script=no' to disable script execution\n"
1420     "                use network helper 'helper' (default=" DEFAULT_BRIDGE_HELPER ") to\n"
1421     "                configure it\n"
1422     "                use 'fd=h' to connect to an already opened TAP interface\n"
1423     "                use 'fds=x:y:...:z' to connect to already opened multiqueue capable TAP interfaces\n"
1424     "                use 'sndbuf=nbytes' to limit the size of the send buffer (the\n"
1425     "                default is disabled 'sndbuf=0' to enable flow control set 'sndbuf=1048576')\n"
1426     "                use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag\n"
1427     "                use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition\n"
1428     "                use vhost=on to enable experimental in kernel accelerator\n"
1429     "                    (only has effect for virtio guests which use MSIX)\n"
1430     "                use vhostforce=on to force vhost on for non-MSIX virtio guests\n"
1431     "                use 'vhostfd=h' to connect to an already opened vhost net device\n"
1432     "                use 'vhostfds=x:y:...:z to connect to multiple already opened vhost net devices\n"
1433     "                use 'queues=n' to specify the number of queues to be created for multiqueue TAP\n"
1434     "-net bridge[,vlan=n][,name=str][,br=bridge][,helper=helper]\n"
1435     "                connects a host TAP network interface to a host bridge device 'br'\n"
1436     "                (default=" DEFAULT_BRIDGE_INTERFACE ") using the program 'helper'\n"
1437     "                (default=" DEFAULT_BRIDGE_HELPER ")\n"
1438 #endif
1439 #ifdef __linux__
1440     "-net l2tpv3[,vlan=n][,name=str],src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport],txsession=txsession[,rxsession=rxsession][,ipv6=on/off][,udp=on/off][,cookie64=on/off][,counter][,pincounter][,txcookie=txcookie][,rxcookie=rxcookie][,offset=offset]\n"
1441     "                connect the VLAN to an Ethernet over L2TPv3 pseudowire\n"
1442     "                Linux kernel 3.3+ as well as most routers can talk\n"
1443     "                L2TPv3. This transport allows connecting a VM to a VM,\n"
1444     "                VM to a router and even VM to Host. It is a nearly-universal\n"
1445     "                standard (RFC3391). Note - this implementation uses static\n"
1446     "                pre-configured tunnels (same as the Linux kernel).\n"
1447     "                use 'src=' to specify source address\n"
1448     "                use 'dst=' to specify destination address\n"
1449     "                use 'udp=on' to specify udp encapsulation\n"
1450     "                use 'srcport=' to specify source udp port\n"
1451     "                use 'dstport=' to specify destination udp port\n"
1452     "                use 'ipv6=on' to force v6\n"
1453     "                L2TPv3 uses cookies to prevent misconfiguration as\n"
1454     "                well as a weak security measure\n"
1455     "                use 'rxcookie=0x012345678' to specify a rxcookie\n"
1456     "                use 'txcookie=0x012345678' to specify a txcookie\n"
1457     "                use 'cookie64=on' to set cookie size to 64 bit, otherwise 32\n"
1458     "                use 'counter=off' to force a 'cut-down' L2TPv3 with no counter\n"
1459     "                use 'pincounter=on' to work around broken counter handling in peer\n"
1460     "                use 'offset=X' to add an extra offset between header and data\n"
1461 #endif
1462     "-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port]\n"
1463     "                connect the vlan 'n' to another VLAN using a socket connection\n"
1464     "-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port[,localaddr=addr]]\n"
1465     "                connect the vlan 'n' to multicast maddr and port\n"
1466     "                use 'localaddr=addr' to specify the host address to send packets from\n"
1467     "-net socket[,vlan=n][,name=str][,fd=h][,udp=host:port][,localaddr=host:port]\n"
1468     "                connect the vlan 'n' to another VLAN using an UDP tunnel\n"
1469 #ifdef CONFIG_VDE
1470     "-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n"
1471     "                connect the vlan 'n' to port 'n' of a vde switch running\n"
1472     "                on host and listening for incoming connections on 'socketpath'.\n"
1473     "                Use group 'groupname' and mode 'octalmode' to change default\n"
1474     "                ownership and permissions for communication port.\n"
1475 #endif
1476 #ifdef CONFIG_NETMAP
1477     "-net netmap,ifname=name[,devname=nmname]\n"
1478     "                attach to the existing netmap-enabled network interface 'name', or to a\n"
1479     "                VALE port (created on the fly) called 'name' ('nmname' is name of the \n"
1480     "                netmap device, defaults to '/dev/netmap')\n"
1481 #endif
1482     "-net dump[,vlan=n][,file=f][,len=n]\n"
1483     "                dump traffic on vlan 'n' to file 'f' (max n bytes per packet)\n"
1484     "-net none       use it alone to have zero network devices. If no -net option\n"
1485     "                is provided, the default is '-net nic -net user'\n", QEMU_ARCH_ALL)
1486 DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
1487     "-netdev ["
1488 #ifdef CONFIG_SLIRP
1489     "user|"
1490 #endif
1491     "tap|"
1492     "bridge|"
1493 #ifdef CONFIG_VDE
1494     "vde|"
1495 #endif
1496 #ifdef CONFIG_NETMAP
1497     "netmap|"
1498 #endif
1499     "vhost-user|"
1500     "socket|"
1501     "hubport],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
1502 STEXI
1503 @item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}] [,name=@var{name}][,addr=@var{addr}][,vectors=@var{v}]
1504 @findex -net
1505 Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n}
1506 = 0 is the default). The NIC is an e1000 by default on the PC
1507 target. Optionally, the MAC address can be changed to @var{mac}, the
1508 device address set to @var{addr} (PCI cards only),
1509 and a @var{name} can be assigned for use in monitor commands.
1510 Optionally, for PCI cards, you can specify the number @var{v} of MSI-X vectors
1511 that the card should have; this option currently only affects virtio cards; set
1512 @var{v} = 0 to disable MSI-X. If no @option{-net} option is specified, a single
1513 NIC is created.  QEMU can emulate several different models of network card.
1514 Valid values for @var{type} are
1515 @code{virtio}, @code{i82551}, @code{i82557b}, @code{i82559er},
1516 @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
1517 @code{e1000}, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
1518 Not all devices are supported on all targets.  Use @code{-net nic,model=help}
1519 for a list of available devices for your target.
1520
1521 @item -netdev user,id=@var{id}[,@var{option}][,@var{option}][,...]
1522 @findex -netdev
1523 @item -net user[,@var{option}][,@var{option}][,...]
1524 Use the user mode network stack which requires no administrator
1525 privilege to run. Valid options are:
1526
1527 @table @option
1528 @item vlan=@var{n}
1529 Connect user mode stack to VLAN @var{n} (@var{n} = 0 is the default).
1530
1531 @item id=@var{id}
1532 @item name=@var{name}
1533 Assign symbolic name for use in monitor commands.
1534
1535 @item net=@var{addr}[/@var{mask}]
1536 Set IP network address the guest will see. Optionally specify the netmask,
1537 either in the form a.b.c.d or as number of valid top-most bits. Default is
1538 10.0.2.0/24.
1539
1540 @item host=@var{addr}
1541 Specify the guest-visible address of the host. Default is the 2nd IP in the
1542 guest network, i.e. x.x.x.2.
1543
1544 @item restrict=on|off
1545 If this option is enabled, the guest will be isolated, i.e. it will not be
1546 able to contact the host and no guest IP packets will be routed over the host
1547 to the outside. This option does not affect any explicitly set forwarding rules.
1548
1549 @item hostname=@var{name}
1550 Specifies the client hostname reported by the built-in DHCP server.
1551
1552 @item dhcpstart=@var{addr}
1553 Specify the first of the 16 IPs the built-in DHCP server can assign. Default
1554 is the 15th to 31st IP in the guest network, i.e. x.x.x.15 to x.x.x.31.
1555
1556 @item dns=@var{addr}
1557 Specify the guest-visible address of the virtual nameserver. The address must
1558 be different from the host address. Default is the 3rd IP in the guest network,
1559 i.e. x.x.x.3.
1560
1561 @item dnssearch=@var{domain}
1562 Provides an entry for the domain-search list sent by the built-in
1563 DHCP server. More than one domain suffix can be transmitted by specifying
1564 this option multiple times. If supported, this will cause the guest to
1565 automatically try to append the given domain suffix(es) in case a domain name
1566 can not be resolved.
1567
1568 Example:
1569 @example
1570 qemu -net user,dnssearch=mgmt.example.org,dnssearch=example.org [...]
1571 @end example
1572
1573 @item tftp=@var{dir}
1574 When using the user mode network stack, activate a built-in TFTP
1575 server. The files in @var{dir} will be exposed as the root of a TFTP server.
1576 The TFTP client on the guest must be configured in binary mode (use the command
1577 @code{bin} of the Unix TFTP client).
1578
1579 @item bootfile=@var{file}
1580 When using the user mode network stack, broadcast @var{file} as the BOOTP
1581 filename. In conjunction with @option{tftp}, this can be used to network boot
1582 a guest from a local directory.
1583
1584 Example (using pxelinux):
1585 @example
1586 qemu-system-i386 -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
1587 @end example
1588
1589 @item smb=@var{dir}[,smbserver=@var{addr}]
1590 When using the user mode network stack, activate a built-in SMB
1591 server so that Windows OSes can access to the host files in @file{@var{dir}}
1592 transparently. The IP address of the SMB server can be set to @var{addr}. By
1593 default the 4th IP in the guest network is used, i.e. x.x.x.4.
1594
1595 In the guest Windows OS, the line:
1596 @example
1597 10.0.2.4 smbserver
1598 @end example
1599 must be added in the file @file{C:\WINDOWS\LMHOSTS} (for windows 9x/Me)
1600 or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windows NT/2000).
1601
1602 Then @file{@var{dir}} can be accessed in @file{\\smbserver\qemu}.
1603
1604 Note that a SAMBA server must be installed on the host OS.
1605 QEMU was tested successfully with smbd versions from Red Hat 9,
1606 Fedora Core 3 and OpenSUSE 11.x.
1607
1608 @item hostfwd=[tcp|udp]:[@var{hostaddr}]:@var{hostport}-[@var{guestaddr}]:@var{guestport}
1609 Redirect incoming TCP or UDP connections to the host port @var{hostport} to
1610 the guest IP address @var{guestaddr} on guest port @var{guestport}. If
1611 @var{guestaddr} is not specified, its value is x.x.x.15 (default first address
1612 given by the built-in DHCP server). By specifying @var{hostaddr}, the rule can
1613 be bound to a specific host interface. If no connection type is set, TCP is
1614 used. This option can be given multiple times.
1615
1616 For example, to redirect host X11 connection from screen 1 to guest
1617 screen 0, use the following:
1618
1619 @example
1620 # on the host
1621 qemu-system-i386 -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
1622 # this host xterm should open in the guest X11 server
1623 xterm -display :1
1624 @end example
1625
1626 To redirect telnet connections from host port 5555 to telnet port on
1627 the guest, use the following:
1628
1629 @example
1630 # on the host
1631 qemu-system-i386 -net user,hostfwd=tcp::5555-:23 [...]
1632 telnet localhost 5555
1633 @end example
1634
1635 Then when you use on the host @code{telnet localhost 5555}, you
1636 connect to the guest telnet server.
1637
1638 @item guestfwd=[tcp]:@var{server}:@var{port}-@var{dev}
1639 @item guestfwd=[tcp]:@var{server}:@var{port}-@var{cmd:command}
1640 Forward guest TCP connections to the IP address @var{server} on port @var{port}
1641 to the character device @var{dev} or to a program executed by @var{cmd:command}
1642 which gets spawned for each connection. This option can be given multiple times.
1643
1644 You can either use a chardev directly and have that one used throughout QEMU's
1645 lifetime, like in the following example:
1646
1647 @example
1648 # open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever
1649 # the guest accesses it
1650 qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...]
1651 @end example
1652
1653 Or you can execute a command on every TCP connection established by the guest,
1654 so that QEMU behaves similar to an inetd process for that virtual server:
1655
1656 @example
1657 # call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234
1658 # and connect the TCP stream to its stdin/stdout
1659 qemu -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
1660 @end example
1661
1662 @end table
1663
1664 Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still
1665 processed and applied to -net user. Mixing them with the new configuration
1666 syntax gives undefined results. Their use for new applications is discouraged
1667 as they will be removed from future versions.
1668
1669 @item -netdev tap,id=@var{id}[,fd=@var{h}][,ifname=@var{name}][,script=@var{file}][,downscript=@var{dfile}][,helper=@var{helper}]
1670 @item -net tap[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,ifname=@var{name}][,script=@var{file}][,downscript=@var{dfile}][,helper=@var{helper}]
1671 Connect the host TAP network interface @var{name} to VLAN @var{n}.
1672
1673 Use the network script @var{file} to configure it and the network script
1674 @var{dfile} to deconfigure it. If @var{name} is not provided, the OS
1675 automatically provides one. The default network configure script is
1676 @file{/etc/qemu-ifup} and the default network deconfigure script is
1677 @file{/etc/qemu-ifdown}. Use @option{script=no} or @option{downscript=no}
1678 to disable script execution.
1679
1680 If running QEMU as an unprivileged user, use the network helper
1681 @var{helper} to configure the TAP interface. The default network
1682 helper executable is @file{/path/to/qemu-bridge-helper}.
1683
1684 @option{fd}=@var{h} can be used to specify the handle of an already
1685 opened host TAP interface.
1686
1687 Examples:
1688
1689 @example
1690 #launch a QEMU instance with the default network script
1691 qemu-system-i386 linux.img -net nic -net tap
1692 @end example
1693
1694 @example
1695 #launch a QEMU instance with two NICs, each one connected
1696 #to a TAP device
1697 qemu-system-i386 linux.img \
1698                  -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
1699                  -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
1700 @end example
1701
1702 @example
1703 #launch a QEMU instance with the default network helper to
1704 #connect a TAP device to bridge br0
1705 qemu-system-i386 linux.img \
1706                  -net nic -net tap,"helper=/path/to/qemu-bridge-helper"
1707 @end example
1708
1709 @item -netdev bridge,id=@var{id}[,br=@var{bridge}][,helper=@var{helper}]
1710 @item -net bridge[,vlan=@var{n}][,name=@var{name}][,br=@var{bridge}][,helper=@var{helper}]
1711 Connect a host TAP network interface to a host bridge device.
1712
1713 Use the network helper @var{helper} to configure the TAP interface and
1714 attach it to the bridge. The default network helper executable is
1715 @file{/path/to/qemu-bridge-helper} and the default bridge
1716 device is @file{br0}.
1717
1718 Examples:
1719
1720 @example
1721 #launch a QEMU instance with the default network helper to
1722 #connect a TAP device to bridge br0
1723 qemu-system-i386 linux.img -net bridge -net nic,model=virtio
1724 @end example
1725
1726 @example
1727 #launch a QEMU instance with the default network helper to
1728 #connect a TAP device to bridge qemubr0
1729 qemu-system-i386 linux.img -net bridge,br=qemubr0 -net nic,model=virtio
1730 @end example
1731
1732 @item -netdev socket,id=@var{id}[,fd=@var{h}][,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
1733 @item -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}] [,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
1734
1735 Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual
1736 machine using a TCP socket connection. If @option{listen} is
1737 specified, QEMU waits for incoming connections on @var{port}
1738 (@var{host} is optional). @option{connect} is used to connect to
1739 another QEMU instance using the @option{listen} option. @option{fd}=@var{h}
1740 specifies an already opened TCP socket.
1741
1742 Example:
1743 @example
1744 # launch a first QEMU instance
1745 qemu-system-i386 linux.img \
1746                  -net nic,macaddr=52:54:00:12:34:56 \
1747                  -net socket,listen=:1234
1748 # connect the VLAN 0 of this instance to the VLAN 0
1749 # of the first instance
1750 qemu-system-i386 linux.img \
1751                  -net nic,macaddr=52:54:00:12:34:57 \
1752                  -net socket,connect=127.0.0.1:1234
1753 @end example
1754
1755 @item -netdev socket,id=@var{id}[,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]]
1756 @item -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]]
1757
1758 Create a VLAN @var{n} shared with another QEMU virtual
1759 machines using a UDP multicast socket, effectively making a bus for
1760 every QEMU with same multicast address @var{maddr} and @var{port}.
1761 NOTES:
1762 @enumerate
1763 @item
1764 Several QEMU can be running on different hosts and share same bus (assuming
1765 correct multicast setup for these hosts).
1766 @item
1767 mcast support is compatible with User Mode Linux (argument @option{eth@var{N}=mcast}), see
1768 @url{http://user-mode-linux.sf.net}.
1769 @item
1770 Use @option{fd=h} to specify an already opened UDP multicast socket.
1771 @end enumerate
1772
1773 Example:
1774 @example
1775 # launch one QEMU instance
1776 qemu-system-i386 linux.img \
1777                  -net nic,macaddr=52:54:00:12:34:56 \
1778                  -net socket,mcast=230.0.0.1:1234
1779 # launch another QEMU instance on same "bus"
1780 qemu-system-i386 linux.img \
1781                  -net nic,macaddr=52:54:00:12:34:57 \
1782                  -net socket,mcast=230.0.0.1:1234
1783 # launch yet another QEMU instance on same "bus"
1784 qemu-system-i386 linux.img \
1785                  -net nic,macaddr=52:54:00:12:34:58 \
1786                  -net socket,mcast=230.0.0.1:1234
1787 @end example
1788
1789 Example (User Mode Linux compat.):
1790 @example
1791 # launch QEMU instance (note mcast address selected
1792 # is UML's default)
1793 qemu-system-i386 linux.img \
1794                  -net nic,macaddr=52:54:00:12:34:56 \
1795                  -net socket,mcast=239.192.168.1:1102
1796 # launch UML
1797 /path/to/linux ubd0=/path/to/root_fs eth0=mcast
1798 @end example
1799
1800 Example (send packets from host's 1.2.3.4):
1801 @example
1802 qemu-system-i386 linux.img \
1803                  -net nic,macaddr=52:54:00:12:34:56 \
1804                  -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
1805 @end example
1806
1807 @item -netdev l2tpv3,id=@var{id},src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}]
1808 @item -net l2tpv3[,vlan=@var{n}][,name=@var{name}],src=@var{srcaddr},dst=@var{dstaddr}[,srcport=@var{srcport}][,dstport=@var{dstport}],txsession=@var{txsession}[,rxsession=@var{rxsession}][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=@var{txcookie}][,rxcookie=@var{rxcookie}][,offset=@var{offset}]
1809 Connect VLAN @var{n} to L2TPv3 pseudowire. L2TPv3 (RFC3391) is a popular
1810 protocol to transport Ethernet (and other Layer 2) data frames between
1811 two systems. It is present in routers, firewalls and the Linux kernel
1812 (from version 3.3 onwards).
1813
1814 This transport allows a VM to communicate to another VM, router or firewall directly.
1815
1816 @item src=@var{srcaddr}
1817     source address (mandatory)
1818 @item dst=@var{dstaddr}
1819     destination address (mandatory)
1820 @item udp
1821     select udp encapsulation (default is ip).
1822 @item srcport=@var{srcport}
1823     source udp port.
1824 @item dstport=@var{dstport}
1825     destination udp port.
1826 @item ipv6
1827     force v6, otherwise defaults to v4.
1828 @item rxcookie=@var{rxcookie}
1829 @item txcookie=@var{txcookie}
1830     Cookies are a weak form of security in the l2tpv3 specification.
1831 Their function is mostly to prevent misconfiguration. By default they are 32
1832 bit.
1833 @item cookie64
1834     Set cookie size to 64 bit instead of the default 32
1835 @item counter=off
1836     Force a 'cut-down' L2TPv3 with no counter as in
1837 draft-mkonstan-l2tpext-keyed-ipv6-tunnel-00
1838 @item pincounter=on
1839     Work around broken counter handling in peer. This may also help on
1840 networks which have packet reorder.
1841 @item offset=@var{offset}
1842     Add an extra offset between header and data
1843
1844 For example, to attach a VM running on host 4.3.2.1 via L2TPv3 to the bridge br-lan
1845 on the remote Linux host 1.2.3.4:
1846 @example
1847 # Setup tunnel on linux host using raw ip as encapsulation
1848 # on 1.2.3.4
1849 ip l2tp add tunnel remote 4.3.2.1 local 1.2.3.4 tunnel_id 1 peer_tunnel_id 1 \
1850     encap udp udp_sport 16384 udp_dport 16384
1851 ip l2tp add session tunnel_id 1 name vmtunnel0 session_id \
1852     0xFFFFFFFF peer_session_id 0xFFFFFFFF
1853 ifconfig vmtunnel0 mtu 1500
1854 ifconfig vmtunnel0 up
1855 brctl addif br-lan vmtunnel0
1856
1857
1858 # on 4.3.2.1
1859 # launch QEMU instance - if your network has reorder or is very lossy add ,pincounter
1860
1861 qemu-system-i386 linux.img -net nic -net l2tpv3,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter
1862
1863
1864 @end example
1865
1866 @item -netdev vde,id=@var{id}[,sock=@var{socketpath}][,port=@var{n}][,group=@var{groupname}][,mode=@var{octalmode}]
1867 @item -net vde[,vlan=@var{n}][,name=@var{name}][,sock=@var{socketpath}] [,port=@var{n}][,group=@var{groupname}][,mode=@var{octalmode}]
1868 Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and
1869 listening for incoming connections on @var{socketpath}. Use GROUP @var{groupname}
1870 and MODE @var{octalmode} to change default ownership and permissions for
1871 communication port. This option is only available if QEMU has been compiled
1872 with vde support enabled.
1873
1874 Example:
1875 @example
1876 # launch vde switch
1877 vde_switch -F -sock /tmp/myswitch
1878 # launch QEMU instance
1879 qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
1880 @end example
1881
1882 @item -netdev hubport,id=@var{id},hubid=@var{hubid}
1883
1884 Create a hub port on QEMU "vlan" @var{hubid}.
1885
1886 The hubport netdev lets you connect a NIC to a QEMU "vlan" instead of a single
1887 netdev.  @code{-net} and @code{-device} with parameter @option{vlan} create the
1888 required hub automatically.
1889
1890 @item -netdev vhost-user,chardev=@var{id}[,vhostforce=on|off]
1891
1892 Establish a vhost-user netdev, backed by a chardev @var{id}. The chardev should
1893 be a unix domain socket backed one. The vhost-user uses a specifically defined
1894 protocol to pass vhost ioctl replacement messages to an application on the other
1895 end of the socket. On non-MSIX guests, the feature can be forced with
1896 @var{vhostforce}.
1897
1898 Example:
1899 @example
1900 qemu -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
1901      -numa node,memdev=mem \
1902      -chardev socket,path=/path/to/socket \
1903      -netdev type=vhost-user,id=net0,chardev=chr0 \
1904      -device virtio-net-pci,netdev=net0
1905 @end example
1906
1907 @item -net dump[,vlan=@var{n}][,file=@var{file}][,len=@var{len}]
1908 Dump network traffic on VLAN @var{n} to file @var{file} (@file{qemu-vlan0.pcap} by default).
1909 At most @var{len} bytes (64k by default) per packet are stored. The file format is
1910 libpcap, so it can be analyzed with tools such as tcpdump or Wireshark.
1911
1912 @item -net none
1913 Indicate that no network devices should be configured. It is used to
1914 override the default configuration (@option{-net nic -net user}) which
1915 is activated if no @option{-net} options are provided.
1916 ETEXI
1917
1918 STEXI
1919 @end table
1920 ETEXI
1921 DEFHEADING()
1922
1923 DEFHEADING(Character device options:)
1924 STEXI
1925
1926 The general form of a character device option is:
1927 @table @option
1928 ETEXI
1929
1930 DEF("chardev", HAS_ARG, QEMU_OPTION_chardev,
1931     "-chardev null,id=id[,mux=on|off]\n"
1932     "-chardev socket,id=id[,host=host],port=port[,to=to][,ipv4][,ipv6][,nodelay]\n"
1933     "         [,server][,nowait][,telnet][,mux=on|off] (tcp)\n"
1934     "-chardev socket,id=id,path=path[,server][,nowait][,telnet],[mux=on|off] (unix)\n"
1935     "-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n"
1936     "         [,localport=localport][,ipv4][,ipv6][,mux=on|off]\n"
1937     "-chardev msmouse,id=id[,mux=on|off]\n"
1938     "-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n"
1939     "         [,mux=on|off]\n"
1940     "-chardev ringbuf,id=id[,size=size]\n"
1941     "-chardev file,id=id,path=path[,mux=on|off]\n"
1942     "-chardev pipe,id=id,path=path[,mux=on|off]\n"
1943 #ifdef _WIN32
1944     "-chardev console,id=id[,mux=on|off]\n"
1945     "-chardev serial,id=id,path=path[,mux=on|off]\n"
1946 #else
1947     "-chardev pty,id=id[,mux=on|off]\n"
1948     "-chardev stdio,id=id[,mux=on|off][,signal=on|off]\n"
1949 #endif
1950 #ifdef CONFIG_BRLAPI
1951     "-chardev braille,id=id[,mux=on|off]\n"
1952 #endif
1953 #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
1954         || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
1955     "-chardev serial,id=id,path=path[,mux=on|off]\n"
1956     "-chardev tty,id=id,path=path[,mux=on|off]\n"
1957 #endif
1958 #if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
1959     "-chardev parallel,id=id,path=path[,mux=on|off]\n"
1960     "-chardev parport,id=id,path=path[,mux=on|off]\n"
1961 #endif
1962 #if defined(CONFIG_SPICE)
1963     "-chardev spicevmc,id=id,name=name[,debug=debug]\n"
1964     "-chardev spiceport,id=id,name=name[,debug=debug]\n"
1965 #endif
1966     , QEMU_ARCH_ALL
1967 )
1968
1969 STEXI
1970 @item -chardev @var{backend} ,id=@var{id} [,mux=on|off] [,@var{options}]
1971 @findex -chardev
1972 Backend is one of:
1973 @option{null},
1974 @option{socket},
1975 @option{udp},
1976 @option{msmouse},
1977 @option{vc},
1978 @option{ringbuf},
1979 @option{file},
1980 @option{pipe},
1981 @option{console},
1982 @option{serial},
1983 @option{pty},
1984 @option{stdio},
1985 @option{braille},
1986 @option{tty},
1987 @option{parallel},
1988 @option{parport},
1989 @option{spicevmc}.
1990 @option{spiceport}.
1991 The specific backend will determine the applicable options.
1992
1993 All devices must have an id, which can be any string up to 127 characters long.
1994 It is used to uniquely identify this device in other command line directives.
1995
1996 A character device may be used in multiplexing mode by multiple front-ends.
1997 The key sequence of @key{Control-a} and @key{c} will rotate the input focus
1998 between attached front-ends. Specify @option{mux=on} to enable this mode.
1999
2000 Options to each backend are described below.
2001
2002 @item -chardev null ,id=@var{id}
2003 A void device. This device will not emit any data, and will drop any data it
2004 receives. The null backend does not take any options.
2005
2006 @item -chardev socket ,id=@var{id} [@var{TCP options} or @var{unix options}] [,server] [,nowait] [,telnet]
2007
2008 Create a two-way stream socket, which can be either a TCP or a unix socket. A
2009 unix socket will be created if @option{path} is specified. Behaviour is
2010 undefined if TCP options are specified for a unix socket.
2011
2012 @option{server} specifies that the socket shall be a listening socket.
2013
2014 @option{nowait} specifies that QEMU should not block waiting for a client to
2015 connect to a listening socket.
2016
2017 @option{telnet} specifies that traffic on the socket should interpret telnet
2018 escape sequences.
2019
2020 TCP and unix socket options are given below:
2021
2022 @table @option
2023
2024 @item TCP options: port=@var{port} [,host=@var{host}] [,to=@var{to}] [,ipv4] [,ipv6] [,nodelay]
2025
2026 @option{host} for a listening socket specifies the local address to be bound.
2027 For a connecting socket species the remote host to connect to. @option{host} is
2028 optional for listening sockets. If not specified it defaults to @code{0.0.0.0}.
2029
2030 @option{port} for a listening socket specifies the local port to be bound. For a
2031 connecting socket specifies the port on the remote host to connect to.
2032 @option{port} can be given as either a port number or a service name.
2033 @option{port} is required.
2034
2035 @option{to} is only relevant to listening sockets. If it is specified, and
2036 @option{port} cannot be bound, QEMU will attempt to bind to subsequent ports up
2037 to and including @option{to} until it succeeds. @option{to} must be specified
2038 as a port number.
2039
2040 @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must be used.
2041 If neither is specified the socket may use either protocol.
2042
2043 @option{nodelay} disables the Nagle algorithm.
2044
2045 @item unix options: path=@var{path}
2046
2047 @option{path} specifies the local path of the unix socket. @option{path} is
2048 required.
2049
2050 @end table
2051
2052 @item -chardev udp ,id=@var{id} [,host=@var{host}] ,port=@var{port} [,localaddr=@var{localaddr}] [,localport=@var{localport}] [,ipv4] [,ipv6]
2053
2054 Sends all traffic from the guest to a remote host over UDP.
2055
2056 @option{host} specifies the remote host to connect to. If not specified it
2057 defaults to @code{localhost}.
2058
2059 @option{port} specifies the port on the remote host to connect to. @option{port}
2060 is required.
2061
2062 @option{localaddr} specifies the local address to bind to. If not specified it
2063 defaults to @code{0.0.0.0}.
2064
2065 @option{localport} specifies the local port to bind to. If not specified any
2066 available local port will be used.
2067
2068 @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must be used.
2069 If neither is specified the device may use either protocol.
2070
2071 @item -chardev msmouse ,id=@var{id}
2072
2073 Forward QEMU's emulated msmouse events to the guest. @option{msmouse} does not
2074 take any options.
2075
2076 @item -chardev vc ,id=@var{id} [[,width=@var{width}] [,height=@var{height}]] [[,cols=@var{cols}] [,rows=@var{rows}]]
2077
2078 Connect to a QEMU text console. @option{vc} may optionally be given a specific
2079 size.
2080
2081 @option{width} and @option{height} specify the width and height respectively of
2082 the console, in pixels.
2083
2084 @option{cols} and @option{rows} specify that the console be sized to fit a text
2085 console with the given dimensions.
2086
2087 @item -chardev ringbuf ,id=@var{id} [,size=@var{size}]
2088
2089 Create a ring buffer with fixed size @option{size}.
2090 @var{size} must be a power of two, and defaults to @code{64K}).
2091
2092 @item -chardev file ,id=@var{id} ,path=@var{path}
2093
2094 Log all traffic received from the guest to a file.
2095
2096 @option{path} specifies the path of the file to be opened. This file will be
2097 created if it does not already exist, and overwritten if it does. @option{path}
2098 is required.
2099
2100 @item -chardev pipe ,id=@var{id} ,path=@var{path}
2101
2102 Create a two-way connection to the guest. The behaviour differs slightly between
2103 Windows hosts and other hosts:
2104
2105 On Windows, a single duplex pipe will be created at
2106 @file{\\.pipe\@option{path}}.
2107
2108 On other hosts, 2 pipes will be created called @file{@option{path}.in} and
2109 @file{@option{path}.out}. Data written to @file{@option{path}.in} will be
2110 received by the guest. Data written by the guest can be read from
2111 @file{@option{path}.out}. QEMU will not create these fifos, and requires them to
2112 be present.
2113
2114 @option{path} forms part of the pipe path as described above. @option{path} is
2115 required.
2116
2117 @item -chardev console ,id=@var{id}
2118
2119 Send traffic from the guest to QEMU's standard output. @option{console} does not
2120 take any options.
2121
2122 @option{console} is only available on Windows hosts.
2123
2124 @item -chardev serial ,id=@var{id} ,path=@option{path}
2125
2126 Send traffic from the guest to a serial device on the host.
2127
2128 On Unix hosts serial will actually accept any tty device,
2129 not only serial lines.
2130
2131 @option{path} specifies the name of the serial device to open.
2132
2133 @item -chardev pty ,id=@var{id}
2134
2135 Create a new pseudo-terminal on the host and connect to it. @option{pty} does
2136 not take any options.
2137
2138 @option{pty} is not available on Windows hosts.
2139
2140 @item -chardev stdio ,id=@var{id} [,signal=on|off]
2141 Connect to standard input and standard output of the QEMU process.
2142
2143 @option{signal} controls if signals are enabled on the terminal, that includes
2144 exiting QEMU with the key sequence @key{Control-c}. This option is enabled by
2145 default, use @option{signal=off} to disable it.
2146
2147 @option{stdio} is not available on Windows hosts.
2148
2149 @item -chardev braille ,id=@var{id}
2150
2151 Connect to a local BrlAPI server. @option{braille} does not take any options.
2152
2153 @item -chardev tty ,id=@var{id} ,path=@var{path}
2154
2155 @option{tty} is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
2156 DragonFlyBSD hosts.  It is an alias for @option{serial}.
2157
2158 @option{path} specifies the path to the tty. @option{path} is required.
2159
2160 @item -chardev parallel ,id=@var{id} ,path=@var{path}
2161 @item -chardev parport ,id=@var{id} ,path=@var{path}
2162
2163 @option{parallel} is only available on Linux, FreeBSD and DragonFlyBSD hosts.
2164
2165 Connect to a local parallel port.
2166
2167 @option{path} specifies the path to the parallel port device. @option{path} is
2168 required.
2169
2170 @item -chardev spicevmc ,id=@var{id} ,debug=@var{debug}, name=@var{name}
2171
2172 @option{spicevmc} is only available when spice support is built in.
2173
2174 @option{debug} debug level for spicevmc
2175
2176 @option{name} name of spice channel to connect to
2177
2178 Connect to a spice virtual machine channel, such as vdiport.
2179
2180 @item -chardev spiceport ,id=@var{id} ,debug=@var{debug}, name=@var{name}
2181
2182 @option{spiceport} is only available when spice support is built in.
2183
2184 @option{debug} debug level for spicevmc
2185
2186 @option{name} name of spice port to connect to
2187
2188 Connect to a spice port, allowing a Spice client to handle the traffic
2189 identified by a name (preferably a fqdn).
2190 ETEXI
2191
2192 STEXI
2193 @end table
2194 ETEXI
2195 DEFHEADING()
2196
2197 DEFHEADING(Device URL Syntax:)
2198 STEXI
2199
2200 In addition to using normal file images for the emulated storage devices,
2201 QEMU can also use networked resources such as iSCSI devices. These are
2202 specified using a special URL syntax.
2203
2204 @table @option
2205 @item iSCSI
2206 iSCSI support allows QEMU to access iSCSI resources directly and use as
2207 images for the guest storage. Both disk and cdrom images are supported.
2208
2209 Syntax for specifying iSCSI LUNs is
2210 ``iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>''
2211
2212 By default qemu will use the iSCSI initiator-name
2213 'iqn.2008-11.org.linux-kvm[:<name>]' but this can also be set from the command
2214 line or a configuration file.
2215
2216
2217 Example (without authentication):
2218 @example
2219 qemu-system-i386 -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \
2220                  -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \
2221                  -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
2222 @end example
2223
2224 Example (CHAP username/password via URL):
2225 @example
2226 qemu-system-i386 -drive file=iscsi://user%password@@192.0.2.1/iqn.2001-04.com.example/1
2227 @end example
2228
2229 Example (CHAP username/password via environment variables):
2230 @example
2231 LIBISCSI_CHAP_USERNAME="user" \
2232 LIBISCSI_CHAP_PASSWORD="password" \
2233 qemu-system-i386 -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
2234 @end example
2235
2236 iSCSI support is an optional feature of QEMU and only available when
2237 compiled and linked against libiscsi.
2238 ETEXI
2239 DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi,
2240     "-iscsi [user=user][,password=password]\n"
2241     "       [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE\n"
2242     "       [,initiator-name=initiator-iqn][,id=target-iqn]\n"
2243     "                iSCSI session parameters\n", QEMU_ARCH_ALL)
2244 STEXI
2245
2246 iSCSI parameters such as username and password can also be specified via
2247 a configuration file. See qemu-doc for more information and examples.
2248
2249 @item NBD
2250 QEMU supports NBD (Network Block Devices) both using TCP protocol as well
2251 as Unix Domain Sockets.
2252
2253 Syntax for specifying a NBD device using TCP
2254 ``nbd:<server-ip>:<port>[:exportname=<export>]''
2255
2256 Syntax for specifying a NBD device using Unix Domain Sockets
2257 ``nbd:unix:<domain-socket>[:exportname=<export>]''
2258
2259
2260 Example for TCP
2261 @example
2262 qemu-system-i386 --drive file=nbd:192.0.2.1:30000
2263 @end example
2264
2265 Example for Unix Domain Sockets
2266 @example
2267 qemu-system-i386 --drive file=nbd:unix:/tmp/nbd-socket
2268 @end example
2269
2270 @item SSH
2271 QEMU supports SSH (Secure Shell) access to remote disks.
2272
2273 Examples:
2274 @example
2275 qemu-system-i386 -drive file=ssh://user@@host/path/to/disk.img
2276 qemu-system-i386 -drive file.driver=ssh,file.user=user,file.host=host,file.port=22,file.path=/path/to/disk.img
2277 @end example
2278
2279 Currently authentication must be done using ssh-agent.  Other
2280 authentication methods may be supported in future.
2281
2282 @item Sheepdog
2283 Sheepdog is a distributed storage system for QEMU.
2284 QEMU supports using either local sheepdog devices or remote networked
2285 devices.
2286
2287 Syntax for specifying a sheepdog device
2288 @example
2289 sheepdog[+tcp|+unix]://[host:port]/vdiname[?socket=path][#snapid|#tag]
2290 @end example
2291
2292 Example
2293 @example
2294 qemu-system-i386 --drive file=sheepdog://192.0.2.1:30000/MyVirtualMachine
2295 @end example
2296
2297 See also @url{http://http://www.osrg.net/sheepdog/}.
2298
2299 @item GlusterFS
2300 GlusterFS is an user space distributed file system.
2301 QEMU supports the use of GlusterFS volumes for hosting VM disk images using
2302 TCP, Unix Domain Sockets and RDMA transport protocols.
2303
2304 Syntax for specifying a VM disk image on GlusterFS volume is
2305 @example
2306 gluster[+transport]://[server[:port]]/volname/image[?socket=...]
2307 @end example
2308
2309
2310 Example
2311 @example
2312 qemu-system-x86_64 --drive file=gluster://192.0.2.1/testvol/a.img
2313 @end example
2314
2315 See also @url{http://www.gluster.org}.
2316
2317 @item HTTP/HTTPS/FTP/FTPS/TFTP
2318 QEMU supports read-only access to files accessed over http(s), ftp(s) and tftp.
2319
2320 Syntax using a single filename:
2321 @example
2322 <protocol>://[<username>[:<password>]@@]<host>/<path>
2323 @end example
2324
2325 where:
2326 @table @option
2327 @item protocol
2328 'http', 'https', 'ftp', 'ftps', or 'tftp'.
2329
2330 @item username
2331 Optional username for authentication to the remote server.
2332
2333 @item password
2334 Optional password for authentication to the remote server.
2335
2336 @item host
2337 Address of the remote server.
2338
2339 @item path
2340 Path on the remote server, including any query string.
2341 @end table
2342
2343 The following options are also supported:
2344 @table @option
2345 @item url
2346 The full URL when passing options to the driver explicitly.
2347
2348 @item readahead
2349 The amount of data to read ahead with each range request to the remote server.
2350 This value may optionally have the suffix 'T', 'G', 'M', 'K', 'k' or 'b'. If it
2351 does not have a suffix, it will be assumed to be in bytes. The value must be a
2352 multiple of 512 bytes. It defaults to 256k.
2353
2354 @item sslverify
2355 Whether to verify the remote server's certificate when connecting over SSL. It
2356 can have the value 'on' or 'off'. It defaults to 'on'.
2357 @end table
2358
2359 Note that when passing options to qemu explicitly, @option{driver} is the value
2360 of <protocol>.
2361
2362 Example: boot from a remote Fedora 20 live ISO image
2363 @example
2364 qemu-system-x86_64 --drive media=cdrom,file=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
2365
2366 qemu-system-x86_64 --drive media=cdrom,file.driver=http,file.url=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
2367 @end example
2368
2369 Example: boot from a remote Fedora 20 cloud image using a local overlay for
2370 writes, copy-on-read, and a readahead of 64k
2371 @example
2372 qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
2373
2374 qemu-system-x86_64 -drive file=/tmp/Fedora-x86_64-20-20131211.1-sda.qcow2,copy-on-read=on
2375 @end example
2376
2377 Example: boot from an image stored on a VMware vSphere server with a self-signed
2378 certificate using a local overlay for writes and a readahead of 64k
2379 @example
2380 qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"https",, "file.url":"https://user:password@@vsphere.example.com/folder/test/test-flat.vmdk?dcPath=Datacenter&dsName=datastore1",, "file.sslverify":"off",, "file.readahead":"64k"@}' /tmp/test.qcow2
2381
2382 qemu-system-x86_64 -drive file=/tmp/test.qcow2
2383 @end example
2384 ETEXI
2385
2386 STEXI
2387 @end table
2388 ETEXI
2389
2390 DEFHEADING(Bluetooth(R) options:)
2391 STEXI
2392 @table @option
2393 ETEXI
2394
2395 DEF("bt", HAS_ARG, QEMU_OPTION_bt, \
2396     "-bt hci,null    dumb bluetooth HCI - doesn't respond to commands\n" \
2397     "-bt hci,host[:id]\n" \
2398     "                use host's HCI with the given name\n" \
2399     "-bt hci[,vlan=n]\n" \
2400     "                emulate a standard HCI in virtual scatternet 'n'\n" \
2401     "-bt vhci[,vlan=n]\n" \
2402     "                add host computer to virtual scatternet 'n' using VHCI\n" \
2403     "-bt device:dev[,vlan=n]\n" \
2404     "                emulate a bluetooth device 'dev' in scatternet 'n'\n",
2405     QEMU_ARCH_ALL)
2406 STEXI
2407 @item -bt hci[...]
2408 @findex -bt
2409 Defines the function of the corresponding Bluetooth HCI.  -bt options
2410 are matched with the HCIs present in the chosen machine type.  For
2411 example when emulating a machine with only one HCI built into it, only
2412 the first @code{-bt hci[...]} option is valid and defines the HCI's
2413 logic.  The Transport Layer is decided by the machine type.  Currently
2414 the machines @code{n800} and @code{n810} have one HCI and all other
2415 machines have none.
2416
2417 @anchor{bt-hcis}
2418 The following three types are recognized:
2419
2420 @table @option
2421 @item -bt hci,null
2422 (default) The corresponding Bluetooth HCI assumes no internal logic
2423 and will not respond to any HCI commands or emit events.
2424
2425 @item -bt hci,host[:@var{id}]
2426 (@code{bluez} only) The corresponding HCI passes commands / events
2427 to / from the physical HCI identified by the name @var{id} (default:
2428 @code{hci0}) on the computer running QEMU.  Only available on @code{bluez}
2429 capable systems like Linux.
2430
2431 @item -bt hci[,vlan=@var{n}]
2432 Add a virtual, standard HCI that will participate in the Bluetooth
2433 scatternet @var{n} (default @code{0}).  Similarly to @option{-net}
2434 VLANs, devices inside a bluetooth network @var{n} can only communicate
2435 with other devices in the same network (scatternet).
2436 @end table
2437
2438 @item -bt vhci[,vlan=@var{n}]
2439 (Linux-host only) Create a HCI in scatternet @var{n} (default 0) attached
2440 to the host bluetooth stack instead of to the emulated target.  This
2441 allows the host and target machines to participate in a common scatternet
2442 and communicate.  Requires the Linux @code{vhci} driver installed.  Can
2443 be used as following:
2444
2445 @example
2446 qemu-system-i386 [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
2447 @end example
2448
2449 @item -bt device:@var{dev}[,vlan=@var{n}]
2450 Emulate a bluetooth device @var{dev} and place it in network @var{n}
2451 (default @code{0}).  QEMU can only emulate one type of bluetooth devices
2452 currently:
2453
2454 @table @option
2455 @item keyboard
2456 Virtual wireless keyboard implementing the HIDP bluetooth profile.
2457 @end table
2458 ETEXI
2459
2460 STEXI
2461 @end table
2462 ETEXI
2463 DEFHEADING()
2464
2465 #ifdef CONFIG_TPM
2466 DEFHEADING(TPM device options:)
2467
2468 DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
2469     "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
2470     "                use path to provide path to a character device; default is /dev/tpm0\n"
2471     "                use cancel-path to provide path to TPM's cancel sysfs entry; if\n"
2472     "                not provided it will be searched for in /sys/class/misc/tpm?/device\n",
2473     QEMU_ARCH_ALL)
2474 STEXI
2475
2476 The general form of a TPM device option is:
2477 @table @option
2478
2479 @item -tpmdev @var{backend} ,id=@var{id} [,@var{options}]
2480 @findex -tpmdev
2481 Backend type must be:
2482 @option{passthrough}.
2483
2484 The specific backend type will determine the applicable options.
2485 The @code{-tpmdev} option creates the TPM backend and requires a
2486 @code{-device} option that specifies the TPM frontend interface model.
2487
2488 Options to each backend are described below.
2489
2490 Use 'help' to print all available TPM backend types.
2491 @example
2492 qemu -tpmdev help
2493 @end example
2494
2495 @item -tpmdev passthrough, id=@var{id}, path=@var{path}, cancel-path=@var{cancel-path}
2496
2497 (Linux-host only) Enable access to the host's TPM using the passthrough
2498 driver.
2499
2500 @option{path} specifies the path to the host's TPM device, i.e., on
2501 a Linux host this would be @code{/dev/tpm0}.
2502 @option{path} is optional and by default @code{/dev/tpm0} is used.
2503
2504 @option{cancel-path} specifies the path to the host TPM device's sysfs
2505 entry allowing for cancellation of an ongoing TPM command.
2506 @option{cancel-path} is optional and by default QEMU will search for the
2507 sysfs entry to use.
2508
2509 Some notes about using the host's TPM with the passthrough driver:
2510
2511 The TPM device accessed by the passthrough driver must not be
2512 used by any other application on the host.
2513
2514 Since the host's firmware (BIOS/UEFI) has already initialized the TPM,
2515 the VM's firmware (BIOS/UEFI) will not be able to initialize the
2516 TPM again and may therefore not show a TPM-specific menu that would
2517 otherwise allow the user to configure the TPM, e.g., allow the user to
2518 enable/disable or activate/deactivate the TPM.
2519 Further, if TPM ownership is released from within a VM then the host's TPM
2520 will get disabled and deactivated. To enable and activate the
2521 TPM again afterwards, the host has to be rebooted and the user is
2522 required to enter the firmware's menu to enable and activate the TPM.
2523 If the TPM is left disabled and/or deactivated most TPM commands will fail.
2524
2525 To create a passthrough TPM use the following two options:
2526 @example
2527 -tpmdev passthrough,id=tpm0 -device tpm-tis,tpmdev=tpm0
2528 @end example
2529 Note that the @code{-tpmdev} id is @code{tpm0} and is referenced by
2530 @code{tpmdev=tpm0} in the device option.
2531
2532 @end table
2533
2534 ETEXI
2535
2536 DEFHEADING()
2537
2538 #endif
2539
2540 DEFHEADING(Linux/Multiboot boot specific:)
2541 STEXI
2542
2543 When using these options, you can use a given Linux or Multiboot
2544 kernel without installing it in the disk image. It can be useful
2545 for easier testing of various kernels.
2546
2547 @table @option
2548 ETEXI
2549
2550 DEF("kernel", HAS_ARG, QEMU_OPTION_kernel, \
2551     "-kernel bzImage use 'bzImage' as kernel image\n", QEMU_ARCH_ALL)
2552 STEXI
2553 @item -kernel @var{bzImage}
2554 @findex -kernel
2555 Use @var{bzImage} as kernel image. The kernel can be either a Linux kernel
2556 or in multiboot format.
2557 ETEXI
2558
2559 DEF("append", HAS_ARG, QEMU_OPTION_append, \
2560     "-append cmdline use 'cmdline' as kernel command line\n", QEMU_ARCH_ALL)
2561 STEXI
2562 @item -append @var{cmdline}
2563 @findex -append
2564 Use @var{cmdline} as kernel command line
2565 ETEXI
2566
2567 DEF("initrd", HAS_ARG, QEMU_OPTION_initrd, \
2568            "-initrd file    use 'file' as initial ram disk\n", QEMU_ARCH_ALL)
2569 STEXI
2570 @item -initrd @var{file}
2571 @findex -initrd
2572 Use @var{file} as initial ram disk.
2573
2574 @item -initrd "@var{file1} arg=foo,@var{file2}"
2575
2576 This syntax is only available with multiboot.
2577
2578 Use @var{file1} and @var{file2} as modules and pass arg=foo as parameter to the
2579 first module.
2580 ETEXI
2581
2582 DEF("dtb", HAS_ARG, QEMU_OPTION_dtb, \
2583     "-dtb    file    use 'file' as device tree image\n", QEMU_ARCH_ALL)
2584 STEXI
2585 @item -dtb @var{file}
2586 @findex -dtb
2587 Use @var{file} as a device tree binary (dtb) image and pass it to the kernel
2588 on boot.
2589 ETEXI
2590
2591 STEXI
2592 @end table
2593 ETEXI
2594 DEFHEADING()
2595
2596 DEFHEADING(Debug/Expert options:)
2597 STEXI
2598 @table @option
2599 ETEXI
2600
2601 DEF("serial", HAS_ARG, QEMU_OPTION_serial, \
2602     "-serial dev     redirect the serial port to char device 'dev'\n",
2603     QEMU_ARCH_ALL)
2604 STEXI
2605 @item -serial @var{dev}
2606 @findex -serial
2607 Redirect the virtual serial port to host character device
2608 @var{dev}. The default device is @code{vc} in graphical mode and
2609 @code{stdio} in non graphical mode.
2610
2611 This option can be used several times to simulate up to 4 serial
2612 ports.
2613
2614 Use @code{-serial none} to disable all serial ports.
2615
2616 Available character devices are:
2617 @table @option
2618 @item vc[:@var{W}x@var{H}]
2619 Virtual console. Optionally, a width and height can be given in pixel with
2620 @example
2621 vc:800x600
2622 @end example
2623 It is also possible to specify width or height in characters:
2624 @example
2625 vc:80Cx24C
2626 @end example
2627 @item pty
2628 [Linux only] Pseudo TTY (a new PTY is automatically allocated)
2629 @item none
2630 No device is allocated.
2631 @item null
2632 void device
2633 @item chardev:@var{id}
2634 Use a named character device defined with the @code{-chardev} option.
2635 @item /dev/XXX
2636 [Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
2637 parameters are set according to the emulated ones.
2638 @item /dev/parport@var{N}
2639 [Linux only, parallel port only] Use host parallel port
2640 @var{N}. Currently SPP and EPP parallel port features can be used.
2641 @item file:@var{filename}
2642 Write output to @var{filename}. No character can be read.
2643 @item stdio
2644 [Unix only] standard input/output
2645 @item pipe:@var{filename}
2646 name pipe @var{filename}
2647 @item COM@var{n}
2648 [Windows only] Use host serial port @var{n}
2649 @item udp:[@var{remote_host}]:@var{remote_port}[@@[@var{src_ip}]:@var{src_port}]
2650 This implements UDP Net Console.
2651 When @var{remote_host} or @var{src_ip} are not specified
2652 they default to @code{0.0.0.0}.
2653 When not using a specified @var{src_port} a random port is automatically chosen.
2654
2655 If you just want a simple readonly console you can use @code{netcat} or
2656 @code{nc}, by starting QEMU with: @code{-serial udp::4555} and nc as:
2657 @code{nc -u -l -p 4555}. Any time QEMU writes something to that port it
2658 will appear in the netconsole session.
2659
2660 If you plan to send characters back via netconsole or you want to stop
2661 and start QEMU a lot of times, you should have QEMU use the same
2662 source port each time by using something like @code{-serial
2663 udp::4555@@:4556} to QEMU. Another approach is to use a patched
2664 version of netcat which can listen to a TCP port and send and receive
2665 characters via udp.  If you have a patched version of netcat which
2666 activates telnet remote echo and single char transfer, then you can
2667 use the following options to step up a netcat redirector to allow
2668 telnet on port 5555 to access the QEMU port.
2669 @table @code
2670 @item QEMU Options:
2671 -serial udp::4555@@:4556
2672 @item netcat options:
2673 -u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
2674 @item telnet options:
2675 localhost 5555
2676 @end table
2677
2678 @item tcp:[@var{host}]:@var{port}[,@var{server}][,nowait][,nodelay]
2679 The TCP Net Console has two modes of operation.  It can send the serial
2680 I/O to a location or wait for a connection from a location.  By default
2681 the TCP Net Console is sent to @var{host} at the @var{port}.  If you use
2682 the @var{server} option QEMU will wait for a client socket application
2683 to connect to the port before continuing, unless the @code{nowait}
2684 option was specified.  The @code{nodelay} option disables the Nagle buffering
2685 algorithm.  If @var{host} is omitted, 0.0.0.0 is assumed. Only
2686 one TCP connection at a time is accepted. You can use @code{telnet} to
2687 connect to the corresponding character device.
2688 @table @code
2689 @item Example to send tcp console to 192.168.0.2 port 4444
2690 -serial tcp:192.168.0.2:4444
2691 @item Example to listen and wait on port 4444 for connection
2692 -serial tcp::4444,server
2693 @item Example to not wait and listen on ip 192.168.0.100 port 4444
2694 -serial tcp:192.168.0.100:4444,server,nowait
2695 @end table
2696
2697 @item telnet:@var{host}:@var{port}[,server][,nowait][,nodelay]
2698 The telnet protocol is used instead of raw tcp sockets.  The options
2699 work the same as if you had specified @code{-serial tcp}.  The
2700 difference is that the port acts like a telnet server or client using
2701 telnet option negotiation.  This will also allow you to send the
2702 MAGIC_SYSRQ sequence if you use a telnet that supports sending the break
2703 sequence.  Typically in unix telnet you do it with Control-] and then
2704 type "send break" followed by pressing the enter key.
2705
2706 @item unix:@var{path}[,server][,nowait]
2707 A unix domain socket is used instead of a tcp socket.  The option works the
2708 same as if you had specified @code{-serial tcp} except the unix domain socket
2709 @var{path} is used for connections.
2710
2711 @item mon:@var{dev_string}
2712 This is a special option to allow the monitor to be multiplexed onto
2713 another serial port.  The monitor is accessed with key sequence of
2714 @key{Control-a} and then pressing @key{c}.
2715 @var{dev_string} should be any one of the serial devices specified
2716 above.  An example to multiplex the monitor onto a telnet server
2717 listening on port 4444 would be:
2718 @table @code
2719 @item -serial mon:telnet::4444,server,nowait
2720 @end table
2721 When the monitor is multiplexed to stdio in this way, Ctrl+C will not terminate
2722 QEMU any more but will be passed to the guest instead.
2723
2724 @item braille
2725 Braille device.  This will use BrlAPI to display the braille output on a real
2726 or fake device.
2727
2728 @item msmouse
2729 Three button serial mouse. Configure the guest to use Microsoft protocol.
2730 @end table
2731 ETEXI
2732
2733 DEF("parallel", HAS_ARG, QEMU_OPTION_parallel, \
2734     "-parallel dev   redirect the parallel port to char device 'dev'\n",
2735     QEMU_ARCH_ALL)
2736 STEXI
2737 @item -parallel @var{dev}
2738 @findex -parallel
2739 Redirect the virtual parallel port to host device @var{dev} (same
2740 devices as the serial port). On Linux hosts, @file{/dev/parportN} can
2741 be used to use hardware devices connected on the corresponding host
2742 parallel port.
2743
2744 This option can be used several times to simulate up to 3 parallel
2745 ports.
2746
2747 Use @code{-parallel none} to disable all parallel ports.
2748 ETEXI
2749
2750 DEF("monitor", HAS_ARG, QEMU_OPTION_monitor, \
2751     "-monitor dev    redirect the monitor to char device 'dev'\n",
2752     QEMU_ARCH_ALL)
2753 STEXI
2754 @item -monitor @var{dev}
2755 @findex -monitor
2756 Redirect the monitor to host device @var{dev} (same devices as the
2757 serial port).
2758 The default device is @code{vc} in graphical mode and @code{stdio} in
2759 non graphical mode.
2760 Use @code{-monitor none} to disable the default monitor.
2761 ETEXI
2762 DEF("qmp", HAS_ARG, QEMU_OPTION_qmp, \
2763     "-qmp dev        like -monitor but opens in 'control' mode\n",
2764     QEMU_ARCH_ALL)
2765 STEXI
2766 @item -qmp @var{dev}
2767 @findex -qmp
2768 Like -monitor but opens in 'control' mode.
2769 ETEXI
2770
2771 DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
2772     "-mon [chardev=]name[,mode=readline|control][,default]\n", QEMU_ARCH_ALL)
2773 STEXI
2774 @item -mon [chardev=]name[,mode=readline|control][,default]
2775 @findex -mon
2776 Setup monitor on chardev @var{name}.
2777 ETEXI
2778
2779 DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \
2780     "-debugcon dev   redirect the debug console to char device 'dev'\n",
2781     QEMU_ARCH_ALL)
2782 STEXI
2783 @item -debugcon @var{dev}
2784 @findex -debugcon
2785 Redirect the debug console to host device @var{dev} (same devices as the
2786 serial port).  The debug console is an I/O port which is typically port
2787 0xe9; writing to that I/O port sends output to this device.
2788 The default device is @code{vc} in graphical mode and @code{stdio} in
2789 non graphical mode.
2790 ETEXI
2791
2792 DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \
2793     "-pidfile file   write PID to 'file'\n", QEMU_ARCH_ALL)
2794 STEXI
2795 @item -pidfile @var{file}
2796 @findex -pidfile
2797 Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
2798 from a script.
2799 ETEXI
2800
2801 DEF("singlestep", 0, QEMU_OPTION_singlestep, \
2802     "-singlestep     always run in singlestep mode\n", QEMU_ARCH_ALL)
2803 STEXI
2804 @item -singlestep
2805 @findex -singlestep
2806 Run the emulation in single step mode.
2807 ETEXI
2808
2809 DEF("S", 0, QEMU_OPTION_S, \
2810     "-S              freeze CPU at startup (use 'c' to start execution)\n",
2811     QEMU_ARCH_ALL)
2812 STEXI
2813 @item -S
2814 @findex -S
2815 Do not start CPU at startup (you must type 'c' in the monitor).
2816 ETEXI
2817
2818 DEF("realtime", HAS_ARG, QEMU_OPTION_realtime,
2819     "-realtime [mlock=on|off]\n"
2820     "                run qemu with realtime features\n"
2821     "                mlock=on|off controls mlock support (default: on)\n",
2822     QEMU_ARCH_ALL)
2823 STEXI
2824 @item -realtime mlock=on|off
2825 @findex -realtime
2826 Run qemu with realtime features.
2827 mlocking qemu and guest memory can be enabled via @option{mlock=on}
2828 (enabled by default).
2829 ETEXI
2830
2831 DEF("gdb", HAS_ARG, QEMU_OPTION_gdb, \
2832     "-gdb dev        wait for gdb connection on 'dev'\n", QEMU_ARCH_ALL)
2833 STEXI
2834 @item -gdb @var{dev}
2835 @findex -gdb
2836 Wait for gdb connection on device @var{dev} (@pxref{gdb_usage}). Typical
2837 connections will likely be TCP-based, but also UDP, pseudo TTY, or even
2838 stdio are reasonable use case. The latter is allowing to start QEMU from
2839 within gdb and establish the connection via a pipe:
2840 @example
2841 (gdb) target remote | exec qemu-system-i386 -gdb stdio ...
2842 @end example
2843 ETEXI
2844
2845 DEF("s", 0, QEMU_OPTION_s, \
2846     "-s              shorthand for -gdb tcp::" DEFAULT_GDBSTUB_PORT "\n",
2847     QEMU_ARCH_ALL)
2848 STEXI
2849 @item -s
2850 @findex -s
2851 Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
2852 (@pxref{gdb_usage}).
2853 ETEXI
2854
2855 DEF("d", HAS_ARG, QEMU_OPTION_d, \
2856     "-d item1,...    enable logging of specified items (use '-d help' for a list of log items)\n",
2857     QEMU_ARCH_ALL)
2858 STEXI
2859 @item -d @var{item1}[,...]
2860 @findex -d
2861 Enable logging of specified items. Use '-d help' for a list of log items.
2862 ETEXI
2863
2864 DEF("D", HAS_ARG, QEMU_OPTION_D, \
2865     "-D logfile      output log to logfile (default stderr)\n",
2866     QEMU_ARCH_ALL)
2867 STEXI
2868 @item -D @var{logfile}
2869 @findex -D
2870 Output log in @var{logfile} instead of to stderr
2871 ETEXI
2872
2873 DEF("L", HAS_ARG, QEMU_OPTION_L, \
2874     "-L path         set the directory for the BIOS, VGA BIOS and keymaps\n",
2875     QEMU_ARCH_ALL)
2876 STEXI
2877 @item -L  @var{path}
2878 @findex -L
2879 Set the directory for the BIOS, VGA BIOS and keymaps.
2880 ETEXI
2881
2882 DEF("bios", HAS_ARG, QEMU_OPTION_bios, \
2883     "-bios file      set the filename for the BIOS\n", QEMU_ARCH_ALL)
2884 STEXI
2885 @item -bios @var{file}
2886 @findex -bios
2887 Set the filename for the BIOS.
2888 ETEXI
2889
2890 DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \
2891     "-enable-kvm     enable KVM full virtualization support\n", QEMU_ARCH_ALL)
2892 STEXI
2893 @item -enable-kvm
2894 @findex -enable-kvm
2895 Enable KVM full virtualization support. This option is only available
2896 if KVM support is enabled when compiling.
2897 ETEXI
2898
2899 DEF("xen-domid", HAS_ARG, QEMU_OPTION_xen_domid,
2900     "-xen-domid id   specify xen guest domain id\n", QEMU_ARCH_ALL)
2901 DEF("xen-create", 0, QEMU_OPTION_xen_create,
2902     "-xen-create     create domain using xen hypercalls, bypassing xend\n"
2903     "                warning: should not be used when xend is in use\n",
2904     QEMU_ARCH_ALL)
2905 DEF("xen-attach", 0, QEMU_OPTION_xen_attach,
2906     "-xen-attach     attach to existing xen domain\n"
2907     "                xend will use this when starting QEMU\n",
2908     QEMU_ARCH_ALL)
2909 STEXI
2910 @item -xen-domid @var{id}
2911 @findex -xen-domid
2912 Specify xen guest domain @var{id} (XEN only).
2913 @item -xen-create
2914 @findex -xen-create
2915 Create domain using xen hypercalls, bypassing xend.
2916 Warning: should not be used when xend is in use (XEN only).
2917 @item -xen-attach
2918 @findex -xen-attach
2919 Attach to existing xen domain.
2920 xend will use this when starting QEMU (XEN only).
2921 ETEXI
2922
2923 DEF("no-reboot", 0, QEMU_OPTION_no_reboot, \
2924     "-no-reboot      exit instead of rebooting\n", QEMU_ARCH_ALL)
2925 STEXI
2926 @item -no-reboot
2927 @findex -no-reboot
2928 Exit instead of rebooting.
2929 ETEXI
2930
2931 DEF("no-shutdown", 0, QEMU_OPTION_no_shutdown, \
2932     "-no-shutdown    stop before shutdown\n", QEMU_ARCH_ALL)
2933 STEXI
2934 @item -no-shutdown
2935 @findex -no-shutdown
2936 Don't exit QEMU on guest shutdown, but instead only stop the emulation.
2937 This allows for instance switching to monitor to commit changes to the
2938 disk image.
2939 ETEXI
2940
2941 DEF("loadvm", HAS_ARG, QEMU_OPTION_loadvm, \
2942     "-loadvm [tag|id]\n" \
2943     "                start right away with a saved state (loadvm in monitor)\n",
2944     QEMU_ARCH_ALL)
2945 STEXI
2946 @item -loadvm @var{file}
2947 @findex -loadvm
2948 Start right away with a saved state (@code{loadvm} in monitor)
2949 ETEXI
2950
2951 #ifndef _WIN32
2952 DEF("daemonize", 0, QEMU_OPTION_daemonize, \
2953     "-daemonize      daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
2954 #endif
2955 STEXI
2956 @item -daemonize
2957 @findex -daemonize
2958 Daemonize the QEMU process after initialization.  QEMU will not detach from
2959 standard IO until it is ready to receive connections on any of its devices.
2960 This option is a useful way for external programs to launch QEMU without having
2961 to cope with initialization race conditions.
2962 ETEXI
2963
2964 DEF("option-rom", HAS_ARG, QEMU_OPTION_option_rom, \
2965     "-option-rom rom load a file, rom, into the option ROM space\n",
2966     QEMU_ARCH_ALL)
2967 STEXI
2968 @item -option-rom @var{file}
2969 @findex -option-rom
2970 Load the contents of @var{file} as an option ROM.
2971 This option is useful to load things like EtherBoot.
2972 ETEXI
2973
2974 DEF("clock", HAS_ARG, QEMU_OPTION_clock, \
2975     "-clock          force the use of the given methods for timer alarm.\n" \
2976     "                To see what timers are available use '-clock help'\n",
2977     QEMU_ARCH_ALL)
2978 STEXI
2979 @item -clock @var{method}
2980 @findex -clock
2981 Force the use of the given methods for timer alarm. To see what timers
2982 are available use @code{-clock help}.
2983 ETEXI
2984
2985 HXCOMM Options deprecated by -rtc
2986 DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL)
2987 DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL)
2988
2989 DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
2990     "-rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew]\n" \
2991     "                set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n",
2992     QEMU_ARCH_ALL)
2993
2994 STEXI
2995
2996 @item -rtc [base=utc|localtime|@var{date}][,clock=host|vm][,driftfix=none|slew]
2997 @findex -rtc
2998 Specify @option{base} as @code{utc} or @code{localtime} to let the RTC start at the current
2999 UTC or local time, respectively. @code{localtime} is required for correct date in
3000 MS-DOS or Windows. To start at a specific point in time, provide @var{date} in the
3001 format @code{2006-06-17T16:01:21} or @code{2006-06-17}. The default base is UTC.
3002
3003 By default the RTC is driven by the host system time. This allows using of the
3004 RTC as accurate reference clock inside the guest, specifically if the host
3005 time is smoothly following an accurate external reference clock, e.g. via NTP.
3006 If you want to isolate the guest time from the host, you can set @option{clock}
3007 to @code{rt} instead.  To even prevent it from progressing during suspension,
3008 you can set it to @code{vm}.
3009
3010 Enable @option{driftfix} (i386 targets only) if you experience time drift problems,
3011 specifically with Windows' ACPI HAL. This option will try to figure out how
3012 many timer interrupts were not processed by the Windows guest and will
3013 re-inject them.
3014 ETEXI
3015
3016 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
3017     "-icount [shift=N|auto][,align=on|off]\n" \
3018     "                enable virtual instruction counter with 2^N clock ticks per\n" \
3019     "                instruction and enable aligning the host and virtual clocks\n", QEMU_ARCH_ALL)
3020 STEXI
3021 @item -icount [shift=@var{N}|auto]
3022 @findex -icount
3023 Enable virtual instruction counter.  The virtual cpu will execute one
3024 instruction every 2^@var{N} ns of virtual time.  If @code{auto} is specified
3025 then the virtual cpu speed will be automatically adjusted to keep virtual
3026 time within a few seconds of real time.
3027
3028 Note that while this option can give deterministic behavior, it does not
3029 provide cycle accurate emulation.  Modern CPUs contain superscalar out of
3030 order cores with complex cache hierarchies.  The number of instructions
3031 executed often has little or no correlation with actual performance.
3032
3033 @option{align=on} will activate the delay algorithm which will try to
3034 to synchronise the host clock and the virtual clock. The goal is to
3035 have a guest running at the real frequency imposed by the shift option.
3036 Whenever the guest clock is behind the host clock and if
3037 @option{align=on} is specified then we print a messsage to the user
3038 to inform about the delay.
3039 Currently this option does not work when @option{shift} is @code{auto}.
3040 Note: The sync algorithm will work for those shift values for which
3041 the guest clock runs ahead of the host clock. Typically this happens
3042 when the shift value is high (how high depends on the host machine).
3043 ETEXI
3044
3045 DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \
3046     "-watchdog i6300esb|ib700\n" \
3047     "                enable virtual hardware watchdog [default=none]\n",
3048     QEMU_ARCH_ALL)
3049 STEXI
3050 @item -watchdog @var{model}
3051 @findex -watchdog
3052 Create a virtual hardware watchdog device.  Once enabled (by a guest
3053 action), the watchdog must be periodically polled by an agent inside
3054 the guest or else the guest will be restarted.
3055
3056 The @var{model} is the model of hardware watchdog to emulate.  Choices
3057 for model are: @code{ib700} (iBASE 700) which is a very simple ISA
3058 watchdog with a single timer, or @code{i6300esb} (Intel 6300ESB I/O
3059 controller hub) which is a much more featureful PCI-based dual-timer
3060 watchdog.  Choose a model for which your guest has drivers.
3061
3062 Use @code{-watchdog help} to list available hardware models.  Only one
3063 watchdog can be enabled for a guest.
3064 ETEXI
3065
3066 DEF("watchdog-action", HAS_ARG, QEMU_OPTION_watchdog_action, \
3067     "-watchdog-action reset|shutdown|poweroff|pause|debug|none\n" \
3068     "                action when watchdog fires [default=reset]\n",
3069     QEMU_ARCH_ALL)
3070 STEXI
3071 @item -watchdog-action @var{action}
3072 @findex -watchdog-action
3073
3074 The @var{action} controls what QEMU will do when the watchdog timer
3075 expires.
3076 The default is
3077 @code{reset} (forcefully reset the guest).
3078 Other possible actions are:
3079 @code{shutdown} (attempt to gracefully shutdown the guest),
3080 @code{poweroff} (forcefully poweroff the guest),
3081 @code{pause} (pause the guest),
3082 @code{debug} (print a debug message and continue), or
3083 @code{none} (do nothing).
3084
3085 Note that the @code{shutdown} action requires that the guest responds
3086 to ACPI signals, which it may not be able to do in the sort of
3087 situations where the watchdog would have expired, and thus
3088 @code{-watchdog-action shutdown} is not recommended for production use.
3089
3090 Examples:
3091
3092 @table @code
3093 @item -watchdog i6300esb -watchdog-action pause
3094 @item -watchdog ib700
3095 @end table
3096 ETEXI
3097
3098 DEF("echr", HAS_ARG, QEMU_OPTION_echr, \
3099     "-echr chr       set terminal escape character instead of ctrl-a\n",
3100     QEMU_ARCH_ALL)
3101 STEXI
3102
3103 @item -echr @var{numeric_ascii_value}
3104 @findex -echr
3105 Change the escape character used for switching to the monitor when using
3106 monitor and serial sharing.  The default is @code{0x01} when using the
3107 @code{-nographic} option.  @code{0x01} is equal to pressing
3108 @code{Control-a}.  You can select a different character from the ascii
3109 control keys where 1 through 26 map to Control-a through Control-z.  For
3110 instance you could use the either of the following to change the escape
3111 character to Control-t.
3112 @table @code
3113 @item -echr 0x14
3114 @item -echr 20
3115 @end table
3116 ETEXI
3117
3118 DEF("virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon, \
3119     "-virtioconsole c\n" \
3120     "                set virtio console\n", QEMU_ARCH_ALL)
3121 STEXI
3122 @item -virtioconsole @var{c}
3123 @findex -virtioconsole
3124 Set virtio console.
3125
3126 This option is maintained for backward compatibility.
3127
3128 Please use @code{-device virtconsole} for the new way of invocation.
3129 ETEXI
3130
3131 DEF("show-cursor", 0, QEMU_OPTION_show_cursor, \
3132     "-show-cursor    show cursor\n", QEMU_ARCH_ALL)
3133 STEXI
3134 @item -show-cursor
3135 @findex -show-cursor
3136 Show cursor.
3137 ETEXI
3138
3139 DEF("tb-size", HAS_ARG, QEMU_OPTION_tb_size, \
3140     "-tb-size n      set TB size\n", QEMU_ARCH_ALL)
3141 STEXI
3142 @item -tb-size @var{n}
3143 @findex -tb-size
3144 Set TB size.
3145 ETEXI
3146
3147 DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
3148     "-incoming p     prepare for incoming migration, listen on port p\n",
3149     QEMU_ARCH_ALL)
3150 STEXI
3151 @item -incoming @var{port}
3152 @findex -incoming
3153 Prepare for incoming migration, listen on @var{port}.
3154 ETEXI
3155
3156 DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
3157     "-nodefaults     don't create default devices\n", QEMU_ARCH_ALL)
3158 STEXI
3159 @item -nodefaults
3160 @findex -nodefaults
3161 Don't create default devices. Normally, QEMU sets the default devices like serial
3162 port, parallel port, virtual console, monitor device, VGA adapter, floppy and
3163 CD-ROM drive and others. The @code{-nodefaults} option will disable all those
3164 default devices.
3165 ETEXI
3166
3167 #ifndef _WIN32
3168 DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
3169     "-chroot dir     chroot to dir just before starting the VM\n",
3170     QEMU_ARCH_ALL)
3171 #endif
3172 STEXI
3173 @item -chroot @var{dir}
3174 @findex -chroot
3175 Immediately before starting guest execution, chroot to the specified
3176 directory.  Especially useful in combination with -runas.
3177 ETEXI
3178
3179 #ifndef _WIN32
3180 DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
3181     "-runas user     change to user id user just before starting the VM\n",
3182     QEMU_ARCH_ALL)
3183 #endif
3184 STEXI
3185 @item -runas @var{user}
3186 @findex -runas
3187 Immediately before starting guest execution, drop root privileges, switching
3188 to the specified user.
3189 ETEXI
3190
3191 DEF("prom-env", HAS_ARG, QEMU_OPTION_prom_env,
3192     "-prom-env variable=value\n"
3193     "                set OpenBIOS nvram variables\n",
3194     QEMU_ARCH_PPC | QEMU_ARCH_SPARC)
3195 STEXI
3196 @item -prom-env @var{variable}=@var{value}
3197 @findex -prom-env
3198 Set OpenBIOS nvram @var{variable} to given @var{value} (PPC, SPARC only).
3199 ETEXI
3200 DEF("semihosting", 0, QEMU_OPTION_semihosting,
3201     "-semihosting    semihosting mode\n",
3202     QEMU_ARCH_ARM | QEMU_ARCH_M68K | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32)
3203 STEXI
3204 @item -semihosting
3205 @findex -semihosting
3206 Semihosting mode (ARM, M68K, Xtensa only).
3207 ETEXI
3208 DEF("old-param", 0, QEMU_OPTION_old_param,
3209     "-old-param      old param mode\n", QEMU_ARCH_ARM)
3210 STEXI
3211 @item -old-param
3212 @findex -old-param (ARM)
3213 Old param mode (ARM only).
3214 ETEXI
3215
3216 DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \
3217     "-sandbox <arg>  Enable seccomp mode 2 system call filter (default 'off').\n",
3218     QEMU_ARCH_ALL)
3219 STEXI
3220 @item -sandbox @var{arg}
3221 @findex -sandbox
3222 Enable Seccomp mode 2 system call filter. 'on' will enable syscall filtering and 'off' will
3223 disable it.  The default is 'off'.
3224 ETEXI
3225
3226 DEF("readconfig", HAS_ARG, QEMU_OPTION_readconfig,
3227     "-readconfig <file>\n", QEMU_ARCH_ALL)
3228 STEXI
3229 @item -readconfig @var{file}
3230 @findex -readconfig
3231 Read device configuration from @var{file}. This approach is useful when you want to spawn
3232 QEMU process with many command line options but you don't want to exceed the command line
3233 character limit.
3234 ETEXI
3235 DEF("writeconfig", HAS_ARG, QEMU_OPTION_writeconfig,
3236     "-writeconfig <file>\n"
3237     "                read/write config file\n", QEMU_ARCH_ALL)
3238 STEXI
3239 @item -writeconfig @var{file}
3240 @findex -writeconfig
3241 Write device configuration to @var{file}. The @var{file} can be either filename to save
3242 command line and device configuration into file or dash @code{-}) character to print the
3243 output to stdout. This can be later used as input file for @code{-readconfig} option.
3244 ETEXI
3245 DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig,
3246     "-nodefconfig\n"
3247     "                do not load default config files at startup\n",
3248     QEMU_ARCH_ALL)
3249 STEXI
3250 @item -nodefconfig
3251 @findex -nodefconfig
3252 Normally QEMU loads configuration files from @var{sysconfdir} and @var{datadir} at startup.
3253 The @code{-nodefconfig} option will prevent QEMU from loading any of those config files.
3254 ETEXI
3255 DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,
3256     "-no-user-config\n"
3257     "                do not load user-provided config files at startup\n",
3258     QEMU_ARCH_ALL)
3259 STEXI
3260 @item -no-user-config
3261 @findex -no-user-config
3262 The @code{-no-user-config} option makes QEMU not load any of the user-provided
3263 config files on @var{sysconfdir}, but won't make it skip the QEMU-provided config
3264 files from @var{datadir}.
3265 ETEXI
3266 DEF("trace", HAS_ARG, QEMU_OPTION_trace,
3267     "-trace [events=<file>][,file=<file>]\n"
3268     "                specify tracing options\n",
3269     QEMU_ARCH_ALL)
3270 STEXI
3271 HXCOMM This line is not accurate, as some sub-options are backend-specific but
3272 HXCOMM HX does not support conditional compilation of text.
3273 @item -trace [events=@var{file}][,file=@var{file}]
3274 @findex -trace
3275
3276 Specify tracing options.
3277
3278 @table @option
3279 @item events=@var{file}
3280 Immediately enable events listed in @var{file}.
3281 The file must contain one event name (as listed in the @var{trace-events} file)
3282 per line.
3283 This option is only available if QEMU has been compiled with
3284 either @var{simple} or @var{stderr} tracing backend.
3285 @item file=@var{file}
3286 Log output traces to @var{file}.
3287
3288 This option is only available if QEMU has been compiled with
3289 the @var{simple} tracing backend.
3290 @end table
3291 ETEXI
3292
3293 HXCOMM Internal use
3294 DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL)
3295 DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
3296
3297 #ifdef __linux__
3298 DEF("enable-fips", 0, QEMU_OPTION_enablefips,
3299     "-enable-fips    enable FIPS 140-2 compliance\n",
3300     QEMU_ARCH_ALL)
3301 #endif
3302 STEXI
3303 @item -enable-fips
3304 @findex -enable-fips
3305 Enable FIPS 140-2 compliance mode.
3306 ETEXI
3307
3308 HXCOMM Deprecated by -machine accel=tcg property
3309 DEF("no-kvm", 0, QEMU_OPTION_no_kvm, "", QEMU_ARCH_I386)
3310
3311 HXCOMM Deprecated by kvm-pit driver properties
3312 DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection,
3313     "", QEMU_ARCH_I386)
3314
3315 HXCOMM Deprecated (ignored)
3316 DEF("no-kvm-pit", 0, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
3317
3318 HXCOMM Deprecated by -machine kernel_irqchip=on|off property
3319 DEF("no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
3320
3321 HXCOMM Deprecated (ignored)
3322 DEF("tdf", 0, QEMU_OPTION_tdf,"", QEMU_ARCH_ALL)
3323
3324 DEF("object", HAS_ARG, QEMU_OPTION_object,
3325     "-object TYPENAME[,PROP1=VALUE1,...]\n"
3326     "                create an new object of type TYPENAME setting properties\n"
3327     "                in the order they are specified.  Note that the 'id'\n"
3328     "                property must be set.  These objects are placed in the\n"
3329     "                '/objects' path.\n",
3330     QEMU_ARCH_ALL)
3331 STEXI
3332 @item -object @var{typename}[,@var{prop1}=@var{value1},...]
3333 @findex -object
3334 Create an new object of type @var{typename} setting properties
3335 in the order they are specified.  Note that the 'id'
3336 property must be set.  These objects are placed in the
3337 '/objects' path.
3338 ETEXI
3339
3340 DEF("msg", HAS_ARG, QEMU_OPTION_msg,
3341     "-msg timestamp[=on|off]\n"
3342     "                change the format of messages\n"
3343     "                on|off controls leading timestamps (default:on)\n",
3344     QEMU_ARCH_ALL)
3345 STEXI
3346 @item -msg timestamp[=on|off]
3347 @findex -msg
3348 prepend a timestamp to each log message.(default:on)
3349 ETEXI
3350
3351 DEF("dump-vmstate", HAS_ARG, QEMU_OPTION_dump_vmstate,
3352     "-dump-vmstate <file>\n"
3353     "                Output vmstate information in JSON format to file.\n"
3354     "                Use the scripts/vmstate-static-checker.py file to\n"
3355     "                check for possible regressions in migration code\n"
3356     "                by comparing two such vmstate dumps.",
3357     QEMU_ARCH_ALL)
3358 STEXI
3359 @item -dump-vmstate @var{file}
3360 @findex -dump-vmstate
3361 Dump json-encoded vmstate information for current machine type to file
3362 in @var{file}
3363 ETEXI
3364
3365 HXCOMM This is the last statement. Insert new options before this line!
3366 STEXI
3367 @end table
3368 ETEXI
This page took 0.214523 seconds and 4 git commands to generate.