dev-manual-qemu.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='dev-manual-qemu'>
  5. <title>Using the Quick EMUlator (QEMU)</title>
  6. <para>
  7. The Yocto Project uses an implementation of the Quick EMUlator (QEMU)
  8. Open Source project as part of the Yocto Project development "tool
  9. set".
  10. This chapter provides both procedures that show you how to use the
  11. Quick EMUlator (QEMU) and other QEMU information helpful for
  12. development purposes.
  13. </para>
  14. <section id='qemu-dev-overview'>
  15. <title>Overview</title>
  16. <para>
  17. Within the context of the Yocto Project, QEMU is an
  18. emulator and virtualization machine that allows you to run a
  19. complete image you have built using the Yocto Project as just
  20. another task on your build system.
  21. QEMU is useful for running and testing images and applications on
  22. supported Yocto Project architectures without having actual
  23. hardware.
  24. Among other things, the Yocto Project uses QEMU to run automated
  25. Quality Assurance (QA) tests on final images shipped with each
  26. release.
  27. <note>
  28. This implementation is not the same as QEMU in general.
  29. </note>
  30. This section provides a brief reference for the Yocto Project
  31. implementation of QEMU.
  32. </para>
  33. <para>
  34. For official information and documentation on QEMU in general, see
  35. the following references:
  36. <itemizedlist>
  37. <listitem><para>
  38. <emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
  39. The official website for the QEMU Open Source project.
  40. </para></listitem>
  41. <listitem><para>
  42. <emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
  43. The QEMU user manual.
  44. </para></listitem>
  45. </itemizedlist>
  46. </para>
  47. </section>
  48. <section id='qemu-running-qemu'>
  49. <title>Running QEMU</title>
  50. <para>
  51. To use QEMU, you need to have QEMU installed and initialized as
  52. well as have the proper artifacts (i.e. image files and root
  53. filesystems) available.
  54. Follow these general steps to run QEMU:
  55. <orderedlist>
  56. <listitem><para>
  57. <emphasis>Install QEMU:</emphasis>
  58. QEMU is made available with the Yocto Project a number of
  59. ways.
  60. One method is to install a Software Development Kit (SDK).
  61. See
  62. "<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
  63. section in the Yocto Project Application Development and
  64. the Extensible Software Development Kit (eSDK) manual
  65. for information on how to install QEMU.
  66. </para></listitem>
  67. <listitem><para>
  68. <emphasis>Setting Up the Environment:</emphasis>
  69. How you set up the QEMU environment depends on how you
  70. installed QEMU:
  71. <itemizedlist>
  72. <listitem><para>
  73. If you cloned the <filename>poky</filename>
  74. repository or you downloaded and unpacked a
  75. Yocto Project release tarball, you can source
  76. the build environment script (i.e.
  77. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>):
  78. <literallayout class='monospaced'>
  79. $ cd ~/poky
  80. $ source oe-init-build-env
  81. </literallayout>
  82. </para></listitem>
  83. <listitem><para>
  84. If you installed a cross-toolchain, you can
  85. run the script that initializes the toolchain.
  86. For example, the following commands run the
  87. initialization script from the default
  88. <filename>poky_sdk</filename> directory:
  89. <literallayout class='monospaced'>
  90. . ~/poky_sdk/environment-setup-core2-64-poky-linux
  91. </literallayout>
  92. </para></listitem>
  93. </itemizedlist>
  94. </para></listitem>
  95. <listitem><para>
  96. <emphasis>Ensure the Artifacts are in Place:</emphasis>
  97. You need to be sure you have a pre-built kernel that
  98. will boot in QEMU.
  99. You also need the target root filesystem for your target
  100. machine’s architecture:
  101. <itemizedlist>
  102. <listitem><para>
  103. If you have previously built an image for QEMU
  104. (e.g. <filename>qemux86</filename>,
  105. <filename>qemuarm</filename>, and so forth),
  106. then the artifacts are in place in your
  107. <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
  108. </para></listitem>
  109. <listitem><para>
  110. If you have not built an image, you can go to the
  111. <ulink url='&YOCTO_MACHINES_DL_URL;'>machines/qemu</ulink>
  112. area and download a pre-built image that matches
  113. your architecture and can be run on QEMU.
  114. </para></listitem>
  115. </itemizedlist></para>
  116. <para>See the
  117. "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
  118. section in the Yocto Project Application Development and
  119. the Extensible Software Development Kit (eSDK) manual
  120. for information on how to extract a root filesystem.
  121. </para></listitem>
  122. <listitem><para>
  123. <emphasis>Run QEMU:</emphasis>
  124. The basic <filename>runqemu</filename> command syntax is as
  125. follows:
  126. <literallayout class='monospaced'>
  127. $ runqemu [<replaceable>option</replaceable> ] [...]
  128. </literallayout>
  129. Based on what you provide on the command line,
  130. <filename>runqemu</filename> does a good job of figuring
  131. out what you are trying to do.
  132. For example, by default, QEMU looks for the most recently
  133. built image according to the timestamp when it needs to
  134. look for an image.
  135. Minimally, through the use of options, you must provide
  136. either a machine name, a virtual machine image
  137. (<filename>*wic.vmdk</filename>), or a kernel image
  138. (<filename>*.bin</filename>).</para>
  139. <para>Here are some additional examples to help illustrate
  140. further QEMU:
  141. <itemizedlist>
  142. <listitem><para>
  143. This example starts QEMU with
  144. <replaceable>MACHINE</replaceable> set to "qemux86".
  145. Assuming a standard
  146. <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
  147. <filename>runqemu</filename> automatically finds the
  148. <filename>bzImage-qemux86.bin</filename> image file and
  149. the
  150. <filename>core-image-minimal-qemux86-20140707074611.rootfs.ext3</filename>
  151. (assuming the current build created a
  152. <filename>core-image-minimal</filename> image).
  153. <note>
  154. When more than one image with the same name exists, QEMU finds
  155. and uses the most recently built image according to the
  156. timestamp.
  157. </note>
  158. <literallayout class='monospaced'>
  159. $ runqemu qemux86
  160. </literallayout>
  161. </para></listitem>
  162. <listitem><para>
  163. This example produces the exact same results as the
  164. previous example.
  165. This command, however, specifically provides the image
  166. and root filesystem type.
  167. <literallayout class='monospaced'>
  168. $ runqemu qemux86 core-image-minimal ext3
  169. </literallayout>
  170. </para></listitem>
  171. <listitem><para>
  172. This example specifies to boot an initial RAM disk image
  173. and to enable audio in QEMU.
  174. For this case, <filename>runqemu</filename> set the
  175. internal variable <filename>FSTYPE</filename> to
  176. "cpio.gz".
  177. Also, for audio to be enabled, an appropriate driver must
  178. be installed (see the previous description for the
  179. <filename>audio</filename> option for more information).
  180. <literallayout class='monospaced'>
  181. $ runqemu qemux86 ramfs audio
  182. </literallayout>
  183. </para></listitem>
  184. <listitem><para>
  185. This example does not provide enough information for
  186. QEMU to launch.
  187. While the command does provide a root filesystem type, it
  188. must also minimally provide a
  189. <replaceable>MACHINE</replaceable>,
  190. <replaceable>KERNEL</replaceable>, or
  191. <replaceable>VM</replaceable> option.
  192. <literallayout class='monospaced'>
  193. $ runqemu ext3
  194. </literallayout>
  195. </para></listitem>
  196. <listitem><para>
  197. This example specifies to boot a virtual machine
  198. image (<filename>.wic.vmdk</filename> file).
  199. From the <filename>.wic.vmdk</filename>,
  200. <filename>runqemu</filename> determines the QEMU
  201. architecture (<replaceable>MACHINE</replaceable>) to be
  202. "qemux86" and the root filesystem type to be "vmdk".
  203. <literallayout class='monospaced'>
  204. $ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86.wic.vmdk
  205. </literallayout>
  206. </para></listitem>
  207. </itemizedlist>
  208. </para></listitem>
  209. </orderedlist>
  210. </para>
  211. </section>
  212. <section id='switching-between-consoles'>
  213. <title>Switching Between Consoles</title>
  214. <para>
  215. When booting or running QEMU, you can switch between
  216. supported consoles by using
  217. Ctrl+Alt+<replaceable>number</replaceable>.
  218. For example, Ctrl+Alt+3 switches you to the serial console
  219. as long as that console is enabled.
  220. Being able to switch consoles is helpful, for example, if
  221. the main QEMU console breaks for some reason.
  222. <note>
  223. Usually, "2" gets you to the main console and "3"
  224. gets you to the serial console.
  225. </note>
  226. </para>
  227. </section>
  228. <section id='removing-the-splash-screen'>
  229. <title>Removing the Splash Screen</title>
  230. <para>
  231. You can remove the splash screen when QEMU is booting by
  232. using Alt+left.
  233. Removing the splash screen allows you to see what is
  234. happening in the background.
  235. </para>
  236. </section>
  237. <section id='disabling-the-cursor-grab'>
  238. <title>Disabling the Cursor Grab</title>
  239. <para>
  240. The default QEMU integration captures the cursor within the
  241. main window.
  242. It does this since standard mouse devices only provide
  243. relative input and not absolute coordinates.
  244. You then have to break out of the grab using the "Ctrl+Alt"
  245. key combination.
  246. However, the Yocto Project's integration of QEMU enables
  247. the wacom USB touch pad driver by default to allow input
  248. of absolute coordinates.
  249. This default means that the mouse can enter and leave the
  250. main window without the grab taking effect leading to a
  251. better user experience.
  252. </para>
  253. </section>
  254. <section id='qemu-running-under-a-network-file-system-nfs-server'>
  255. <title>Running Under a Network File System (NFS) Server</title>
  256. <para>
  257. One method for running QEMU is to run it on an NFS server.
  258. This is useful when you need to access the same file system
  259. from both the build and the emulated system at the same time.
  260. It is also worth noting that the system does not need root
  261. privileges to run.
  262. It uses a user space NFS server to avoid that.
  263. Follow these steps to set up for running QEMU using an NFS
  264. server.
  265. <orderedlist>
  266. <listitem><para>
  267. <emphasis>Extract a Root Filesystem:</emphasis>
  268. Once you are able to run QEMU in your environment, you can
  269. use the <filename>runqemu-extract-sdk</filename> script,
  270. which is located in the <filename>scripts</filename>
  271. directory along with the <filename>runqemu</filename>
  272. script.</para>
  273. <para>The <filename>runqemu-extract-sdk</filename> takes a
  274. root filesystem tarball and extracts it into a location
  275. that you specify.
  276. Here is an example that takes a file system and
  277. extracts it to a directory named
  278. <filename>test-nfs</filename>:
  279. <literallayout class='monospaced'>
  280. runqemu-extract-sdk ./tmp/deploy/images/qemux86/core-image-sato-qemux86.tar.bz2 test-nfs
  281. </literallayout>
  282. </para></listitem>
  283. <listitem><para>
  284. <emphasis>Start QEMU:</emphasis>
  285. Once you have extracted the file system, you can run
  286. <filename>runqemu</filename> normally with the additional
  287. location of the file system.
  288. You can then also make changes to the files within
  289. <filename>./test-nfs</filename> and see those changes
  290. appear in the image in real time.
  291. Here is an example using the <filename>qemux86</filename>
  292. image:
  293. <literallayout class='monospaced'>
  294. runqemu qemux86 ./test-nfs
  295. </literallayout>
  296. </para></listitem>
  297. </orderedlist>
  298. <note>
  299. <para>
  300. Should you need to start, stop, or restart the NFS share,
  301. you can use the following commands:
  302. <itemizedlist>
  303. <listitem><para>
  304. The following command starts the NFS share:
  305. <literallayout class='monospaced'>
  306. runqemu-export-rootfs start <replaceable>file-system-location</replaceable>
  307. </literallayout>
  308. </para></listitem>
  309. <listitem><para>
  310. The following command stops the NFS share:
  311. <literallayout class='monospaced'>
  312. runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
  313. </literallayout>
  314. </para></listitem>
  315. <listitem><para>
  316. The following command restarts the NFS share:
  317. <literallayout class='monospaced'>
  318. runqemu-export-rootfs restart <replaceable>file-system-location</replaceable>
  319. </literallayout>
  320. </para></listitem>
  321. </itemizedlist>
  322. </para>
  323. </note>
  324. </para>
  325. </section>
  326. <section id='qemu-kvm-cpu-compatibility'>
  327. <title>QEMU CPU Compatibility Under KVM</title>
  328. <para>
  329. By default, the QEMU build compiles for and targets 64-bit and x86
  330. <trademark class='registered'>Intel</trademark> <trademark class='trademark'>Core</trademark>2
  331. Duo processors and 32-bit x86
  332. <trademark class='registered'>Intel</trademark> <trademark class='registered'>Pentium</trademark>
  333. II processors.
  334. QEMU builds for and targets these CPU types because they display
  335. a broad range of CPU feature compatibility with many commonly
  336. used CPUs.
  337. </para>
  338. <para>
  339. Despite this broad range of compatibility, the CPUs could support
  340. a feature that your host CPU does not support.
  341. Although this situation is not a problem when QEMU uses software
  342. emulation of the feature, it can be a problem when QEMU is
  343. running with KVM enabled.
  344. Specifically, software compiled with a certain CPU feature crashes
  345. when run on a CPU under KVM that does not support that feature.
  346. To work around this problem, you can override QEMU's runtime CPU
  347. setting by changing the <filename>QB_CPU_KVM</filename>
  348. variable in <filename>qemuboot.conf</filename> in the
  349. <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory's</ulink>
  350. <filename>deploy/image</filename> directory.
  351. This setting specifies a <filename>-cpu</filename> option
  352. passed into QEMU in the <filename>runqemu</filename> script.
  353. Running <filename>qemu -cpu help</filename> returns a list of
  354. available supported CPU types.
  355. </para>
  356. </section>
  357. <section id='qemu-dev-performance'>
  358. <title>QEMU Performance</title>
  359. <para>
  360. Using QEMU to emulate your hardware can result in speed issues
  361. depending on the target and host architecture mix.
  362. For example, using the <filename>qemux86</filename> image in the
  363. emulator on an Intel-based 32-bit (x86) host machine is fast
  364. because the target and host architectures match.
  365. On the other hand, using the <filename>qemuarm</filename> image
  366. on the same Intel-based host can be slower.
  367. But, you still achieve faithful emulation of ARM-specific issues.
  368. </para>
  369. <para>
  370. To speed things up, the QEMU images support using
  371. <filename>distcc</filename> to call a cross-compiler outside the
  372. emulated system.
  373. If you used <filename>runqemu</filename> to start QEMU, and the
  374. <filename>distccd</filename> application is present on the host
  375. system, any BitBake cross-compiling toolchain available from the
  376. build system is automatically used from within QEMU simply by
  377. calling <filename>distcc</filename>.
  378. You can accomplish this by defining the cross-compiler variable
  379. (e.g. <filename>export CC="distcc"</filename>).
  380. Alternatively, if you are using a suitable SDK image or the
  381. appropriate stand-alone toolchain is present, the toolchain is
  382. also automatically used.
  383. <note>
  384. Several mechanisms exist that let you connect to the system
  385. running on the QEMU emulator:
  386. <itemizedlist>
  387. <listitem><para>
  388. QEMU provides a framebuffer interface that makes
  389. standard consoles available.
  390. </para></listitem>
  391. <listitem><para>
  392. Generally, headless embedded devices have a serial port.
  393. If so, you can configure the operating system of the
  394. running image to use that port to run a console.
  395. The connection uses standard IP networking.
  396. </para></listitem>
  397. <listitem><para>
  398. SSH servers exist in some QEMU images.
  399. The <filename>core-image-sato</filename> QEMU image
  400. has a Dropbear secure shell (SSH) server that runs
  401. with the root password disabled.
  402. The <filename>core-image-full-cmdline</filename> and
  403. <filename>core-image-lsb</filename> QEMU images
  404. have OpenSSH instead of Dropbear.
  405. Including these SSH servers allow you to use standard
  406. <filename>ssh</filename> and <filename>scp</filename>
  407. commands.
  408. The <filename>core-image-minimal</filename> QEMU image,
  409. however, contains no SSH server.
  410. </para></listitem>
  411. <listitem><para>
  412. You can use a provided, user-space NFS server to boot
  413. the QEMU session using a local copy of the root
  414. filesystem on the host.
  415. In order to make this connection, you must extract a
  416. root filesystem tarball by using the
  417. <filename>runqemu-extract-sdk</filename> command.
  418. After running the command, you must then point the
  419. <filename>runqemu</filename>
  420. script to the extracted directory instead of a root
  421. filesystem image file.
  422. See the
  423. "<link linkend='qemu-running-under-a-network-file-system-nfs-server'>Running Under a Network File System (NFS) Server</link>"
  424. section for more information.
  425. </para></listitem>
  426. </itemizedlist>
  427. </note>
  428. </para>
  429. </section>
  430. <section id='qemu-dev-command-line-syntax'>
  431. <title>QEMU Command-Line Syntax</title>
  432. <para>
  433. The basic <filename>runqemu</filename> command syntax is as
  434. follows:
  435. <literallayout class='monospaced'>
  436. $ runqemu [<replaceable>option</replaceable> ] [...]
  437. </literallayout>
  438. Based on what you provide on the command line,
  439. <filename>runqemu</filename> does a good job of figuring out what
  440. you are trying to do.
  441. For example, by default, QEMU looks for the most recently built
  442. image according to the timestamp when it needs to look for an
  443. image.
  444. Minimally, through the use of options, you must provide either
  445. a machine name, a virtual machine image
  446. (<filename>*wic.vmdk</filename>), or a kernel image
  447. (<filename>*.bin</filename>).
  448. </para>
  449. <para>
  450. Following is the command-line help output for the
  451. <filename>runqemu</filename> command:
  452. <literallayout class='monospaced'>
  453. $ runqemu --help
  454. Usage: you can run this script with any valid combination
  455. of the following environment variables (in any order):
  456. KERNEL - the kernel image file to use
  457. ROOTFS - the rootfs image file or nfsroot directory to use
  458. MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
  459. Simplified QEMU command-line options can be passed with:
  460. nographic - disable video console
  461. serial - enable a serial console on /dev/ttyS0
  462. slirp - enable user networking, no root privileges is required
  463. kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
  464. kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
  465. publicvnc - enable a VNC server open to all hosts
  466. audio - enable audio
  467. [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
  468. tcpserial=&lt;port&gt; - specify tcp serial port number
  469. biosdir=&lt;dir&gt; - specify custom bios dir
  470. biosfilename=&lt;filename&gt; - specify bios filename
  471. qemuparams=&lt;xyz&gt; - specify custom parameters to QEMU
  472. bootparams=&lt;xyz&gt; - specify custom kernel parameters during boot
  473. help, -h, --help: print this text
  474. Examples:
  475. runqemu
  476. runqemu qemuarm
  477. runqemu tmp/deploy/images/qemuarm
  478. runqemu tmp/deploy/images/qemux86/&lt;qemuboot.conf&gt;
  479. runqemu qemux86-64 core-image-sato ext4
  480. runqemu qemux86-64 wic-image-minimal wic
  481. runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
  482. runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz...
  483. runqemu qemux86 qemuparams="-m 256"
  484. runqemu qemux86 bootparams="psplash=false"
  485. runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic
  486. runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic.vmdk
  487. </literallayout>
  488. </para>
  489. </section>
  490. <section id='qemu-dev-runqemu-command-line-options'>
  491. <title><filename>runqemu</filename> Command-Line Options</title>
  492. <para>
  493. Following is a description of <filename>runqemu</filename>
  494. options you can provide on the command line:
  495. <note><title>Tip</title>
  496. If you do provide some "illegal" option combination or perhaps
  497. you do not provide enough in the way of options,
  498. <filename>runqemu</filename> provides appropriate error
  499. messaging to help you correct the problem.
  500. </note>
  501. <itemizedlist>
  502. <listitem><para>
  503. <replaceable>QEMUARCH</replaceable>:
  504. The QEMU machine architecture, which must be "qemuarm",
  505. "qemuarm64", "qemumips", "qemumips64", "qemuppc",
  506. "qemux86", or "qemux86-64".
  507. </para></listitem>
  508. <listitem><para>
  509. <filename><replaceable>VM</replaceable></filename>:
  510. The virtual machine image, which must be a
  511. <filename>.wic.vmdk</filename> file.
  512. Use this option when you want to boot a
  513. <filename>.wic.vmdk</filename> image.
  514. The image filename you provide must contain one of the
  515. following strings: "qemux86-64", "qemux86", "qemuarm",
  516. "qemumips64", "qemumips", "qemuppc", or "qemush4".
  517. </para></listitem>
  518. <listitem><para>
  519. <replaceable>ROOTFS</replaceable>:
  520. A root filesystem that has one of the following
  521. filetype extensions: "ext2", "ext3", "ext4", "jffs2",
  522. "nfs", or "btrfs".
  523. If the filename you provide for this option uses “nfs”, it
  524. must provide an explicit root filesystem path.
  525. </para></listitem>
  526. <listitem><para>
  527. <replaceable>KERNEL</replaceable>:
  528. A kernel image, which is a <filename>.bin</filename> file.
  529. When you provide a <filename>.bin</filename> file,
  530. <filename>runqemu</filename> detects it and assumes the
  531. file is a kernel image.
  532. </para></listitem>
  533. <listitem><para>
  534. <replaceable>MACHINE</replaceable>:
  535. The architecture of the QEMU machine, which must be one
  536. of the following: "qemux86", "qemux86-64", "qemuarm",
  537. "qemuarm64", "qemumips", “qemumips64", or "qemuppc".
  538. The <replaceable>MACHINE</replaceable> and
  539. <replaceable>QEMUARCH</replaceable> options are basically
  540. identical.
  541. If you do not provide a <replaceable>MACHINE</replaceable>
  542. option, <filename>runqemu</filename> tries to determine
  543. it based on other options.
  544. </para></listitem>
  545. <listitem><para>
  546. <filename>ramfs</filename>:
  547. Indicates you are booting an initial RAM disk (initramfs)
  548. image, which means the <filename>FSTYPE</filename> is
  549. <filename>cpio.gz</filename>.
  550. </para></listitem>
  551. <listitem><para>
  552. <filename>iso</filename>:
  553. Indicates you are booting an ISO image, which means the
  554. <filename>FSTYPE</filename> is
  555. <filename>.iso</filename>.
  556. </para></listitem>
  557. <listitem><para>
  558. <filename>nographic</filename>:
  559. Disables the video console, which sets the console to
  560. "ttys0".
  561. </para></listitem>
  562. <listitem><para>
  563. <filename>serial</filename>:
  564. Enables a serial console on
  565. <filename>/dev/ttyS0</filename>.
  566. </para></listitem>
  567. <listitem><para>
  568. <filename>biosdir</filename>:
  569. Establishes a custom directory for BIOS, VGA BIOS and
  570. keymaps.
  571. </para></listitem>
  572. <listitem><para>
  573. <filename>biosfilename</filename>:
  574. Establishes a custom BIOS name.
  575. </para></listitem>
  576. <listitem><para>
  577. <filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
  578. Specifies custom QEMU parameters.
  579. Use this option to pass options other than the simple
  580. "kvm" and "serial" options.
  581. </para></listitem>
  582. <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
  583. Specifies custom boot parameters for the kernel.
  584. </para></listitem>
  585. <listitem><para>
  586. <filename>audio</filename>:
  587. Enables audio in QEMU.
  588. The <replaceable>MACHINE</replaceable> option must be
  589. either "qemux86" or "qemux86-64" in order for audio to be
  590. enabled.
  591. Additionally, the <filename>snd_intel8x0</filename>
  592. or <filename>snd_ens1370</filename> driver must be
  593. installed in linux guest.
  594. </para></listitem>
  595. <listitem><para>
  596. <filename>slirp</filename>:
  597. Enables "slirp" networking, which is a different way
  598. of networking that does not need root access
  599. but also is not as easy to use or comprehensive
  600. as the default.
  601. </para></listitem>
  602. <listitem><para id='kvm-cond'>
  603. <filename>kvm</filename>:
  604. Enables KVM when running "qemux86" or "qemux86-64"
  605. QEMU architectures.
  606. For KVM to work, all the following conditions must be met:
  607. <itemizedlist>
  608. <listitem><para>
  609. Your <replaceable>MACHINE</replaceable> must be either
  610. qemux86" or "qemux86-64".
  611. </para></listitem>
  612. <listitem><para>
  613. Your build host has to have the KVM modules
  614. installed, which are
  615. <filename>/dev/kvm</filename>.
  616. </para></listitem>
  617. <listitem><para>
  618. The build host <filename>/dev/kvm</filename>
  619. directory has to be both writable and readable.
  620. </para></listitem>
  621. </itemizedlist>
  622. </para></listitem>
  623. <listitem><para>
  624. <filename>kvm-vhost</filename>:
  625. Enables KVM with VHOST support when running "qemux86"
  626. or "qemux86-64" QEMU architectures.
  627. For KVM with VHOST to work, the following conditions must
  628. be met:
  629. <itemizedlist>
  630. <listitem><para>
  631. <link linkend='kvm-cond'>kvm</link> option
  632. conditions must be met.
  633. </para></listitem>
  634. <listitem><para>
  635. Your build host has to have virtio net device, which
  636. are <filename>/dev/vhost-net</filename>.
  637. </para></listitem>
  638. <listitem><para>
  639. The build host <filename>/dev/vhost-net</filename>
  640. directory has to be either readable or writable
  641. and “slirp-enabled”.
  642. </para></listitem>
  643. </itemizedlist>
  644. </para></listitem>
  645. <listitem><para>
  646. <filename>publicvnc</filename>:
  647. Enables a VNC server open to all hosts.
  648. </para></listitem>
  649. </itemizedlist>
  650. </para>
  651. </section>
  652. </chapter>
  653. <!--
  654. vim: expandtab tw=80 ts=4
  655. -->