qemu-options.hx 90 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604
  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. DEFHEADING(Standard options:)
  9. STEXI
  10. @table @option
  11. ETEXI
  12. DEF("help", 0, QEMU_OPTION_h,
  13. "-h or -help display this help and exit\n", QEMU_ARCH_ALL)
  14. STEXI
  15. @item -h
  16. @findex -h
  17. Display help and exit
  18. ETEXI
  19. DEF("version", 0, QEMU_OPTION_version,
  20. "-version display version information and exit\n", QEMU_ARCH_ALL)
  21. STEXI
  22. @item -version
  23. @findex -version
  24. Display version information and exit
  25. ETEXI
  26. DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
  27. "-machine [type=]name[,prop[=value][,...]]\n"
  28. " selects emulated machine (-machine ? for list)\n"
  29. " property accel=accel1[:accel2[:...]] selects accelerator\n"
  30. " supported accelerators are kvm, xen, tcg (default: tcg)\n",
  31. QEMU_ARCH_ALL)
  32. STEXI
  33. @item -machine [type=]@var{name}[,prop=@var{value}[,...]]
  34. @findex -machine
  35. Select the emulated machine by @var{name}. Use @code{-machine ?} to list
  36. available machines. Supported machine properties are:
  37. @table @option
  38. @item accel=@var{accels1}[:@var{accels2}[:...]]
  39. This is used to enable an accelerator. Depending on the target architecture,
  40. kvm, xen, or tcg can be available. By default, tcg is used. If there is more
  41. than one accelerator specified, the next one is used if the previous one fails
  42. to initialize.
  43. @end table
  44. ETEXI
  45. HXCOMM Deprecated by -machine
  46. DEF("M", HAS_ARG, QEMU_OPTION_M, "", QEMU_ARCH_ALL)
  47. DEF("cpu", HAS_ARG, QEMU_OPTION_cpu,
  48. "-cpu cpu select CPU (-cpu ? for list)\n", QEMU_ARCH_ALL)
  49. STEXI
  50. @item -cpu @var{model}
  51. @findex -cpu
  52. Select CPU model (-cpu ? for list and additional feature selection)
  53. ETEXI
  54. DEF("smp", HAS_ARG, QEMU_OPTION_smp,
  55. "-smp n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]\n"
  56. " set the number of CPUs to 'n' [default=1]\n"
  57. " maxcpus= maximum number of total cpus, including\n"
  58. " offline CPUs for hotplug, etc\n"
  59. " cores= number of CPU cores on one socket\n"
  60. " threads= number of threads on one CPU core\n"
  61. " sockets= number of discrete sockets in the system\n",
  62. QEMU_ARCH_ALL)
  63. STEXI
  64. @item -smp @var{n}[,cores=@var{cores}][,threads=@var{threads}][,sockets=@var{sockets}][,maxcpus=@var{maxcpus}]
  65. @findex -smp
  66. Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
  67. CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
  68. to 4.
  69. For the PC target, the number of @var{cores} per socket, the number
  70. of @var{threads} per cores and the total number of @var{sockets} can be
  71. specified. Missing values will be computed. If any on the three values is
  72. given, the total number of CPUs @var{n} can be omitted. @var{maxcpus}
  73. specifies the maximum number of hotpluggable CPUs.
  74. ETEXI
  75. DEF("numa", HAS_ARG, QEMU_OPTION_numa,
  76. "-numa node[,mem=size][,cpus=cpu[-cpu]][,nodeid=node]\n", QEMU_ARCH_ALL)
  77. STEXI
  78. @item -numa @var{opts}
  79. @findex -numa
  80. Simulate a multi node NUMA system. If mem and cpus are omitted, resources
  81. are split equally.
  82. ETEXI
  83. DEF("fda", HAS_ARG, QEMU_OPTION_fda,
  84. "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
  85. DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
  86. STEXI
  87. @item -fda @var{file}
  88. @item -fdb @var{file}
  89. @findex -fda
  90. @findex -fdb
  91. Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}). You can
  92. use the host floppy by using @file{/dev/fd0} as filename (@pxref{host_drives}).
  93. ETEXI
  94. DEF("hda", HAS_ARG, QEMU_OPTION_hda,
  95. "-hda/-hdb file use 'file' as IDE hard disk 0/1 image\n", QEMU_ARCH_ALL)
  96. DEF("hdb", HAS_ARG, QEMU_OPTION_hdb, "", QEMU_ARCH_ALL)
  97. DEF("hdc", HAS_ARG, QEMU_OPTION_hdc,
  98. "-hdc/-hdd file use 'file' as IDE hard disk 2/3 image\n", QEMU_ARCH_ALL)
  99. DEF("hdd", HAS_ARG, QEMU_OPTION_hdd, "", QEMU_ARCH_ALL)
  100. STEXI
  101. @item -hda @var{file}
  102. @item -hdb @var{file}
  103. @item -hdc @var{file}
  104. @item -hdd @var{file}
  105. @findex -hda
  106. @findex -hdb
  107. @findex -hdc
  108. @findex -hdd
  109. Use @var{file} as hard disk 0, 1, 2 or 3 image (@pxref{disk_images}).
  110. ETEXI
  111. DEF("cdrom", HAS_ARG, QEMU_OPTION_cdrom,
  112. "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n",
  113. QEMU_ARCH_ALL)
  114. STEXI
  115. @item -cdrom @var{file}
  116. @findex -cdrom
  117. Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and
  118. @option{-cdrom} at the same time). You can use the host CD-ROM by
  119. using @file{/dev/cdrom} as filename (@pxref{host_drives}).
  120. ETEXI
  121. DEF("drive", HAS_ARG, QEMU_OPTION_drive,
  122. "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
  123. " [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
  124. " [,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n"
  125. " [,serial=s][,addr=A][,id=name][,aio=threads|native]\n"
  126. " [,readonly=on|off]\n"
  127. " use 'file' as a drive image\n", QEMU_ARCH_ALL)
  128. STEXI
  129. @item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
  130. @findex -drive
  131. Define a new drive. Valid options are:
  132. @table @option
  133. @item file=@var{file}
  134. This option defines which disk image (@pxref{disk_images}) to use with
  135. this drive. If the filename contains comma, you must double it
  136. (for instance, "file=my,,file" to use file "my,file").
  137. Special files such as iSCSI devices can be specified using protocol
  138. specific URLs. See the section for "Device URL Syntax" for more information.
  139. @item if=@var{interface}
  140. This option defines on which type on interface the drive is connected.
  141. Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio.
  142. @item bus=@var{bus},unit=@var{unit}
  143. These options define where is connected the drive by defining the bus number and
  144. the unit id.
  145. @item index=@var{index}
  146. This option defines where is connected the drive by using an index in the list
  147. of available connectors of a given interface type.
  148. @item media=@var{media}
  149. This option defines the type of the media: disk or cdrom.
  150. @item cyls=@var{c},heads=@var{h},secs=@var{s}[,trans=@var{t}]
  151. These options have the same definition as they have in @option{-hdachs}.
  152. @item snapshot=@var{snapshot}
  153. @var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}).
  154. @item cache=@var{cache}
  155. @var{cache} is "none", "writeback", "unsafe", "directsync" or "writethrough" and controls how the host cache is used to access block data.
  156. @item aio=@var{aio}
  157. @var{aio} is "threads", or "native" and selects between pthread based disk I/O and native Linux AIO.
  158. @item format=@var{format}
  159. Specify which disk @var{format} will be used rather than detecting
  160. the format. Can be used to specifiy format=raw to avoid interpreting
  161. an untrusted format header.
  162. @item serial=@var{serial}
  163. This option specifies the serial number to assign to the device.
  164. @item addr=@var{addr}
  165. Specify the controller's PCI address (if=virtio only).
  166. @item werror=@var{action},rerror=@var{action}
  167. Specify which @var{action} to take on write and read errors. Valid actions are:
  168. "ignore" (ignore the error and try to continue), "stop" (pause QEMU),
  169. "report" (report the error to the guest), "enospc" (pause QEMU only if the
  170. host disk is full; report the error to the guest otherwise).
  171. The default setting is @option{werror=enospc} and @option{rerror=report}.
  172. @item readonly
  173. Open drive @option{file} as read-only. Guest write attempts will fail.
  174. @end table
  175. By default, writethrough caching is used for all block device. This means that
  176. the host page cache will be used to read and write data but write notification
  177. will be sent to the guest only when the data has been reported as written by
  178. the storage subsystem.
  179. Writeback caching will report data writes as completed as soon as the data is
  180. present in the host page cache. This is safe as long as you trust your host.
  181. If your host crashes or loses power, then the guest may experience data
  182. corruption.
  183. The host page cache can be avoided entirely with @option{cache=none}. This will
  184. attempt to do disk IO directly to the guests memory. QEMU may still perform
  185. an internal copy of the data.
  186. The host page cache can be avoided while only sending write notifications to
  187. the guest when the data has been reported as written by the storage subsystem
  188. using @option{cache=directsync}.
  189. Some block drivers perform badly with @option{cache=writethrough}, most notably,
  190. qcow2. If performance is more important than correctness,
  191. @option{cache=writeback} should be used with qcow2.
  192. In case you don't care about data integrity over host failures, use
  193. cache=unsafe. This option tells qemu that it never needs to write any data
  194. to the disk but can instead keeps things in cache. If anything goes wrong,
  195. like your host losing power, the disk storage getting disconnected accidently,
  196. etc. you're image will most probably be rendered unusable. When using
  197. the @option{-snapshot} option, unsafe caching is always used.
  198. Instead of @option{-cdrom} you can use:
  199. @example
  200. qemu -drive file=file,index=2,media=cdrom
  201. @end example
  202. Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you can
  203. use:
  204. @example
  205. qemu -drive file=file,index=0,media=disk
  206. qemu -drive file=file,index=1,media=disk
  207. qemu -drive file=file,index=2,media=disk
  208. qemu -drive file=file,index=3,media=disk
  209. @end example
  210. You can connect a CDROM to the slave of ide0:
  211. @example
  212. qemu -drive file=file,if=ide,index=1,media=cdrom
  213. @end example
  214. If you don't specify the "file=" argument, you define an empty drive:
  215. @example
  216. qemu -drive if=ide,index=1,media=cdrom
  217. @end example
  218. You can connect a SCSI disk with unit ID 6 on the bus #0:
  219. @example
  220. qemu -drive file=file,if=scsi,bus=0,unit=6
  221. @end example
  222. Instead of @option{-fda}, @option{-fdb}, you can use:
  223. @example
  224. qemu -drive file=file,index=0,if=floppy
  225. qemu -drive file=file,index=1,if=floppy
  226. @end example
  227. By default, @var{interface} is "ide" and @var{index} is automatically
  228. incremented:
  229. @example
  230. qemu -drive file=a -drive file=b"
  231. @end example
  232. is interpreted like:
  233. @example
  234. qemu -hda a -hdb b
  235. @end example
  236. ETEXI
  237. DEF("set", HAS_ARG, QEMU_OPTION_set,
  238. "-set group.id.arg=value\n"
  239. " set <arg> parameter for item <id> of type <group>\n"
  240. " i.e. -set drive.$id.file=/path/to/image\n", QEMU_ARCH_ALL)
  241. STEXI
  242. @item -set
  243. @findex -set
  244. TODO
  245. ETEXI
  246. DEF("global", HAS_ARG, QEMU_OPTION_global,
  247. "-global driver.property=value\n"
  248. " set a global default for a driver property\n",
  249. QEMU_ARCH_ALL)
  250. STEXI
  251. @item -global
  252. @findex -global
  253. TODO
  254. ETEXI
  255. DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
  256. "-mtdblock file use 'file' as on-board Flash memory image\n",
  257. QEMU_ARCH_ALL)
  258. STEXI
  259. @item -mtdblock @var{file}
  260. @findex -mtdblock
  261. Use @var{file} as on-board Flash memory image.
  262. ETEXI
  263. DEF("sd", HAS_ARG, QEMU_OPTION_sd,
  264. "-sd file use 'file' as SecureDigital card image\n", QEMU_ARCH_ALL)
  265. STEXI
  266. @item -sd @var{file}
  267. @findex -sd
  268. Use @var{file} as SecureDigital card image.
  269. ETEXI
  270. DEF("pflash", HAS_ARG, QEMU_OPTION_pflash,
  271. "-pflash file use 'file' as a parallel flash image\n", QEMU_ARCH_ALL)
  272. STEXI
  273. @item -pflash @var{file}
  274. @findex -pflash
  275. Use @var{file} as a parallel flash image.
  276. ETEXI
  277. DEF("boot", HAS_ARG, QEMU_OPTION_boot,
  278. "-boot [order=drives][,once=drives][,menu=on|off]\n"
  279. " [,splash=sp_name][,splash-time=sp_time]\n"
  280. " 'drives': floppy (a), hard disk (c), CD-ROM (d), network (n)\n"
  281. " 'sp_name': the file's name that would be passed to bios as logo picture, if menu=on\n"
  282. " 'sp_time': the period that splash picture last if menu=on, unit is ms\n",
  283. QEMU_ARCH_ALL)
  284. STEXI
  285. @item -boot [order=@var{drives}][,once=@var{drives}][,menu=on|off][,splash=@var{sp_name}][,splash-time=@var{sp_time}]
  286. @findex -boot
  287. Specify boot order @var{drives} as a string of drive letters. Valid
  288. drive letters depend on the target achitecture. The x86 PC uses: a, b
  289. (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot
  290. from network adapter 1-4), hard disk boot is the default. To apply a
  291. particular boot order only on the first startup, specify it via
  292. @option{once}.
  293. Interactive boot menus/prompts can be enabled via @option{menu=on} as far
  294. as firmware/BIOS supports them. The default is non-interactive boot.
  295. A splash picture could be passed to bios, enabling user to show it as logo,
  296. when option splash=@var{sp_name} is given and menu=on, If firmware/BIOS
  297. supports them. Currently Seabios for X86 system support it.
  298. limitation: The splash file could be a jpeg file or a BMP file in 24 BPP
  299. format(true color). The resolution should be supported by the SVGA mode, so
  300. the recommended is 320x240, 640x480, 800x640.
  301. @example
  302. # try to boot from network first, then from hard disk
  303. qemu -boot order=nc
  304. # boot from CD-ROM first, switch back to default order after reboot
  305. qemu -boot once=d
  306. # boot with a splash picture for 5 seconds.
  307. qemu -boot menu=on,splash=/root/boot.bmp,splash-time=5000
  308. @end example
  309. Note: The legacy format '-boot @var{drives}' is still supported but its
  310. use is discouraged as it may be removed from future versions.
  311. ETEXI
  312. DEF("snapshot", 0, QEMU_OPTION_snapshot,
  313. "-snapshot write to temporary files instead of disk image files\n",
  314. QEMU_ARCH_ALL)
  315. STEXI
  316. @item -snapshot
  317. @findex -snapshot
  318. Write to temporary files instead of disk image files. In this case,
  319. the raw disk image you use is not written back. You can however force
  320. the write back by pressing @key{C-a s} (@pxref{disk_images}).
  321. ETEXI
  322. DEF("m", HAS_ARG, QEMU_OPTION_m,
  323. "-m megs set virtual RAM size to megs MB [default="
  324. stringify(DEFAULT_RAM_SIZE) "]\n", QEMU_ARCH_ALL)
  325. STEXI
  326. @item -m @var{megs}
  327. @findex -m
  328. Set virtual RAM size to @var{megs} megabytes. Default is 128 MiB. Optionally,
  329. a suffix of ``M'' or ``G'' can be used to signify a value in megabytes or
  330. gigabytes respectively.
  331. ETEXI
  332. DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
  333. "-mem-path FILE provide backing storage for guest RAM\n", QEMU_ARCH_ALL)
  334. STEXI
  335. @item -mem-path @var{path}
  336. Allocate guest RAM from a temporarily created file in @var{path}.
  337. ETEXI
  338. #ifdef MAP_POPULATE
  339. DEF("mem-prealloc", 0, QEMU_OPTION_mem_prealloc,
  340. "-mem-prealloc preallocate guest memory (use with -mem-path)\n",
  341. QEMU_ARCH_ALL)
  342. STEXI
  343. @item -mem-prealloc
  344. Preallocate memory when using -mem-path.
  345. ETEXI
  346. #endif
  347. DEF("k", HAS_ARG, QEMU_OPTION_k,
  348. "-k language use keyboard layout (for example 'fr' for French)\n",
  349. QEMU_ARCH_ALL)
  350. STEXI
  351. @item -k @var{language}
  352. @findex -k
  353. Use keyboard layout @var{language} (for example @code{fr} for
  354. French). This option is only needed where it is not easy to get raw PC
  355. keycodes (e.g. on Macs, with some X11 servers or with a VNC
  356. display). You don't normally need to use it on PC/Linux or PC/Windows
  357. hosts.
  358. The available layouts are:
  359. @example
  360. ar de-ch es fo fr-ca hu ja mk no pt-br sv
  361. da en-gb et fr fr-ch is lt nl pl ru th
  362. de en-us fi fr-be hr it lv nl-be pt sl tr
  363. @end example
  364. The default is @code{en-us}.
  365. ETEXI
  366. DEF("audio-help", 0, QEMU_OPTION_audio_help,
  367. "-audio-help print list of audio drivers and their options\n",
  368. QEMU_ARCH_ALL)
  369. STEXI
  370. @item -audio-help
  371. @findex -audio-help
  372. Will show the audio subsystem help: list of drivers, tunable
  373. parameters.
  374. ETEXI
  375. DEF("soundhw", HAS_ARG, QEMU_OPTION_soundhw,
  376. "-soundhw c1,... enable audio support\n"
  377. " and only specified sound cards (comma separated list)\n"
  378. " use -soundhw ? to get the list of supported cards\n"
  379. " use -soundhw all to enable all of them\n", QEMU_ARCH_ALL)
  380. STEXI
  381. @item -soundhw @var{card1}[,@var{card2},...] or -soundhw all
  382. @findex -soundhw
  383. Enable audio and selected sound hardware. Use ? to print all
  384. available sound hardware.
  385. @example
  386. qemu -soundhw sb16,adlib disk.img
  387. qemu -soundhw es1370 disk.img
  388. qemu -soundhw ac97 disk.img
  389. qemu -soundhw hda disk.img
  390. qemu -soundhw all disk.img
  391. qemu -soundhw ?
  392. @end example
  393. Note that Linux's i810_audio OSS kernel (for AC97) module might
  394. require manually specifying clocking.
  395. @example
  396. modprobe i810_audio clocking=48000
  397. @end example
  398. ETEXI
  399. STEXI
  400. @end table
  401. ETEXI
  402. DEF("usb", 0, QEMU_OPTION_usb,
  403. "-usb enable the USB driver (will be the default soon)\n",
  404. QEMU_ARCH_ALL)
  405. STEXI
  406. USB options:
  407. @table @option
  408. @item -usb
  409. @findex -usb
  410. Enable the USB driver (will be the default soon)
  411. ETEXI
  412. DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
  413. "-usbdevice name add the host or guest USB device 'name'\n",
  414. QEMU_ARCH_ALL)
  415. STEXI
  416. @item -usbdevice @var{devname}
  417. @findex -usbdevice
  418. Add the USB device @var{devname}. @xref{usb_devices}.
  419. @table @option
  420. @item mouse
  421. Virtual Mouse. This will override the PS/2 mouse emulation when activated.
  422. @item tablet
  423. Pointer device that uses absolute coordinates (like a touchscreen). This
  424. means qemu is able to report the mouse position without having to grab the
  425. mouse. Also overrides the PS/2 mouse emulation when activated.
  426. @item disk:[format=@var{format}]:@var{file}
  427. Mass storage device based on file. The optional @var{format} argument
  428. will be used rather than detecting the format. Can be used to specifiy
  429. @code{format=raw} to avoid interpreting an untrusted format header.
  430. @item host:@var{bus}.@var{addr}
  431. Pass through the host device identified by @var{bus}.@var{addr} (Linux only).
  432. @item host:@var{vendor_id}:@var{product_id}
  433. Pass through the host device identified by @var{vendor_id}:@var{product_id}
  434. (Linux only).
  435. @item serial:[vendorid=@var{vendor_id}][,productid=@var{product_id}]:@var{dev}
  436. Serial converter to host character device @var{dev}, see @code{-serial} for the
  437. available devices.
  438. @item braille
  439. Braille device. This will use BrlAPI to display the braille output on a real
  440. or fake device.
  441. @item net:@var{options}
  442. Network adapter that supports CDC ethernet and RNDIS protocols.
  443. @end table
  444. ETEXI
  445. DEF("device", HAS_ARG, QEMU_OPTION_device,
  446. "-device driver[,prop[=value][,...]]\n"
  447. " add device (based on driver)\n"
  448. " prop=value,... sets driver properties\n"
  449. " use -device ? to print all possible drivers\n"
  450. " use -device driver,? to print all possible properties\n",
  451. QEMU_ARCH_ALL)
  452. STEXI
  453. @item -device @var{driver}[,@var{prop}[=@var{value}][,...]]
  454. @findex -device
  455. Add device @var{driver}. @var{prop}=@var{value} sets driver
  456. properties. Valid properties depend on the driver. To get help on
  457. possible drivers and properties, use @code{-device ?} and
  458. @code{-device @var{driver},?}.
  459. ETEXI
  460. DEFHEADING()
  461. DEFHEADING(File system options:)
  462. DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
  463. "-fsdev fsdriver,id=id,path=path,[security_model={mapped|passthrough|none}]\n"
  464. " [,writeout=immediate][,readonly]\n",
  465. QEMU_ARCH_ALL)
  466. STEXI
  467. @item -fsdev @var{fsdriver},id=@var{id},path=@var{path},[security_model=@var{security_model}][,writeout=@var{writeout}][,readonly]
  468. @findex -fsdev
  469. Define a new file system device. Valid options are:
  470. @table @option
  471. @item @var{fsdriver}
  472. This option specifies the fs driver backend to use.
  473. Currently "local" and "handle" file system drivers are supported.
  474. @item id=@var{id}
  475. Specifies identifier for this device
  476. @item path=@var{path}
  477. Specifies the export path for the file system device. Files under
  478. this path will be available to the 9p client on the guest.
  479. @item security_model=@var{security_model}
  480. Specifies the security model to be used for this export path.
  481. Supported security models are "passthrough", "mapped" and "none".
  482. In "passthrough" security model, files are stored using the same
  483. credentials as they are created on the guest. This requires qemu
  484. to run as root. In "mapped" security model, some of the file
  485. attributes like uid, gid, mode bits and link target are stored as
  486. file attributes. Directories exported by this security model cannot
  487. interact with other unix tools. "none" security model is same as
  488. passthrough except the sever won't report failures if it fails to
  489. set file attributes like ownership. Security model is mandatory
  490. only for local fsdriver. Other fsdrivers (like handle) don't take
  491. security model as a parameter.
  492. @item writeout=@var{writeout}
  493. This is an optional argument. The only supported value is "immediate".
  494. This means that host page cache will be used to read and write data but
  495. write notification will be sent to the guest only when the data has been
  496. reported as written by the storage subsystem.
  497. @item readonly
  498. Enables exporting 9p share as a readonly mount for guests. By default
  499. read-write access is given.
  500. @end table
  501. -fsdev option is used along with -device driver "virtio-9p-pci".
  502. @item -device virtio-9p-pci,fsdev=@var{id},mount_tag=@var{mount_tag}
  503. Options for virtio-9p-pci driver are:
  504. @table @option
  505. @item fsdev=@var{id}
  506. Specifies the id value specified along with -fsdev option
  507. @item mount_tag=@var{mount_tag}
  508. Specifies the tag name to be used by the guest to mount this export point
  509. @end table
  510. ETEXI
  511. DEFHEADING()
  512. DEFHEADING(Virtual File system pass-through options:)
  513. DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
  514. "-virtfs local,path=path,mount_tag=tag,security_model=[mapped|passthrough|none]\n"
  515. " [,writeout=immediate][,readonly]\n",
  516. QEMU_ARCH_ALL)
  517. STEXI
  518. @item -virtfs @var{fsdriver},path=@var{path},mount_tag=@var{mount_tag},security_model=@var{security_model}[,writeout=@var{writeout}][,readonly]
  519. @findex -virtfs
  520. The general form of a Virtual File system pass-through options are:
  521. @table @option
  522. @item @var{fsdriver}
  523. This option specifies the fs driver backend to use.
  524. Currently "local" and "handle" file system drivers are supported.
  525. @item id=@var{id}
  526. Specifies identifier for this device
  527. @item path=@var{path}
  528. Specifies the export path for the file system device. Files under
  529. this path will be available to the 9p client on the guest.
  530. @item security_model=@var{security_model}
  531. Specifies the security model to be used for this export path.
  532. Supported security models are "passthrough", "mapped" and "none".
  533. In "passthrough" security model, files are stored using the same
  534. credentials as they are created on the guest. This requires qemu
  535. to run as root. In "mapped" security model, some of the file
  536. attributes like uid, gid, mode bits and link target are stored as
  537. file attributes. Directories exported by this security model cannot
  538. interact with other unix tools. "none" security model is same as
  539. passthrough except the sever won't report failures if it fails to
  540. set file attributes like ownership. Security model is mandatory only
  541. for local fsdriver. Other fsdrivers (like handle) don't take security
  542. model as a parameter.
  543. @item writeout=@var{writeout}
  544. This is an optional argument. The only supported value is "immediate".
  545. This means that host page cache will be used to read and write data but
  546. write notification will be sent to the guest only when the data has been
  547. reported as written by the storage subsystem.
  548. @item readonly
  549. Enables exporting 9p share as a readonly mount for guests. By default
  550. read-write access is given.
  551. @end table
  552. ETEXI
  553. DEF("virtfs_synth", 0, QEMU_OPTION_virtfs_synth,
  554. "-virtfs_synth Create synthetic file system image\n",
  555. QEMU_ARCH_ALL)
  556. STEXI
  557. @item -virtfs_synth
  558. @findex -virtfs_synth
  559. Create synthetic file system image
  560. ETEXI
  561. DEFHEADING()
  562. DEF("name", HAS_ARG, QEMU_OPTION_name,
  563. "-name string1[,process=string2]\n"
  564. " set the name of the guest\n"
  565. " string1 sets the window title and string2 the process name (on Linux)\n",
  566. QEMU_ARCH_ALL)
  567. STEXI
  568. @item -name @var{name}
  569. @findex -name
  570. Sets the @var{name} of the guest.
  571. This name will be displayed in the SDL window caption.
  572. The @var{name} will also be used for the VNC server.
  573. Also optionally set the top visible process name in Linux.
  574. ETEXI
  575. DEF("uuid", HAS_ARG, QEMU_OPTION_uuid,
  576. "-uuid %08x-%04x-%04x-%04x-%012x\n"
  577. " specify machine UUID\n", QEMU_ARCH_ALL)
  578. STEXI
  579. @item -uuid @var{uuid}
  580. @findex -uuid
  581. Set system UUID.
  582. ETEXI
  583. STEXI
  584. @end table
  585. ETEXI
  586. DEFHEADING()
  587. DEFHEADING(Display options:)
  588. STEXI
  589. @table @option
  590. ETEXI
  591. DEF("display", HAS_ARG, QEMU_OPTION_display,
  592. "-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]\n"
  593. " [,window_close=on|off]|curses|none|\n"
  594. " vnc=<display>[,<optargs>]\n"
  595. " select display type\n", QEMU_ARCH_ALL)
  596. STEXI
  597. @item -display @var{type}
  598. @findex -display
  599. Select type of display to use. This option is a replacement for the
  600. old style -sdl/-curses/... options. Valid values for @var{type} are
  601. @table @option
  602. @item sdl
  603. Display video output via SDL (usually in a separate graphics
  604. window; see the SDL documentation for other possibilities).
  605. @item curses
  606. Display video output via curses. For graphics device models which
  607. support a text mode, QEMU can display this output using a
  608. curses/ncurses interface. Nothing is displayed when the graphics
  609. device is in graphical mode or if the graphics device does not support
  610. a text mode. Generally only the VGA device models support text mode.
  611. @item none
  612. Do not display video output. The guest will still see an emulated
  613. graphics card, but its output will not be displayed to the QEMU
  614. user. This option differs from the -nographic option in that it
  615. only affects what is done with video output; -nographic also changes
  616. the destination of the serial and parallel port data.
  617. @item vnc
  618. Start a VNC server on display <arg>
  619. @end table
  620. ETEXI
  621. DEF("nographic", 0, QEMU_OPTION_nographic,
  622. "-nographic disable graphical output and redirect serial I/Os to console\n",
  623. QEMU_ARCH_ALL)
  624. STEXI
  625. @item -nographic
  626. @findex -nographic
  627. Normally, QEMU uses SDL to display the VGA output. With this option,
  628. you can totally disable graphical output so that QEMU is a simple
  629. command line application. The emulated serial port is redirected on
  630. the console. Therefore, you can still use QEMU to debug a Linux kernel
  631. with a serial console.
  632. ETEXI
  633. DEF("curses", 0, QEMU_OPTION_curses,
  634. "-curses use a curses/ncurses interface instead of SDL\n",
  635. QEMU_ARCH_ALL)
  636. STEXI
  637. @item -curses
  638. @findex curses
  639. Normally, QEMU uses SDL to display the VGA output. With this option,
  640. QEMU can display the VGA output when in text mode using a
  641. curses/ncurses interface. Nothing is displayed in graphical mode.
  642. ETEXI
  643. DEF("no-frame", 0, QEMU_OPTION_no_frame,
  644. "-no-frame open SDL window without a frame and window decorations\n",
  645. QEMU_ARCH_ALL)
  646. STEXI
  647. @item -no-frame
  648. @findex -no-frame
  649. Do not use decorations for SDL windows and start them using the whole
  650. available screen space. This makes the using QEMU in a dedicated desktop
  651. workspace more convenient.
  652. ETEXI
  653. DEF("alt-grab", 0, QEMU_OPTION_alt_grab,
  654. "-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt)\n",
  655. QEMU_ARCH_ALL)
  656. STEXI
  657. @item -alt-grab
  658. @findex -alt-grab
  659. Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also
  660. affects the special keys (for fullscreen, monitor-mode switching, etc).
  661. ETEXI
  662. DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab,
  663. "-ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt)\n",
  664. QEMU_ARCH_ALL)
  665. STEXI
  666. @item -ctrl-grab
  667. @findex -ctrl-grab
  668. Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also
  669. affects the special keys (for fullscreen, monitor-mode switching, etc).
  670. ETEXI
  671. DEF("no-quit", 0, QEMU_OPTION_no_quit,
  672. "-no-quit disable SDL window close capability\n", QEMU_ARCH_ALL)
  673. STEXI
  674. @item -no-quit
  675. @findex -no-quit
  676. Disable SDL window close capability.
  677. ETEXI
  678. DEF("sdl", 0, QEMU_OPTION_sdl,
  679. "-sdl enable SDL\n", QEMU_ARCH_ALL)
  680. STEXI
  681. @item -sdl
  682. @findex -sdl
  683. Enable SDL.
  684. ETEXI
  685. DEF("spice", HAS_ARG, QEMU_OPTION_spice,
  686. "-spice <args> enable spice\n", QEMU_ARCH_ALL)
  687. STEXI
  688. @item -spice @var{option}[,@var{option}[,...]]
  689. @findex -spice
  690. Enable the spice remote desktop protocol. Valid options are
  691. @table @option
  692. @item port=<nr>
  693. Set the TCP port spice is listening on for plaintext channels.
  694. @item addr=<addr>
  695. Set the IP address spice is listening on. Default is any address.
  696. @item ipv4
  697. @item ipv6
  698. Force using the specified IP version.
  699. @item password=<secret>
  700. Set the password you need to authenticate.
  701. @item sasl
  702. Require that the client use SASL to authenticate with the spice.
  703. The exact choice of authentication method used is controlled from the
  704. system / user's SASL configuration file for the 'qemu' service. This
  705. is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
  706. unprivileged user, an environment variable SASL_CONF_PATH can be used
  707. to make it search alternate locations for the service config.
  708. While some SASL auth methods can also provide data encryption (eg GSSAPI),
  709. it is recommended that SASL always be combined with the 'tls' and
  710. 'x509' settings to enable use of SSL and server certificates. This
  711. ensures a data encryption preventing compromise of authentication
  712. credentials.
  713. @item disable-ticketing
  714. Allow client connects without authentication.
  715. @item disable-copy-paste
  716. Disable copy paste between the client and the guest.
  717. @item tls-port=<nr>
  718. Set the TCP port spice is listening on for encrypted channels.
  719. @item x509-dir=<dir>
  720. Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir
  721. @item x509-key-file=<file>
  722. @item x509-key-password=<file>
  723. @item x509-cert-file=<file>
  724. @item x509-cacert-file=<file>
  725. @item x509-dh-key-file=<file>
  726. The x509 file names can also be configured individually.
  727. @item tls-ciphers=<list>
  728. Specify which ciphers to use.
  729. @item tls-channel=[main|display|inputs|record|playback|tunnel]
  730. @item plaintext-channel=[main|display|inputs|record|playback|tunnel]
  731. Force specific channel to be used with or without TLS encryption. The
  732. options can be specified multiple times to configure multiple
  733. channels. The special name "default" can be used to set the default
  734. mode. For channels which are not explicitly forced into one mode the
  735. spice client is allowed to pick tls/plaintext as he pleases.
  736. @item image-compression=[auto_glz|auto_lz|quic|glz|lz|off]
  737. Configure image compression (lossless).
  738. Default is auto_glz.
  739. @item jpeg-wan-compression=[auto|never|always]
  740. @item zlib-glz-wan-compression=[auto|never|always]
  741. Configure wan image compression (lossy for slow links).
  742. Default is auto.
  743. @item streaming-video=[off|all|filter]
  744. Configure video stream detection. Default is filter.
  745. @item agent-mouse=[on|off]
  746. Enable/disable passing mouse events via vdagent. Default is on.
  747. @item playback-compression=[on|off]
  748. Enable/disable audio stream compression (using celt 0.5.1). Default is on.
  749. @end table
  750. ETEXI
  751. DEF("portrait", 0, QEMU_OPTION_portrait,
  752. "-portrait rotate graphical output 90 deg left (only PXA LCD)\n",
  753. QEMU_ARCH_ALL)
  754. STEXI
  755. @item -portrait
  756. @findex -portrait
  757. Rotate graphical output 90 deg left (only PXA LCD).
  758. ETEXI
  759. DEF("rotate", HAS_ARG, QEMU_OPTION_rotate,
  760. "-rotate <deg> rotate graphical output some deg left (only PXA LCD)\n",
  761. QEMU_ARCH_ALL)
  762. STEXI
  763. @item -rotate
  764. @findex -rotate
  765. Rotate graphical output some deg left (only PXA LCD).
  766. ETEXI
  767. DEF("vga", HAS_ARG, QEMU_OPTION_vga,
  768. "-vga [std|cirrus|vmware|qxl|xenfb|none]\n"
  769. " select video card type\n", QEMU_ARCH_ALL)
  770. STEXI
  771. @item -vga @var{type}
  772. @findex -vga
  773. Select type of VGA card to emulate. Valid values for @var{type} are
  774. @table @option
  775. @item cirrus
  776. Cirrus Logic GD5446 Video card. All Windows versions starting from
  777. Windows 95 should recognize and use this graphic card. For optimal
  778. performances, use 16 bit color depth in the guest and the host OS.
  779. (This one is the default)
  780. @item std
  781. Standard VGA card with Bochs VBE extensions. If your guest OS
  782. supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
  783. to use high resolution modes (>= 1280x1024x16) then you should use
  784. this option.
  785. @item vmware
  786. VMWare SVGA-II compatible adapter. Use it if you have sufficiently
  787. recent XFree86/XOrg server or Windows guest with a driver for this
  788. card.
  789. @item qxl
  790. QXL paravirtual graphic card. It is VGA compatible (including VESA
  791. 2.0 VBE support). Works best with qxl guest drivers installed though.
  792. Recommended choice when using the spice protocol.
  793. @item none
  794. Disable VGA card.
  795. @end table
  796. ETEXI
  797. DEF("full-screen", 0, QEMU_OPTION_full_screen,
  798. "-full-screen start in full screen\n", QEMU_ARCH_ALL)
  799. STEXI
  800. @item -full-screen
  801. @findex -full-screen
  802. Start in full screen.
  803. ETEXI
  804. DEF("g", 1, QEMU_OPTION_g ,
  805. "-g WxH[xDEPTH] Set the initial graphical resolution and depth\n",
  806. QEMU_ARCH_PPC | QEMU_ARCH_SPARC)
  807. STEXI
  808. @item -g @var{width}x@var{height}[x@var{depth}]
  809. @findex -g
  810. Set the initial graphical resolution and depth (PPC, SPARC only).
  811. ETEXI
  812. DEF("vnc", HAS_ARG, QEMU_OPTION_vnc ,
  813. "-vnc display start a VNC server on display\n", QEMU_ARCH_ALL)
  814. STEXI
  815. @item -vnc @var{display}[,@var{option}[,@var{option}[,...]]]
  816. @findex -vnc
  817. Normally, QEMU uses SDL to display the VGA output. With this option,
  818. you can have QEMU listen on VNC display @var{display} and redirect the VGA
  819. display over the VNC session. It is very useful to enable the usb
  820. tablet device when using this option (option @option{-usbdevice
  821. tablet}). When using the VNC display, you must use the @option{-k}
  822. parameter to set the keyboard layout if you are not using en-us. Valid
  823. syntax for the @var{display} is
  824. @table @option
  825. @item @var{host}:@var{d}
  826. TCP connections will only be allowed from @var{host} on display @var{d}.
  827. By convention the TCP port is 5900+@var{d}. Optionally, @var{host} can
  828. be omitted in which case the server will accept connections from any host.
  829. @item unix:@var{path}
  830. Connections will be allowed over UNIX domain sockets where @var{path} is the
  831. location of a unix socket to listen for connections on.
  832. @item none
  833. VNC is initialized but not started. The monitor @code{change} command
  834. can be used to later start the VNC server.
  835. @end table
  836. Following the @var{display} value there may be one or more @var{option} flags
  837. separated by commas. Valid options are
  838. @table @option
  839. @item reverse
  840. Connect to a listening VNC client via a ``reverse'' connection. The
  841. client is specified by the @var{display}. For reverse network
  842. connections (@var{host}:@var{d},@code{reverse}), the @var{d} argument
  843. is a TCP port number, not a display number.
  844. @item password
  845. Require that password based authentication is used for client connections.
  846. The password must be set separately using the @code{change} command in the
  847. @ref{pcsys_monitor}
  848. @item tls
  849. Require that client use TLS when communicating with the VNC server. This
  850. uses anonymous TLS credentials so is susceptible to a man-in-the-middle
  851. attack. It is recommended that this option be combined with either the
  852. @option{x509} or @option{x509verify} options.
  853. @item x509=@var{/path/to/certificate/dir}
  854. Valid if @option{tls} is specified. Require that x509 credentials are used
  855. for negotiating the TLS session. The server will send its x509 certificate
  856. to the client. It is recommended that a password be set on the VNC server
  857. to provide authentication of the client when this is used. The path following
  858. this option specifies where the x509 certificates are to be loaded from.
  859. See the @ref{vnc_security} section for details on generating certificates.
  860. @item x509verify=@var{/path/to/certificate/dir}
  861. Valid if @option{tls} is specified. Require that x509 credentials are used
  862. for negotiating the TLS session. The server will send its x509 certificate
  863. to the client, and request that the client send its own x509 certificate.
  864. The server will validate the client's certificate against the CA certificate,
  865. and reject clients when validation fails. If the certificate authority is
  866. trusted, this is a sufficient authentication mechanism. You may still wish
  867. to set a password on the VNC server as a second authentication layer. The
  868. path following this option specifies where the x509 certificates are to
  869. be loaded from. See the @ref{vnc_security} section for details on generating
  870. certificates.
  871. @item sasl
  872. Require that the client use SASL to authenticate with the VNC server.
  873. The exact choice of authentication method used is controlled from the
  874. system / user's SASL configuration file for the 'qemu' service. This
  875. is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
  876. unprivileged user, an environment variable SASL_CONF_PATH can be used
  877. to make it search alternate locations for the service config.
  878. While some SASL auth methods can also provide data encryption (eg GSSAPI),
  879. it is recommended that SASL always be combined with the 'tls' and
  880. 'x509' settings to enable use of SSL and server certificates. This
  881. ensures a data encryption preventing compromise of authentication
  882. credentials. See the @ref{vnc_security} section for details on using
  883. SASL authentication.
  884. @item acl
  885. Turn on access control lists for checking of the x509 client certificate
  886. and SASL party. For x509 certs, the ACL check is made against the
  887. certificate's distinguished name. This is something that looks like
  888. @code{C=GB,O=ACME,L=Boston,CN=bob}. For SASL party, the ACL check is
  889. made against the username, which depending on the SASL plugin, may
  890. include a realm component, eg @code{bob} or @code{bob@@EXAMPLE.COM}.
  891. When the @option{acl} flag is set, the initial access list will be
  892. empty, with a @code{deny} policy. Thus no one will be allowed to
  893. use the VNC server until the ACLs have been loaded. This can be
  894. achieved using the @code{acl} monitor command.
  895. @item lossy
  896. Enable lossy compression methods (gradient, JPEG, ...). If this
  897. option is set, VNC client may receive lossy framebuffer updates
  898. depending on its encoding settings. Enabling this option can save
  899. a lot of bandwidth at the expense of quality.
  900. @item non-adaptive
  901. Disable adaptive encodings. Adaptive encodings are enabled by default.
  902. An adaptive encoding will try to detect frequently updated screen regions,
  903. and send updates in these regions using a lossy encoding (like JPEG).
  904. This can be really helpful to save bandwidth when playing videos. Disabling
  905. adaptive encodings allows to restore the original static behavior of encodings
  906. like Tight.
  907. @end table
  908. ETEXI
  909. STEXI
  910. @end table
  911. ETEXI
  912. DEFHEADING()
  913. DEFHEADING(i386 target only:)
  914. STEXI
  915. @table @option
  916. ETEXI
  917. DEF("win2k-hack", 0, QEMU_OPTION_win2k_hack,
  918. "-win2k-hack use it when installing Windows 2000 to avoid a disk full bug\n",
  919. QEMU_ARCH_I386)
  920. STEXI
  921. @item -win2k-hack
  922. @findex -win2k-hack
  923. Use it when installing Windows 2000 to avoid a disk full bug. After
  924. Windows 2000 is installed, you no longer need this option (this option
  925. slows down the IDE transfers).
  926. ETEXI
  927. HXCOMM Deprecated by -rtc
  928. DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386)
  929. DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk,
  930. "-no-fd-bootchk disable boot signature checking for floppy disks\n",
  931. QEMU_ARCH_I386)
  932. STEXI
  933. @item -no-fd-bootchk
  934. @findex -no-fd-bootchk
  935. Disable boot signature checking for floppy disks in Bochs BIOS. It may
  936. be needed to boot from old floppy disks.
  937. TODO: check reference to Bochs BIOS.
  938. ETEXI
  939. DEF("no-acpi", 0, QEMU_OPTION_no_acpi,
  940. "-no-acpi disable ACPI\n", QEMU_ARCH_I386)
  941. STEXI
  942. @item -no-acpi
  943. @findex -no-acpi
  944. Disable ACPI (Advanced Configuration and Power Interface) support. Use
  945. it if your guest OS complains about ACPI problems (PC target machine
  946. only).
  947. ETEXI
  948. DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
  949. "-no-hpet disable HPET\n", QEMU_ARCH_I386)
  950. STEXI
  951. @item -no-hpet
  952. @findex -no-hpet
  953. Disable HPET support.
  954. ETEXI
  955. DEF("balloon", HAS_ARG, QEMU_OPTION_balloon,
  956. "-balloon none disable balloon device\n"
  957. "-balloon virtio[,addr=str]\n"
  958. " enable virtio balloon device (default)\n", QEMU_ARCH_ALL)
  959. STEXI
  960. @item -balloon none
  961. @findex -balloon
  962. Disable balloon device.
  963. @item -balloon virtio[,addr=@var{addr}]
  964. Enable virtio balloon device (default), optionally with PCI address
  965. @var{addr}.
  966. ETEXI
  967. DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
  968. "-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"
  969. " ACPI table description\n", QEMU_ARCH_I386)
  970. STEXI
  971. @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}]...]
  972. @findex -acpitable
  973. Add ACPI table with specified header fields and context from specified files.
  974. For file=, take whole ACPI table from the specified files, including all
  975. ACPI headers (possible overridden by other options).
  976. For data=, only data
  977. portion of the table is used, all header information is specified in the
  978. command line.
  979. ETEXI
  980. DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
  981. "-smbios file=binary\n"
  982. " load SMBIOS entry from binary file\n"
  983. "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]\n"
  984. " specify SMBIOS type 0 fields\n"
  985. "-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
  986. " [,uuid=uuid][,sku=str][,family=str]\n"
  987. " specify SMBIOS type 1 fields\n", QEMU_ARCH_I386)
  988. STEXI
  989. @item -smbios file=@var{binary}
  990. @findex -smbios
  991. Load SMBIOS entry from binary file.
  992. @item -smbios type=0[,vendor=@var{str}][,version=@var{str}][,date=@var{str}][,release=@var{%d.%d}]
  993. @findex -smbios
  994. Specify SMBIOS type 0 fields
  995. @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}]
  996. Specify SMBIOS type 1 fields
  997. ETEXI
  998. DEFHEADING()
  999. STEXI
  1000. @end table
  1001. ETEXI
  1002. DEFHEADING(Network options:)
  1003. STEXI
  1004. @table @option
  1005. ETEXI
  1006. HXCOMM Legacy slirp options (now moved to -net user):
  1007. #ifdef CONFIG_SLIRP
  1008. DEF("tftp", HAS_ARG, QEMU_OPTION_tftp, "", QEMU_ARCH_ALL)
  1009. DEF("bootp", HAS_ARG, QEMU_OPTION_bootp, "", QEMU_ARCH_ALL)
  1010. DEF("redir", HAS_ARG, QEMU_OPTION_redir, "", QEMU_ARCH_ALL)
  1011. #ifndef _WIN32
  1012. DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL)
  1013. #endif
  1014. #endif
  1015. DEF("net", HAS_ARG, QEMU_OPTION_net,
  1016. "-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n"
  1017. " create a new Network Interface Card and connect it to VLAN 'n'\n"
  1018. #ifdef CONFIG_SLIRP
  1019. "-net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=on|off]\n"
  1020. " [,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f]\n"
  1021. " [,hostfwd=rule][,guestfwd=rule]"
  1022. #ifndef _WIN32
  1023. "[,smb=dir[,smbserver=addr]]\n"
  1024. #endif
  1025. " connect the user mode network stack to VLAN 'n', configure its\n"
  1026. " DHCP server and enabled optional services\n"
  1027. #endif
  1028. #ifdef _WIN32
  1029. "-net tap[,vlan=n][,name=str],ifname=name\n"
  1030. " connect the host TAP network interface to VLAN 'n'\n"
  1031. #else
  1032. "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h][,vhostforce=on|off]\n"
  1033. " connect the host TAP network interface to VLAN 'n' and use the\n"
  1034. " network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n"
  1035. " and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n"
  1036. " use '[down]script=no' to disable script execution\n"
  1037. " use 'fd=h' to connect to an already opened TAP interface\n"
  1038. " use 'sndbuf=nbytes' to limit the size of the send buffer (the\n"
  1039. " default is disabled 'sndbuf=0' to enable flow control set 'sndbuf=1048576')\n"
  1040. " use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag\n"
  1041. " use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition\n"
  1042. " use vhost=on to enable experimental in kernel accelerator\n"
  1043. " (only has effect for virtio guests which use MSIX)\n"
  1044. " use vhostforce=on to force vhost on for non-MSIX virtio guests\n"
  1045. " use 'vhostfd=h' to connect to an already opened vhost net device\n"
  1046. #endif
  1047. "-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port]\n"
  1048. " connect the vlan 'n' to another VLAN using a socket connection\n"
  1049. "-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port[,localaddr=addr]]\n"
  1050. " connect the vlan 'n' to multicast maddr and port\n"
  1051. " use 'localaddr=addr' to specify the host address to send packets from\n"
  1052. #ifdef CONFIG_VDE
  1053. "-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n"
  1054. " connect the vlan 'n' to port 'n' of a vde switch running\n"
  1055. " on host and listening for incoming connections on 'socketpath'.\n"
  1056. " Use group 'groupname' and mode 'octalmode' to change default\n"
  1057. " ownership and permissions for communication port.\n"
  1058. #endif
  1059. "-net dump[,vlan=n][,file=f][,len=n]\n"
  1060. " dump traffic on vlan 'n' to file 'f' (max n bytes per packet)\n"
  1061. "-net none use it alone to have zero network devices. If no -net option\n"
  1062. " is provided, the default is '-net nic -net user'\n", QEMU_ARCH_ALL)
  1063. DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
  1064. "-netdev ["
  1065. #ifdef CONFIG_SLIRP
  1066. "user|"
  1067. #endif
  1068. "tap|"
  1069. #ifdef CONFIG_VDE
  1070. "vde|"
  1071. #endif
  1072. "socket],id=str[,option][,option][,...]\n", QEMU_ARCH_ALL)
  1073. STEXI
  1074. @item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}] [,name=@var{name}][,addr=@var{addr}][,vectors=@var{v}]
  1075. @findex -net
  1076. Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n}
  1077. = 0 is the default). The NIC is an e1000 by default on the PC
  1078. target. Optionally, the MAC address can be changed to @var{mac}, the
  1079. device address set to @var{addr} (PCI cards only),
  1080. and a @var{name} can be assigned for use in monitor commands.
  1081. Optionally, for PCI cards, you can specify the number @var{v} of MSI-X vectors
  1082. that the card should have; this option currently only affects virtio cards; set
  1083. @var{v} = 0 to disable MSI-X. If no @option{-net} option is specified, a single
  1084. NIC is created. Qemu can emulate several different models of network card.
  1085. Valid values for @var{type} are
  1086. @code{virtio}, @code{i82551}, @code{i82557b}, @code{i82559er},
  1087. @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
  1088. @code{e1000}, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
  1089. Not all devices are supported on all targets. Use -net nic,model=?
  1090. for a list of available devices for your target.
  1091. @item -net user[,@var{option}][,@var{option}][,...]
  1092. Use the user mode network stack which requires no administrator
  1093. privilege to run. Valid options are:
  1094. @table @option
  1095. @item vlan=@var{n}
  1096. Connect user mode stack to VLAN @var{n} (@var{n} = 0 is the default).
  1097. @item name=@var{name}
  1098. Assign symbolic name for use in monitor commands.
  1099. @item net=@var{addr}[/@var{mask}]
  1100. Set IP network address the guest will see. Optionally specify the netmask,
  1101. either in the form a.b.c.d or as number of valid top-most bits. Default is
  1102. 10.0.2.0/24.
  1103. @item host=@var{addr}
  1104. Specify the guest-visible address of the host. Default is the 2nd IP in the
  1105. guest network, i.e. x.x.x.2.
  1106. @item restrict=on|off
  1107. If this option is enabled, the guest will be isolated, i.e. it will not be
  1108. able to contact the host and no guest IP packets will be routed over the host
  1109. to the outside. This option does not affect any explicitly set forwarding rules.
  1110. @item hostname=@var{name}
  1111. Specifies the client hostname reported by the builtin DHCP server.
  1112. @item dhcpstart=@var{addr}
  1113. Specify the first of the 16 IPs the built-in DHCP server can assign. Default
  1114. is the 15th to 31st IP in the guest network, i.e. x.x.x.15 to x.x.x.31.
  1115. @item dns=@var{addr}
  1116. Specify the guest-visible address of the virtual nameserver. The address must
  1117. be different from the host address. Default is the 3rd IP in the guest network,
  1118. i.e. x.x.x.3.
  1119. @item tftp=@var{dir}
  1120. When using the user mode network stack, activate a built-in TFTP
  1121. server. The files in @var{dir} will be exposed as the root of a TFTP server.
  1122. The TFTP client on the guest must be configured in binary mode (use the command
  1123. @code{bin} of the Unix TFTP client).
  1124. @item bootfile=@var{file}
  1125. When using the user mode network stack, broadcast @var{file} as the BOOTP
  1126. filename. In conjunction with @option{tftp}, this can be used to network boot
  1127. a guest from a local directory.
  1128. Example (using pxelinux):
  1129. @example
  1130. qemu -hda linux.img -boot n -net user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
  1131. @end example
  1132. @item smb=@var{dir}[,smbserver=@var{addr}]
  1133. When using the user mode network stack, activate a built-in SMB
  1134. server so that Windows OSes can access to the host files in @file{@var{dir}}
  1135. transparently. The IP address of the SMB server can be set to @var{addr}. By
  1136. default the 4th IP in the guest network is used, i.e. x.x.x.4.
  1137. In the guest Windows OS, the line:
  1138. @example
  1139. 10.0.2.4 smbserver
  1140. @end example
  1141. must be added in the file @file{C:\WINDOWS\LMHOSTS} (for windows 9x/Me)
  1142. or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windows NT/2000).
  1143. Then @file{@var{dir}} can be accessed in @file{\\smbserver\qemu}.
  1144. Note that a SAMBA server must be installed on the host OS.
  1145. QEMU was tested successfully with smbd versions from Red Hat 9,
  1146. Fedora Core 3 and OpenSUSE 11.x.
  1147. @item hostfwd=[tcp|udp]:[@var{hostaddr}]:@var{hostport}-[@var{guestaddr}]:@var{guestport}
  1148. Redirect incoming TCP or UDP connections to the host port @var{hostport} to
  1149. the guest IP address @var{guestaddr} on guest port @var{guestport}. If
  1150. @var{guestaddr} is not specified, its value is x.x.x.15 (default first address
  1151. given by the built-in DHCP server). By specifying @var{hostaddr}, the rule can
  1152. be bound to a specific host interface. If no connection type is set, TCP is
  1153. used. This option can be given multiple times.
  1154. For example, to redirect host X11 connection from screen 1 to guest
  1155. screen 0, use the following:
  1156. @example
  1157. # on the host
  1158. qemu -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
  1159. # this host xterm should open in the guest X11 server
  1160. xterm -display :1
  1161. @end example
  1162. To redirect telnet connections from host port 5555 to telnet port on
  1163. the guest, use the following:
  1164. @example
  1165. # on the host
  1166. qemu -net user,hostfwd=tcp::5555-:23 [...]
  1167. telnet localhost 5555
  1168. @end example
  1169. Then when you use on the host @code{telnet localhost 5555}, you
  1170. connect to the guest telnet server.
  1171. @item guestfwd=[tcp]:@var{server}:@var{port}-@var{dev}
  1172. Forward guest TCP connections to the IP address @var{server} on port @var{port}
  1173. to the character device @var{dev}. This option can be given multiple times.
  1174. @end table
  1175. Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still
  1176. processed and applied to -net user. Mixing them with the new configuration
  1177. syntax gives undefined results. Their use for new applications is discouraged
  1178. as they will be removed from future versions.
  1179. @item -net tap[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,ifname=@var{name}] [,script=@var{file}][,downscript=@var{dfile}]
  1180. Connect the host TAP network interface @var{name} to VLAN @var{n}, use
  1181. the network script @var{file} to configure it and the network script
  1182. @var{dfile} to deconfigure it. If @var{name} is not provided, the OS
  1183. automatically provides one. @option{fd}=@var{h} can be used to specify
  1184. the handle of an already opened host TAP interface. The default network
  1185. configure script is @file{/etc/qemu-ifup} and the default network
  1186. deconfigure script is @file{/etc/qemu-ifdown}. Use @option{script=no}
  1187. or @option{downscript=no} to disable script execution. Example:
  1188. @example
  1189. qemu linux.img -net nic -net tap
  1190. @end example
  1191. More complicated example (two NICs, each one connected to a TAP device)
  1192. @example
  1193. qemu linux.img -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
  1194. -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
  1195. @end example
  1196. @item -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}] [,listen=[@var{host}]:@var{port}][,connect=@var{host}:@var{port}]
  1197. Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual
  1198. machine using a TCP socket connection. If @option{listen} is
  1199. specified, QEMU waits for incoming connections on @var{port}
  1200. (@var{host} is optional). @option{connect} is used to connect to
  1201. another QEMU instance using the @option{listen} option. @option{fd}=@var{h}
  1202. specifies an already opened TCP socket.
  1203. Example:
  1204. @example
  1205. # launch a first QEMU instance
  1206. qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
  1207. -net socket,listen=:1234
  1208. # connect the VLAN 0 of this instance to the VLAN 0
  1209. # of the first instance
  1210. qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
  1211. -net socket,connect=127.0.0.1:1234
  1212. @end example
  1213. @item -net socket[,vlan=@var{n}][,name=@var{name}][,fd=@var{h}][,mcast=@var{maddr}:@var{port}[,localaddr=@var{addr}]]
  1214. Create a VLAN @var{n} shared with another QEMU virtual
  1215. machines using a UDP multicast socket, effectively making a bus for
  1216. every QEMU with same multicast address @var{maddr} and @var{port}.
  1217. NOTES:
  1218. @enumerate
  1219. @item
  1220. Several QEMU can be running on different hosts and share same bus (assuming
  1221. correct multicast setup for these hosts).
  1222. @item
  1223. mcast support is compatible with User Mode Linux (argument @option{eth@var{N}=mcast}), see
  1224. @url{http://user-mode-linux.sf.net}.
  1225. @item
  1226. Use @option{fd=h} to specify an already opened UDP multicast socket.
  1227. @end enumerate
  1228. Example:
  1229. @example
  1230. # launch one QEMU instance
  1231. qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
  1232. -net socket,mcast=230.0.0.1:1234
  1233. # launch another QEMU instance on same "bus"
  1234. qemu linux.img -net nic,macaddr=52:54:00:12:34:57 \
  1235. -net socket,mcast=230.0.0.1:1234
  1236. # launch yet another QEMU instance on same "bus"
  1237. qemu linux.img -net nic,macaddr=52:54:00:12:34:58 \
  1238. -net socket,mcast=230.0.0.1:1234
  1239. @end example
  1240. Example (User Mode Linux compat.):
  1241. @example
  1242. # launch QEMU instance (note mcast address selected
  1243. # is UML's default)
  1244. qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
  1245. -net socket,mcast=239.192.168.1:1102
  1246. # launch UML
  1247. /path/to/linux ubd0=/path/to/root_fs eth0=mcast
  1248. @end example
  1249. Example (send packets from host's 1.2.3.4):
  1250. @example
  1251. qemu linux.img -net nic,macaddr=52:54:00:12:34:56 \
  1252. -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
  1253. @end example
  1254. @item -net vde[,vlan=@var{n}][,name=@var{name}][,sock=@var{socketpath}] [,port=@var{n}][,group=@var{groupname}][,mode=@var{octalmode}]
  1255. Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and
  1256. listening for incoming connections on @var{socketpath}. Use GROUP @var{groupname}
  1257. and MODE @var{octalmode} to change default ownership and permissions for
  1258. communication port. This option is only available if QEMU has been compiled
  1259. with vde support enabled.
  1260. Example:
  1261. @example
  1262. # launch vde switch
  1263. vde_switch -F -sock /tmp/myswitch
  1264. # launch QEMU instance
  1265. qemu linux.img -net nic -net vde,sock=/tmp/myswitch
  1266. @end example
  1267. @item -net dump[,vlan=@var{n}][,file=@var{file}][,len=@var{len}]
  1268. Dump network traffic on VLAN @var{n} to file @var{file} (@file{qemu-vlan0.pcap} by default).
  1269. At most @var{len} bytes (64k by default) per packet are stored. The file format is
  1270. libpcap, so it can be analyzed with tools such as tcpdump or Wireshark.
  1271. @item -net none
  1272. Indicate that no network devices should be configured. It is used to
  1273. override the default configuration (@option{-net nic -net user}) which
  1274. is activated if no @option{-net} options are provided.
  1275. @end table
  1276. ETEXI
  1277. DEFHEADING()
  1278. DEFHEADING(Character device options:)
  1279. DEF("chardev", HAS_ARG, QEMU_OPTION_chardev,
  1280. "-chardev null,id=id[,mux=on|off]\n"
  1281. "-chardev socket,id=id[,host=host],port=host[,to=to][,ipv4][,ipv6][,nodelay]\n"
  1282. " [,server][,nowait][,telnet][,mux=on|off] (tcp)\n"
  1283. "-chardev socket,id=id,path=path[,server][,nowait][,telnet],[mux=on|off] (unix)\n"
  1284. "-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n"
  1285. " [,localport=localport][,ipv4][,ipv6][,mux=on|off]\n"
  1286. "-chardev msmouse,id=id[,mux=on|off]\n"
  1287. "-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n"
  1288. " [,mux=on|off]\n"
  1289. "-chardev file,id=id,path=path[,mux=on|off]\n"
  1290. "-chardev pipe,id=id,path=path[,mux=on|off]\n"
  1291. #ifdef _WIN32
  1292. "-chardev console,id=id[,mux=on|off]\n"
  1293. "-chardev serial,id=id,path=path[,mux=on|off]\n"
  1294. #else
  1295. "-chardev pty,id=id[,mux=on|off]\n"
  1296. "-chardev stdio,id=id[,mux=on|off][,signal=on|off]\n"
  1297. #endif
  1298. #ifdef CONFIG_BRLAPI
  1299. "-chardev braille,id=id[,mux=on|off]\n"
  1300. #endif
  1301. #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
  1302. || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
  1303. "-chardev tty,id=id,path=path[,mux=on|off]\n"
  1304. #endif
  1305. #if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
  1306. "-chardev parport,id=id,path=path[,mux=on|off]\n"
  1307. #endif
  1308. #if defined(CONFIG_SPICE)
  1309. "-chardev spicevmc,id=id,name=name[,debug=debug]\n"
  1310. #endif
  1311. , QEMU_ARCH_ALL
  1312. )
  1313. STEXI
  1314. The general form of a character device option is:
  1315. @table @option
  1316. @item -chardev @var{backend} ,id=@var{id} [,mux=on|off] [,@var{options}]
  1317. @findex -chardev
  1318. Backend is one of:
  1319. @option{null},
  1320. @option{socket},
  1321. @option{udp},
  1322. @option{msmouse},
  1323. @option{vc},
  1324. @option{file},
  1325. @option{pipe},
  1326. @option{console},
  1327. @option{serial},
  1328. @option{pty},
  1329. @option{stdio},
  1330. @option{braille},
  1331. @option{tty},
  1332. @option{parport},
  1333. @option{spicevmc}.
  1334. The specific backend will determine the applicable options.
  1335. All devices must have an id, which can be any string up to 127 characters long.
  1336. It is used to uniquely identify this device in other command line directives.
  1337. A character device may be used in multiplexing mode by multiple front-ends.
  1338. The key sequence of @key{Control-a} and @key{c} will rotate the input focus
  1339. between attached front-ends. Specify @option{mux=on} to enable this mode.
  1340. Options to each backend are described below.
  1341. @item -chardev null ,id=@var{id}
  1342. A void device. This device will not emit any data, and will drop any data it
  1343. receives. The null backend does not take any options.
  1344. @item -chardev socket ,id=@var{id} [@var{TCP options} or @var{unix options}] [,server] [,nowait] [,telnet]
  1345. Create a two-way stream socket, which can be either a TCP or a unix socket. A
  1346. unix socket will be created if @option{path} is specified. Behaviour is
  1347. undefined if TCP options are specified for a unix socket.
  1348. @option{server} specifies that the socket shall be a listening socket.
  1349. @option{nowait} specifies that QEMU should not block waiting for a client to
  1350. connect to a listening socket.
  1351. @option{telnet} specifies that traffic on the socket should interpret telnet
  1352. escape sequences.
  1353. TCP and unix socket options are given below:
  1354. @table @option
  1355. @item TCP options: port=@var{port} [,host=@var{host}] [,to=@var{to}] [,ipv4] [,ipv6] [,nodelay]
  1356. @option{host} for a listening socket specifies the local address to be bound.
  1357. For a connecting socket species the remote host to connect to. @option{host} is
  1358. optional for listening sockets. If not specified it defaults to @code{0.0.0.0}.
  1359. @option{port} for a listening socket specifies the local port to be bound. For a
  1360. connecting socket specifies the port on the remote host to connect to.
  1361. @option{port} can be given as either a port number or a service name.
  1362. @option{port} is required.
  1363. @option{to} is only relevant to listening sockets. If it is specified, and
  1364. @option{port} cannot be bound, QEMU will attempt to bind to subsequent ports up
  1365. to and including @option{to} until it succeeds. @option{to} must be specified
  1366. as a port number.
  1367. @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must be used.
  1368. If neither is specified the socket may use either protocol.
  1369. @option{nodelay} disables the Nagle algorithm.
  1370. @item unix options: path=@var{path}
  1371. @option{path} specifies the local path of the unix socket. @option{path} is
  1372. required.
  1373. @end table
  1374. @item -chardev udp ,id=@var{id} [,host=@var{host}] ,port=@var{port} [,localaddr=@var{localaddr}] [,localport=@var{localport}] [,ipv4] [,ipv6]
  1375. Sends all traffic from the guest to a remote host over UDP.
  1376. @option{host} specifies the remote host to connect to. If not specified it
  1377. defaults to @code{localhost}.
  1378. @option{port} specifies the port on the remote host to connect to. @option{port}
  1379. is required.
  1380. @option{localaddr} specifies the local address to bind to. If not specified it
  1381. defaults to @code{0.0.0.0}.
  1382. @option{localport} specifies the local port to bind to. If not specified any
  1383. available local port will be used.
  1384. @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must be used.
  1385. If neither is specified the device may use either protocol.
  1386. @item -chardev msmouse ,id=@var{id}
  1387. Forward QEMU's emulated msmouse events to the guest. @option{msmouse} does not
  1388. take any options.
  1389. @item -chardev vc ,id=@var{id} [[,width=@var{width}] [,height=@var{height}]] [[,cols=@var{cols}] [,rows=@var{rows}]]
  1390. Connect to a QEMU text console. @option{vc} may optionally be given a specific
  1391. size.
  1392. @option{width} and @option{height} specify the width and height respectively of
  1393. the console, in pixels.
  1394. @option{cols} and @option{rows} specify that the console be sized to fit a text
  1395. console with the given dimensions.
  1396. @item -chardev file ,id=@var{id} ,path=@var{path}
  1397. Log all traffic received from the guest to a file.
  1398. @option{path} specifies the path of the file to be opened. This file will be
  1399. created if it does not already exist, and overwritten if it does. @option{path}
  1400. is required.
  1401. @item -chardev pipe ,id=@var{id} ,path=@var{path}
  1402. Create a two-way connection to the guest. The behaviour differs slightly between
  1403. Windows hosts and other hosts:
  1404. On Windows, a single duplex pipe will be created at
  1405. @file{\\.pipe\@option{path}}.
  1406. On other hosts, 2 pipes will be created called @file{@option{path}.in} and
  1407. @file{@option{path}.out}. Data written to @file{@option{path}.in} will be
  1408. received by the guest. Data written by the guest can be read from
  1409. @file{@option{path}.out}. QEMU will not create these fifos, and requires them to
  1410. be present.
  1411. @option{path} forms part of the pipe path as described above. @option{path} is
  1412. required.
  1413. @item -chardev console ,id=@var{id}
  1414. Send traffic from the guest to QEMU's standard output. @option{console} does not
  1415. take any options.
  1416. @option{console} is only available on Windows hosts.
  1417. @item -chardev serial ,id=@var{id} ,path=@option{path}
  1418. Send traffic from the guest to a serial device on the host.
  1419. @option{serial} is
  1420. only available on Windows hosts.
  1421. @option{path} specifies the name of the serial device to open.
  1422. @item -chardev pty ,id=@var{id}
  1423. Create a new pseudo-terminal on the host and connect to it. @option{pty} does
  1424. not take any options.
  1425. @option{pty} is not available on Windows hosts.
  1426. @item -chardev stdio ,id=@var{id} [,signal=on|off]
  1427. Connect to standard input and standard output of the qemu process.
  1428. @option{signal} controls if signals are enabled on the terminal, that includes
  1429. exiting QEMU with the key sequence @key{Control-c}. This option is enabled by
  1430. default, use @option{signal=off} to disable it.
  1431. @option{stdio} is not available on Windows hosts.
  1432. @item -chardev braille ,id=@var{id}
  1433. Connect to a local BrlAPI server. @option{braille} does not take any options.
  1434. @item -chardev tty ,id=@var{id} ,path=@var{path}
  1435. Connect to a local tty device.
  1436. @option{tty} is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
  1437. DragonFlyBSD hosts.
  1438. @option{path} specifies the path to the tty. @option{path} is required.
  1439. @item -chardev parport ,id=@var{id} ,path=@var{path}
  1440. @option{parport} is only available on Linux, FreeBSD and DragonFlyBSD hosts.
  1441. Connect to a local parallel port.
  1442. @option{path} specifies the path to the parallel port device. @option{path} is
  1443. required.
  1444. @item -chardev spicevmc ,id=@var{id} ,debug=@var{debug}, name=@var{name}
  1445. @option{spicevmc} is only available when spice support is built in.
  1446. @option{debug} debug level for spicevmc
  1447. @option{name} name of spice channel to connect to
  1448. Connect to a spice virtual machine channel, such as vdiport.
  1449. @end table
  1450. ETEXI
  1451. DEFHEADING()
  1452. STEXI
  1453. DEFHEADING(Device URL Syntax:)
  1454. In addition to using normal file images for the emulated storage devices,
  1455. QEMU can also use networked resources such as iSCSI devices. These are
  1456. specified using a special URL syntax.
  1457. @table @option
  1458. @item iSCSI
  1459. iSCSI support allows QEMU to access iSCSI resources directly and use as
  1460. images for the guest storage. Both disk and cdrom images are supported.
  1461. Syntax for specifying iSCSI LUNs is
  1462. ``iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>''
  1463. Example (without authentication):
  1464. @example
  1465. qemu -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \
  1466. --drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
  1467. @end example
  1468. Example (CHAP username/password via URL):
  1469. @example
  1470. qemu --drive file=iscsi://user%password@@192.0.2.1/iqn.2001-04.com.example/1
  1471. @end example
  1472. Example (CHAP username/password via environment variables):
  1473. @example
  1474. LIBISCSI_CHAP_USERNAME="user" \
  1475. LIBISCSI_CHAP_PASSWORD="password" \
  1476. qemu --drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
  1477. @end example
  1478. iSCSI support is an optional feature of QEMU and only available when
  1479. compiled and linked against libiscsi.
  1480. @item NBD
  1481. QEMU supports NBD (Network Block Devices) both using TCP protocol as well
  1482. as Unix Domain Sockets.
  1483. Syntax for specifying a NBD device using TCP
  1484. ``nbd:<server-ip>:<port>[:exportname=<export>]''
  1485. Syntax for specifying a NBD device using Unix Domain Sockets
  1486. ``nbd:unix:<domain-socket>[:exportname=<export>]''
  1487. Example for TCP
  1488. @example
  1489. qemu --drive file=nbd:192.0.2.1:30000
  1490. @end example
  1491. Example for Unix Domain Sockets
  1492. @example
  1493. qemu --drive file=nbd:unix:/tmp/nbd-socket
  1494. @end example
  1495. @item Sheepdog
  1496. Sheepdog is a distributed storage system for QEMU.
  1497. QEMU supports using either local sheepdog devices or remote networked
  1498. devices.
  1499. Syntax for specifying a sheepdog device
  1500. @table @list
  1501. ``sheepdog:<vdiname>''
  1502. ``sheepdog:<vdiname>:<snapid>''
  1503. ``sheepdog:<vdiname>:<tag>''
  1504. ``sheepdog:<host>:<port>:<vdiname>''
  1505. ``sheepdog:<host>:<port>:<vdiname>:<snapid>''
  1506. ``sheepdog:<host>:<port>:<vdiname>:<tag>''
  1507. @end table
  1508. Example
  1509. @example
  1510. qemu --drive file=sheepdog:192.0.2.1:30000:MyVirtualMachine
  1511. @end example
  1512. See also @url{http://http://www.osrg.net/sheepdog/}.
  1513. @end table
  1514. ETEXI
  1515. DEFHEADING(Bluetooth(R) options:)
  1516. DEF("bt", HAS_ARG, QEMU_OPTION_bt, \
  1517. "-bt hci,null dumb bluetooth HCI - doesn't respond to commands\n" \
  1518. "-bt hci,host[:id]\n" \
  1519. " use host's HCI with the given name\n" \
  1520. "-bt hci[,vlan=n]\n" \
  1521. " emulate a standard HCI in virtual scatternet 'n'\n" \
  1522. "-bt vhci[,vlan=n]\n" \
  1523. " add host computer to virtual scatternet 'n' using VHCI\n" \
  1524. "-bt device:dev[,vlan=n]\n" \
  1525. " emulate a bluetooth device 'dev' in scatternet 'n'\n",
  1526. QEMU_ARCH_ALL)
  1527. STEXI
  1528. @table @option
  1529. @item -bt hci[...]
  1530. @findex -bt
  1531. Defines the function of the corresponding Bluetooth HCI. -bt options
  1532. are matched with the HCIs present in the chosen machine type. For
  1533. example when emulating a machine with only one HCI built into it, only
  1534. the first @code{-bt hci[...]} option is valid and defines the HCI's
  1535. logic. The Transport Layer is decided by the machine type. Currently
  1536. the machines @code{n800} and @code{n810} have one HCI and all other
  1537. machines have none.
  1538. @anchor{bt-hcis}
  1539. The following three types are recognized:
  1540. @table @option
  1541. @item -bt hci,null
  1542. (default) The corresponding Bluetooth HCI assumes no internal logic
  1543. and will not respond to any HCI commands or emit events.
  1544. @item -bt hci,host[:@var{id}]
  1545. (@code{bluez} only) The corresponding HCI passes commands / events
  1546. to / from the physical HCI identified by the name @var{id} (default:
  1547. @code{hci0}) on the computer running QEMU. Only available on @code{bluez}
  1548. capable systems like Linux.
  1549. @item -bt hci[,vlan=@var{n}]
  1550. Add a virtual, standard HCI that will participate in the Bluetooth
  1551. scatternet @var{n} (default @code{0}). Similarly to @option{-net}
  1552. VLANs, devices inside a bluetooth network @var{n} can only communicate
  1553. with other devices in the same network (scatternet).
  1554. @end table
  1555. @item -bt vhci[,vlan=@var{n}]
  1556. (Linux-host only) Create a HCI in scatternet @var{n} (default 0) attached
  1557. to the host bluetooth stack instead of to the emulated target. This
  1558. allows the host and target machines to participate in a common scatternet
  1559. and communicate. Requires the Linux @code{vhci} driver installed. Can
  1560. be used as following:
  1561. @example
  1562. qemu [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
  1563. @end example
  1564. @item -bt device:@var{dev}[,vlan=@var{n}]
  1565. Emulate a bluetooth device @var{dev} and place it in network @var{n}
  1566. (default @code{0}). QEMU can only emulate one type of bluetooth devices
  1567. currently:
  1568. @table @option
  1569. @item keyboard
  1570. Virtual wireless keyboard implementing the HIDP bluetooth profile.
  1571. @end table
  1572. @end table
  1573. ETEXI
  1574. DEFHEADING()
  1575. DEFHEADING(Linux/Multiboot boot specific:)
  1576. STEXI
  1577. When using these options, you can use a given Linux or Multiboot
  1578. kernel without installing it in the disk image. It can be useful
  1579. for easier testing of various kernels.
  1580. @table @option
  1581. ETEXI
  1582. DEF("kernel", HAS_ARG, QEMU_OPTION_kernel, \
  1583. "-kernel bzImage use 'bzImage' as kernel image\n", QEMU_ARCH_ALL)
  1584. STEXI
  1585. @item -kernel @var{bzImage}
  1586. @findex -kernel
  1587. Use @var{bzImage} as kernel image. The kernel can be either a Linux kernel
  1588. or in multiboot format.
  1589. ETEXI
  1590. DEF("append", HAS_ARG, QEMU_OPTION_append, \
  1591. "-append cmdline use 'cmdline' as kernel command line\n", QEMU_ARCH_ALL)
  1592. STEXI
  1593. @item -append @var{cmdline}
  1594. @findex -append
  1595. Use @var{cmdline} as kernel command line
  1596. ETEXI
  1597. DEF("initrd", HAS_ARG, QEMU_OPTION_initrd, \
  1598. "-initrd file use 'file' as initial ram disk\n", QEMU_ARCH_ALL)
  1599. STEXI
  1600. @item -initrd @var{file}
  1601. @findex -initrd
  1602. Use @var{file} as initial ram disk.
  1603. @item -initrd "@var{file1} arg=foo,@var{file2}"
  1604. This syntax is only available with multiboot.
  1605. Use @var{file1} and @var{file2} as modules and pass arg=foo as parameter to the
  1606. first module.
  1607. ETEXI
  1608. STEXI
  1609. @end table
  1610. ETEXI
  1611. DEFHEADING()
  1612. DEFHEADING(Debug/Expert options:)
  1613. STEXI
  1614. @table @option
  1615. ETEXI
  1616. DEF("serial", HAS_ARG, QEMU_OPTION_serial, \
  1617. "-serial dev redirect the serial port to char device 'dev'\n",
  1618. QEMU_ARCH_ALL)
  1619. STEXI
  1620. @item -serial @var{dev}
  1621. @findex -serial
  1622. Redirect the virtual serial port to host character device
  1623. @var{dev}. The default device is @code{vc} in graphical mode and
  1624. @code{stdio} in non graphical mode.
  1625. This option can be used several times to simulate up to 4 serial
  1626. ports.
  1627. Use @code{-serial none} to disable all serial ports.
  1628. Available character devices are:
  1629. @table @option
  1630. @item vc[:@var{W}x@var{H}]
  1631. Virtual console. Optionally, a width and height can be given in pixel with
  1632. @example
  1633. vc:800x600
  1634. @end example
  1635. It is also possible to specify width or height in characters:
  1636. @example
  1637. vc:80Cx24C
  1638. @end example
  1639. @item pty
  1640. [Linux only] Pseudo TTY (a new PTY is automatically allocated)
  1641. @item none
  1642. No device is allocated.
  1643. @item null
  1644. void device
  1645. @item /dev/XXX
  1646. [Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
  1647. parameters are set according to the emulated ones.
  1648. @item /dev/parport@var{N}
  1649. [Linux only, parallel port only] Use host parallel port
  1650. @var{N}. Currently SPP and EPP parallel port features can be used.
  1651. @item file:@var{filename}
  1652. Write output to @var{filename}. No character can be read.
  1653. @item stdio
  1654. [Unix only] standard input/output
  1655. @item pipe:@var{filename}
  1656. name pipe @var{filename}
  1657. @item COM@var{n}
  1658. [Windows only] Use host serial port @var{n}
  1659. @item udp:[@var{remote_host}]:@var{remote_port}[@@[@var{src_ip}]:@var{src_port}]
  1660. This implements UDP Net Console.
  1661. When @var{remote_host} or @var{src_ip} are not specified
  1662. they default to @code{0.0.0.0}.
  1663. When not using a specified @var{src_port} a random port is automatically chosen.
  1664. If you just want a simple readonly console you can use @code{netcat} or
  1665. @code{nc}, by starting qemu with: @code{-serial udp::4555} and nc as:
  1666. @code{nc -u -l -p 4555}. Any time qemu writes something to that port it
  1667. will appear in the netconsole session.
  1668. If you plan to send characters back via netconsole or you want to stop
  1669. and start qemu a lot of times, you should have qemu use the same
  1670. source port each time by using something like @code{-serial
  1671. udp::4555@@:4556} to qemu. Another approach is to use a patched
  1672. version of netcat which can listen to a TCP port and send and receive
  1673. characters via udp. If you have a patched version of netcat which
  1674. activates telnet remote echo and single char transfer, then you can
  1675. use the following options to step up a netcat redirector to allow
  1676. telnet on port 5555 to access the qemu port.
  1677. @table @code
  1678. @item Qemu Options:
  1679. -serial udp::4555@@:4556
  1680. @item netcat options:
  1681. -u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
  1682. @item telnet options:
  1683. localhost 5555
  1684. @end table
  1685. @item tcp:[@var{host}]:@var{port}[,@var{server}][,nowait][,nodelay]
  1686. The TCP Net Console has two modes of operation. It can send the serial
  1687. I/O to a location or wait for a connection from a location. By default
  1688. the TCP Net Console is sent to @var{host} at the @var{port}. If you use
  1689. the @var{server} option QEMU will wait for a client socket application
  1690. to connect to the port before continuing, unless the @code{nowait}
  1691. option was specified. The @code{nodelay} option disables the Nagle buffering
  1692. algorithm. If @var{host} is omitted, 0.0.0.0 is assumed. Only
  1693. one TCP connection at a time is accepted. You can use @code{telnet} to
  1694. connect to the corresponding character device.
  1695. @table @code
  1696. @item Example to send tcp console to 192.168.0.2 port 4444
  1697. -serial tcp:192.168.0.2:4444
  1698. @item Example to listen and wait on port 4444 for connection
  1699. -serial tcp::4444,server
  1700. @item Example to not wait and listen on ip 192.168.0.100 port 4444
  1701. -serial tcp:192.168.0.100:4444,server,nowait
  1702. @end table
  1703. @item telnet:@var{host}:@var{port}[,server][,nowait][,nodelay]
  1704. The telnet protocol is used instead of raw tcp sockets. The options
  1705. work the same as if you had specified @code{-serial tcp}. The
  1706. difference is that the port acts like a telnet server or client using
  1707. telnet option negotiation. This will also allow you to send the
  1708. MAGIC_SYSRQ sequence if you use a telnet that supports sending the break
  1709. sequence. Typically in unix telnet you do it with Control-] and then
  1710. type "send break" followed by pressing the enter key.
  1711. @item unix:@var{path}[,server][,nowait]
  1712. A unix domain socket is used instead of a tcp socket. The option works the
  1713. same as if you had specified @code{-serial tcp} except the unix domain socket
  1714. @var{path} is used for connections.
  1715. @item mon:@var{dev_string}
  1716. This is a special option to allow the monitor to be multiplexed onto
  1717. another serial port. The monitor is accessed with key sequence of
  1718. @key{Control-a} and then pressing @key{c}. See monitor access
  1719. @ref{pcsys_keys} in the -nographic section for more keys.
  1720. @var{dev_string} should be any one of the serial devices specified
  1721. above. An example to multiplex the monitor onto a telnet server
  1722. listening on port 4444 would be:
  1723. @table @code
  1724. @item -serial mon:telnet::4444,server,nowait
  1725. @end table
  1726. @item braille
  1727. Braille device. This will use BrlAPI to display the braille output on a real
  1728. or fake device.
  1729. @item msmouse
  1730. Three button serial mouse. Configure the guest to use Microsoft protocol.
  1731. @end table
  1732. ETEXI
  1733. DEF("parallel", HAS_ARG, QEMU_OPTION_parallel, \
  1734. "-parallel dev redirect the parallel port to char device 'dev'\n",
  1735. QEMU_ARCH_ALL)
  1736. STEXI
  1737. @item -parallel @var{dev}
  1738. @findex -parallel
  1739. Redirect the virtual parallel port to host device @var{dev} (same
  1740. devices as the serial port). On Linux hosts, @file{/dev/parportN} can
  1741. be used to use hardware devices connected on the corresponding host
  1742. parallel port.
  1743. This option can be used several times to simulate up to 3 parallel
  1744. ports.
  1745. Use @code{-parallel none} to disable all parallel ports.
  1746. ETEXI
  1747. DEF("monitor", HAS_ARG, QEMU_OPTION_monitor, \
  1748. "-monitor dev redirect the monitor to char device 'dev'\n",
  1749. QEMU_ARCH_ALL)
  1750. STEXI
  1751. @item -monitor @var{dev}
  1752. @findex -monitor
  1753. Redirect the monitor to host device @var{dev} (same devices as the
  1754. serial port).
  1755. The default device is @code{vc} in graphical mode and @code{stdio} in
  1756. non graphical mode.
  1757. ETEXI
  1758. DEF("qmp", HAS_ARG, QEMU_OPTION_qmp, \
  1759. "-qmp dev like -monitor but opens in 'control' mode\n",
  1760. QEMU_ARCH_ALL)
  1761. STEXI
  1762. @item -qmp @var{dev}
  1763. @findex -qmp
  1764. Like -monitor but opens in 'control' mode.
  1765. ETEXI
  1766. DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
  1767. "-mon chardev=[name][,mode=readline|control][,default]\n", QEMU_ARCH_ALL)
  1768. STEXI
  1769. @item -mon chardev=[name][,mode=readline|control][,default]
  1770. @findex -mon
  1771. Setup monitor on chardev @var{name}.
  1772. ETEXI
  1773. DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \
  1774. "-debugcon dev redirect the debug console to char device 'dev'\n",
  1775. QEMU_ARCH_ALL)
  1776. STEXI
  1777. @item -debugcon @var{dev}
  1778. @findex -debugcon
  1779. Redirect the debug console to host device @var{dev} (same devices as the
  1780. serial port). The debug console is an I/O port which is typically port
  1781. 0xe9; writing to that I/O port sends output to this device.
  1782. The default device is @code{vc} in graphical mode and @code{stdio} in
  1783. non graphical mode.
  1784. ETEXI
  1785. DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \
  1786. "-pidfile file write PID to 'file'\n", QEMU_ARCH_ALL)
  1787. STEXI
  1788. @item -pidfile @var{file}
  1789. @findex -pidfile
  1790. Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
  1791. from a script.
  1792. ETEXI
  1793. DEF("singlestep", 0, QEMU_OPTION_singlestep, \
  1794. "-singlestep always run in singlestep mode\n", QEMU_ARCH_ALL)
  1795. STEXI
  1796. @item -singlestep
  1797. @findex -singlestep
  1798. Run the emulation in single step mode.
  1799. ETEXI
  1800. DEF("S", 0, QEMU_OPTION_S, \
  1801. "-S freeze CPU at startup (use 'c' to start execution)\n",
  1802. QEMU_ARCH_ALL)
  1803. STEXI
  1804. @item -S
  1805. @findex -S
  1806. Do not start CPU at startup (you must type 'c' in the monitor).
  1807. ETEXI
  1808. DEF("gdb", HAS_ARG, QEMU_OPTION_gdb, \
  1809. "-gdb dev wait for gdb connection on 'dev'\n", QEMU_ARCH_ALL)
  1810. STEXI
  1811. @item -gdb @var{dev}
  1812. @findex -gdb
  1813. Wait for gdb connection on device @var{dev} (@pxref{gdb_usage}). Typical
  1814. connections will likely be TCP-based, but also UDP, pseudo TTY, or even
  1815. stdio are reasonable use case. The latter is allowing to start qemu from
  1816. within gdb and establish the connection via a pipe:
  1817. @example
  1818. (gdb) target remote | exec qemu -gdb stdio ...
  1819. @end example
  1820. ETEXI
  1821. DEF("s", 0, QEMU_OPTION_s, \
  1822. "-s shorthand for -gdb tcp::" DEFAULT_GDBSTUB_PORT "\n",
  1823. QEMU_ARCH_ALL)
  1824. STEXI
  1825. @item -s
  1826. @findex -s
  1827. Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
  1828. (@pxref{gdb_usage}).
  1829. ETEXI
  1830. DEF("d", HAS_ARG, QEMU_OPTION_d, \
  1831. "-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items)\n",
  1832. QEMU_ARCH_ALL)
  1833. STEXI
  1834. @item -d
  1835. @findex -d
  1836. Output log in /tmp/qemu.log
  1837. ETEXI
  1838. DEF("D", HAS_ARG, QEMU_OPTION_D, \
  1839. "-D logfile output log to logfile (instead of the default /tmp/qemu.log)\n",
  1840. QEMU_ARCH_ALL)
  1841. STEXI
  1842. @item -D
  1843. @findex -D
  1844. Output log in logfile instead of /tmp/qemu.log
  1845. ETEXI
  1846. DEF("hdachs", HAS_ARG, QEMU_OPTION_hdachs, \
  1847. "-hdachs c,h,s[,t]\n" \
  1848. " force hard disk 0 physical geometry and the optional BIOS\n" \
  1849. " translation (t=none or lba) (usually qemu can guess them)\n",
  1850. QEMU_ARCH_ALL)
  1851. STEXI
  1852. @item -hdachs @var{c},@var{h},@var{s},[,@var{t}]
  1853. @findex -hdachs
  1854. Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=
  1855. @var{h} <= 16, 1 <= @var{s} <= 63) and optionally force the BIOS
  1856. translation mode (@var{t}=none, lba or auto). Usually QEMU can guess
  1857. all those parameters. This option is useful for old MS-DOS disk
  1858. images.
  1859. ETEXI
  1860. DEF("L", HAS_ARG, QEMU_OPTION_L, \
  1861. "-L path set the directory for the BIOS, VGA BIOS and keymaps\n",
  1862. QEMU_ARCH_ALL)
  1863. STEXI
  1864. @item -L @var{path}
  1865. @findex -L
  1866. Set the directory for the BIOS, VGA BIOS and keymaps.
  1867. ETEXI
  1868. DEF("bios", HAS_ARG, QEMU_OPTION_bios, \
  1869. "-bios file set the filename for the BIOS\n", QEMU_ARCH_ALL)
  1870. STEXI
  1871. @item -bios @var{file}
  1872. @findex -bios
  1873. Set the filename for the BIOS.
  1874. ETEXI
  1875. DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \
  1876. "-enable-kvm enable KVM full virtualization support\n", QEMU_ARCH_ALL)
  1877. STEXI
  1878. @item -enable-kvm
  1879. @findex -enable-kvm
  1880. Enable KVM full virtualization support. This option is only available
  1881. if KVM support is enabled when compiling.
  1882. ETEXI
  1883. DEF("xen-domid", HAS_ARG, QEMU_OPTION_xen_domid,
  1884. "-xen-domid id specify xen guest domain id\n", QEMU_ARCH_ALL)
  1885. DEF("xen-create", 0, QEMU_OPTION_xen_create,
  1886. "-xen-create create domain using xen hypercalls, bypassing xend\n"
  1887. " warning: should not be used when xend is in use\n",
  1888. QEMU_ARCH_ALL)
  1889. DEF("xen-attach", 0, QEMU_OPTION_xen_attach,
  1890. "-xen-attach attach to existing xen domain\n"
  1891. " xend will use this when starting qemu\n",
  1892. QEMU_ARCH_ALL)
  1893. STEXI
  1894. @item -xen-domid @var{id}
  1895. @findex -xen-domid
  1896. Specify xen guest domain @var{id} (XEN only).
  1897. @item -xen-create
  1898. @findex -xen-create
  1899. Create domain using xen hypercalls, bypassing xend.
  1900. Warning: should not be used when xend is in use (XEN only).
  1901. @item -xen-attach
  1902. @findex -xen-attach
  1903. Attach to existing xen domain.
  1904. xend will use this when starting qemu (XEN only).
  1905. ETEXI
  1906. DEF("no-reboot", 0, QEMU_OPTION_no_reboot, \
  1907. "-no-reboot exit instead of rebooting\n", QEMU_ARCH_ALL)
  1908. STEXI
  1909. @item -no-reboot
  1910. @findex -no-reboot
  1911. Exit instead of rebooting.
  1912. ETEXI
  1913. DEF("no-shutdown", 0, QEMU_OPTION_no_shutdown, \
  1914. "-no-shutdown stop before shutdown\n", QEMU_ARCH_ALL)
  1915. STEXI
  1916. @item -no-shutdown
  1917. @findex -no-shutdown
  1918. Don't exit QEMU on guest shutdown, but instead only stop the emulation.
  1919. This allows for instance switching to monitor to commit changes to the
  1920. disk image.
  1921. ETEXI
  1922. DEF("loadvm", HAS_ARG, QEMU_OPTION_loadvm, \
  1923. "-loadvm [tag|id]\n" \
  1924. " start right away with a saved state (loadvm in monitor)\n",
  1925. QEMU_ARCH_ALL)
  1926. STEXI
  1927. @item -loadvm @var{file}
  1928. @findex -loadvm
  1929. Start right away with a saved state (@code{loadvm} in monitor)
  1930. ETEXI
  1931. #ifndef _WIN32
  1932. DEF("daemonize", 0, QEMU_OPTION_daemonize, \
  1933. "-daemonize daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
  1934. #endif
  1935. STEXI
  1936. @item -daemonize
  1937. @findex -daemonize
  1938. Daemonize the QEMU process after initialization. QEMU will not detach from
  1939. standard IO until it is ready to receive connections on any of its devices.
  1940. This option is a useful way for external programs to launch QEMU without having
  1941. to cope with initialization race conditions.
  1942. ETEXI
  1943. DEF("option-rom", HAS_ARG, QEMU_OPTION_option_rom, \
  1944. "-option-rom rom load a file, rom, into the option ROM space\n",
  1945. QEMU_ARCH_ALL)
  1946. STEXI
  1947. @item -option-rom @var{file}
  1948. @findex -option-rom
  1949. Load the contents of @var{file} as an option ROM.
  1950. This option is useful to load things like EtherBoot.
  1951. ETEXI
  1952. DEF("clock", HAS_ARG, QEMU_OPTION_clock, \
  1953. "-clock force the use of the given methods for timer alarm.\n" \
  1954. " To see what timers are available use -clock ?\n",
  1955. QEMU_ARCH_ALL)
  1956. STEXI
  1957. @item -clock @var{method}
  1958. @findex -clock
  1959. Force the use of the given methods for timer alarm. To see what timers
  1960. are available use -clock ?.
  1961. ETEXI
  1962. HXCOMM Options deprecated by -rtc
  1963. DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL)
  1964. DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL)
  1965. DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
  1966. "-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew]\n" \
  1967. " set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n",
  1968. QEMU_ARCH_ALL)
  1969. STEXI
  1970. @item -rtc [base=utc|localtime|@var{date}][,clock=host|vm][,driftfix=none|slew]
  1971. @findex -rtc
  1972. Specify @option{base} as @code{utc} or @code{localtime} to let the RTC start at the current
  1973. UTC or local time, respectively. @code{localtime} is required for correct date in
  1974. MS-DOS or Windows. To start at a specific point in time, provide @var{date} in the
  1975. format @code{2006-06-17T16:01:21} or @code{2006-06-17}. The default base is UTC.
  1976. By default the RTC is driven by the host system time. This allows to use the
  1977. RTC as accurate reference clock inside the guest, specifically if the host
  1978. time is smoothly following an accurate external reference clock, e.g. via NTP.
  1979. If you want to isolate the guest time from the host, even prevent it from
  1980. progressing during suspension, you can set @option{clock} to @code{vm} instead.
  1981. Enable @option{driftfix} (i386 targets only) if you experience time drift problems,
  1982. specifically with Windows' ACPI HAL. This option will try to figure out how
  1983. many timer interrupts were not processed by the Windows guest and will
  1984. re-inject them.
  1985. ETEXI
  1986. DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
  1987. "-icount [N|auto]\n" \
  1988. " enable virtual instruction counter with 2^N clock ticks per\n" \
  1989. " instruction\n", QEMU_ARCH_ALL)
  1990. STEXI
  1991. @item -icount [@var{N}|auto]
  1992. @findex -icount
  1993. Enable virtual instruction counter. The virtual cpu will execute one
  1994. instruction every 2^@var{N} ns of virtual time. If @code{auto} is specified
  1995. then the virtual cpu speed will be automatically adjusted to keep virtual
  1996. time within a few seconds of real time.
  1997. Note that while this option can give deterministic behavior, it does not
  1998. provide cycle accurate emulation. Modern CPUs contain superscalar out of
  1999. order cores with complex cache hierarchies. The number of instructions
  2000. executed often has little or no correlation with actual performance.
  2001. ETEXI
  2002. DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \
  2003. "-watchdog i6300esb|ib700\n" \
  2004. " enable virtual hardware watchdog [default=none]\n",
  2005. QEMU_ARCH_ALL)
  2006. STEXI
  2007. @item -watchdog @var{model}
  2008. @findex -watchdog
  2009. Create a virtual hardware watchdog device. Once enabled (by a guest
  2010. action), the watchdog must be periodically polled by an agent inside
  2011. the guest or else the guest will be restarted.
  2012. The @var{model} is the model of hardware watchdog to emulate. Choices
  2013. for model are: @code{ib700} (iBASE 700) which is a very simple ISA
  2014. watchdog with a single timer, or @code{i6300esb} (Intel 6300ESB I/O
  2015. controller hub) which is a much more featureful PCI-based dual-timer
  2016. watchdog. Choose a model for which your guest has drivers.
  2017. Use @code{-watchdog ?} to list available hardware models. Only one
  2018. watchdog can be enabled for a guest.
  2019. ETEXI
  2020. DEF("watchdog-action", HAS_ARG, QEMU_OPTION_watchdog_action, \
  2021. "-watchdog-action reset|shutdown|poweroff|pause|debug|none\n" \
  2022. " action when watchdog fires [default=reset]\n",
  2023. QEMU_ARCH_ALL)
  2024. STEXI
  2025. @item -watchdog-action @var{action}
  2026. The @var{action} controls what QEMU will do when the watchdog timer
  2027. expires.
  2028. The default is
  2029. @code{reset} (forcefully reset the guest).
  2030. Other possible actions are:
  2031. @code{shutdown} (attempt to gracefully shutdown the guest),
  2032. @code{poweroff} (forcefully poweroff the guest),
  2033. @code{pause} (pause the guest),
  2034. @code{debug} (print a debug message and continue), or
  2035. @code{none} (do nothing).
  2036. Note that the @code{shutdown} action requires that the guest responds
  2037. to ACPI signals, which it may not be able to do in the sort of
  2038. situations where the watchdog would have expired, and thus
  2039. @code{-watchdog-action shutdown} is not recommended for production use.
  2040. Examples:
  2041. @table @code
  2042. @item -watchdog i6300esb -watchdog-action pause
  2043. @item -watchdog ib700
  2044. @end table
  2045. ETEXI
  2046. DEF("echr", HAS_ARG, QEMU_OPTION_echr, \
  2047. "-echr chr set terminal escape character instead of ctrl-a\n",
  2048. QEMU_ARCH_ALL)
  2049. STEXI
  2050. @item -echr @var{numeric_ascii_value}
  2051. @findex -echr
  2052. Change the escape character used for switching to the monitor when using
  2053. monitor and serial sharing. The default is @code{0x01} when using the
  2054. @code{-nographic} option. @code{0x01} is equal to pressing
  2055. @code{Control-a}. You can select a different character from the ascii
  2056. control keys where 1 through 26 map to Control-a through Control-z. For
  2057. instance you could use the either of the following to change the escape
  2058. character to Control-t.
  2059. @table @code
  2060. @item -echr 0x14
  2061. @item -echr 20
  2062. @end table
  2063. ETEXI
  2064. DEF("virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon, \
  2065. "-virtioconsole c\n" \
  2066. " set virtio console\n", QEMU_ARCH_ALL)
  2067. STEXI
  2068. @item -virtioconsole @var{c}
  2069. @findex -virtioconsole
  2070. Set virtio console.
  2071. This option is maintained for backward compatibility.
  2072. Please use @code{-device virtconsole} for the new way of invocation.
  2073. ETEXI
  2074. DEF("show-cursor", 0, QEMU_OPTION_show_cursor, \
  2075. "-show-cursor show cursor\n", QEMU_ARCH_ALL)
  2076. STEXI
  2077. @item -show-cursor
  2078. @findex -show-cursor
  2079. Show cursor.
  2080. ETEXI
  2081. DEF("tb-size", HAS_ARG, QEMU_OPTION_tb_size, \
  2082. "-tb-size n set TB size\n", QEMU_ARCH_ALL)
  2083. STEXI
  2084. @item -tb-size @var{n}
  2085. @findex -tb-size
  2086. Set TB size.
  2087. ETEXI
  2088. DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
  2089. "-incoming p prepare for incoming migration, listen on port p\n",
  2090. QEMU_ARCH_ALL)
  2091. STEXI
  2092. @item -incoming @var{port}
  2093. @findex -incoming
  2094. Prepare for incoming migration, listen on @var{port}.
  2095. ETEXI
  2096. DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
  2097. "-nodefaults don't create default devices\n", QEMU_ARCH_ALL)
  2098. STEXI
  2099. @item -nodefaults
  2100. @findex -nodefaults
  2101. Don't create default devices.
  2102. ETEXI
  2103. #ifndef _WIN32
  2104. DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
  2105. "-chroot dir chroot to dir just before starting the VM\n",
  2106. QEMU_ARCH_ALL)
  2107. #endif
  2108. STEXI
  2109. @item -chroot @var{dir}
  2110. @findex -chroot
  2111. Immediately before starting guest execution, chroot to the specified
  2112. directory. Especially useful in combination with -runas.
  2113. ETEXI
  2114. #ifndef _WIN32
  2115. DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
  2116. "-runas user change to user id user just before starting the VM\n",
  2117. QEMU_ARCH_ALL)
  2118. #endif
  2119. STEXI
  2120. @item -runas @var{user}
  2121. @findex -runas
  2122. Immediately before starting guest execution, drop root privileges, switching
  2123. to the specified user.
  2124. ETEXI
  2125. DEF("prom-env", HAS_ARG, QEMU_OPTION_prom_env,
  2126. "-prom-env variable=value\n"
  2127. " set OpenBIOS nvram variables\n",
  2128. QEMU_ARCH_PPC | QEMU_ARCH_SPARC)
  2129. STEXI
  2130. @item -prom-env @var{variable}=@var{value}
  2131. @findex -prom-env
  2132. Set OpenBIOS nvram @var{variable} to given @var{value} (PPC, SPARC only).
  2133. ETEXI
  2134. DEF("semihosting", 0, QEMU_OPTION_semihosting,
  2135. "-semihosting semihosting mode\n", QEMU_ARCH_ARM | QEMU_ARCH_M68K | QEMU_ARCH_XTENSA)
  2136. STEXI
  2137. @item -semihosting
  2138. @findex -semihosting
  2139. Semihosting mode (ARM, M68K, Xtensa only).
  2140. ETEXI
  2141. DEF("old-param", 0, QEMU_OPTION_old_param,
  2142. "-old-param old param mode\n", QEMU_ARCH_ARM)
  2143. STEXI
  2144. @item -old-param
  2145. @findex -old-param (ARM)
  2146. Old param mode (ARM only).
  2147. ETEXI
  2148. DEF("readconfig", HAS_ARG, QEMU_OPTION_readconfig,
  2149. "-readconfig <file>\n", QEMU_ARCH_ALL)
  2150. STEXI
  2151. @item -readconfig @var{file}
  2152. @findex -readconfig
  2153. Read device configuration from @var{file}.
  2154. ETEXI
  2155. DEF("writeconfig", HAS_ARG, QEMU_OPTION_writeconfig,
  2156. "-writeconfig <file>\n"
  2157. " read/write config file\n", QEMU_ARCH_ALL)
  2158. STEXI
  2159. @item -writeconfig @var{file}
  2160. @findex -writeconfig
  2161. Write device configuration to @var{file}.
  2162. ETEXI
  2163. DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig,
  2164. "-nodefconfig\n"
  2165. " do not load default config files at startup\n",
  2166. QEMU_ARCH_ALL)
  2167. STEXI
  2168. @item -nodefconfig
  2169. @findex -nodefconfig
  2170. Normally QEMU loads a configuration file from @var{sysconfdir}/qemu.conf and
  2171. @var{sysconfdir}/target-@var{ARCH}.conf on startup. The @code{-nodefconfig}
  2172. option will prevent QEMU from loading these configuration files at startup.
  2173. ETEXI
  2174. DEF("trace", HAS_ARG, QEMU_OPTION_trace,
  2175. "-trace [events=<file>][,file=<file>]\n"
  2176. " specify tracing options\n",
  2177. QEMU_ARCH_ALL)
  2178. STEXI
  2179. HXCOMM This line is not accurate, as some sub-options are backend-specific but
  2180. HXCOMM HX does not support conditional compilation of text.
  2181. @item -trace [events=@var{file}][,file=@var{file}]
  2182. @findex -trace
  2183. Specify tracing options.
  2184. @table @option
  2185. @item events=@var{file}
  2186. Immediately enable events listed in @var{file}.
  2187. The file must contain one event name (as listed in the @var{trace-events} file)
  2188. per line.
  2189. This option is only available if QEMU has been compiled with
  2190. either @var{simple} or @var{stderr} tracing backend.
  2191. @item file=@var{file}
  2192. Log output traces to @var{file}.
  2193. This option is only available if QEMU has been compiled with
  2194. the @var{simple} tracing backend.
  2195. @end table
  2196. ETEXI
  2197. HXCOMM This is the last statement. Insert new options before this line!
  2198. STEXI
  2199. @end table
  2200. ETEXI