qemu-options.hx 102 KB

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