source: postlfs/virtualization/qemu.xml@ f48a2a2a

12.0 12.1 12.2 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since f48a2a2a was 17b1ad9, checked in by Xi Ruoyao <xry111@…>, 13 months ago

qemu: Fix the command option for running UEFI

A plain "-pflash <file>" option does not work if <file> is not writable
with the current qemu version.

  • Property mode set to 100644
File size: 25.5 KB
RevLine 
[d28198d3]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[75e93d0]7 <!ENTITY qemu-download-http "https://download.qemu.org/qemu-&qemu-version;.tar.xz">
[2f6053d]8 <!ENTITY qemu-download-ftp " ">
[27ed278]9 <!ENTITY qemu-md5sum "d41853bffb18878dd1ff7afc2eb41f1a">
[d5c360b4]10 <!ENTITY qemu-size "121 MB">
[27ed278]11 <!ENTITY qemu-buildsize "2.5 GB (365 MB installed)">
12 <!ENTITY qemu-time "1.6 SBU (add 2.4 SBU for tests, both using parallelism=4)">
[d28198d3]13]>
14
[2f6053d]15<sect1 id="qemu" xreflabel="qemu-&qemu-version;">
16 <?dbhtml filename="qemu.html"?>
[d28198d3]17
18
[2f6053d]19 <title>qemu-&qemu-version;</title>
[d28198d3]20
[2f6053d]21 <indexterm zone="qemu">
22 <primary sortas="a-qemu">qemu</primary>
[d28198d3]23 </indexterm>
24
25 <sect2 role="package">
[2f6053d]26 <title>Introduction to qemu</title>
[d28198d3]27
[47274444]28 <para>
29 <application>qemu</application> is a full virtualization solution for
30 Linux on x86 hardware containing virtualization extensions (Intel VT or
31 AMD-V).
32 </para>
[d28198d3]33
[cfd4fa8]34 &lfs113_checked;
[27643d0f]35
[d28198d3]36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
[47274444]39 <para>
40 Download (HTTP): <ulink url="&qemu-download-http;"/>
41 </para>
[d28198d3]42 </listitem>
43 <listitem>
[47274444]44 <para>
45 Download (FTP): <ulink url="&qemu-download-ftp;"/>
46 </para>
[d28198d3]47 </listitem>
48 <listitem>
[47274444]49 <para>
50 Download MD5 sum: &qemu-md5sum;
51 </para>
[d28198d3]52 </listitem>
53 <listitem>
[47274444]54 <para>
55 Download size: &qemu-size;
56 </para>
[d28198d3]57 </listitem>
58 <listitem>
[47274444]59 <para>
60 Estimated disk space required: &qemu-buildsize;
61 </para>
[d28198d3]62 </listitem>
63 <listitem>
[47274444]64 <para>
65 Estimated build time: &qemu-time;
66 </para>
[d28198d3]67 </listitem>
68 </itemizedlist>
[54f740f]69
[2f6053d]70 <bridgehead renderas="sect3">Qemu Dependencies</bridgehead>
[d28198d3]71
72 <bridgehead renderas="sect4">Required</bridgehead>
73 <para role="required">
[293e4018]74 <xref linkend="glib2"/>
[d28198d3]75 </para>
76
[c41b38f]77 <bridgehead renderas="sect4">Recommended</bridgehead>
78 <para role="recommended">
[50ba3b3]79 <xref linkend="alsa-lib"/>,
80 <xref linkend="libslirp"/>, and
[b4c31a6]81 <xref linkend="sdl2"/>
[c41b38f]82 </para>
83
[d28198d3]84 <bridgehead renderas="sect4">Optional</bridgehead>
85 <para role="optional">
[80a314c]86 Depending on the sound system, various packages in <xref linkend="alsa"/>,
[2d7c53d]87 <xref linkend="python3"/>,
[11b931a6]88 <xref linkend="pulseaudio"/>,
[8ade43b]89 <xref linkend="bluez"/>,
[d28198d3]90 <xref linkend="curl"/>,
[8ade43b]91 <xref linkend="cyrus-sasl"/>,
[10f9bb45]92 <xref linkend="gnutls"/>,
[8ade43b]93 <xref linkend="gtk2"/>,
94 <xref linkend="gtk3"/>,
95 <xref linkend="libusb"/>,
[10f9bb45]96 <xref linkend="libgcrypt"/>,
[fee79e2]97 <xref linkend="libssh2"/>,
[8ade43b]98 <xref linkend="lzo"/>,
[10f9bb45]99 <xref linkend="nettle"/>,
100 <xref linkend="mesa"/>,
[cac7f93]101 <xref role="nodep" linkend="vte"/> or <xref linkend="vte2"/>, and
[b4c31a6]102<!-- libcacard has been a standalone project since qemu-2.5.-->
[fefc5d54]103 <ulink url="https://gitlab.freedesktop.org/spice/libcacard">libcacard</ulink>
[d28198d3]104 </para>
105
[0fea832]106 <bridgehead renderas="sect4">Optional (Runtime)</bridgehead>
107 <para role="runtime">
108 &logind;
109 </para>
110
[402910e]111 <bridgehead renderas="sect4">Optional (for building the documentation)</bridgehead>
[a541e080]112 <para role="optional">
[402910e]113 <xref linkend="sphinx_rtd_theme"/>
[a541e080]114 </para>
115
[9b13441]116 <note>
117 <para>
118 This optional dependencies list is not comprehensive. See the output of
119 <command>./configure --help</command> for a more complete list.
120 </para>
121 </note>
122
[42ddc30]123 <para condition="html" role="usernotes">Editor Notes:
[2f6053d]124 <ulink url="&blfs-wiki;/qemu"/></para>
[d28198d3]125
126 </sect2>
127
[2f6053d]128 <sect2 id='qemu-prereq'>
[1eb4fcf]129 <title>KVM Prerequisites</title>
[d28198d3]130
[47274444]131 <para>
132 Before building <application>qemu</application>, check to see if
133 your processor supports Virtualization Technology (VT):
134 </para>
[d28198d3]135
[d6b45f7]136 <screen><userinput>grep -E '^flags.*(vmx|svm)' /proc/cpuinfo</userinput></screen>
[d28198d3]137
[47274444]138 <para>
139 If you get any output, you have VT technology (vmx for Intel
140 processors and svm for AMD processors). You then need to go into your
[b9c353b]141 system BIOS and ensure it is enabled. After enabling, reboot back to your
[47274444]142 LFS instance.
143 </para>
[d28198d3]144
145 </sect2>
146
[2f6053d]147 <sect2 role="kernel" id='qemu-kernel'>
[d28198d3]148 <title>Kernel Configuration</title>
149
[47274444]150 <para>
151 Enable the following options in the kernel configuration and
152 recompile the kernel if necessary:
153 </para>
[d28198d3]154
[9cc0aba5]155 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
156 href="qemu-kvm-kernel.xml"/>
[d28198d3]157
[2f6053d]158 <indexterm zone="qemu qemu-kernel">
159 <primary sortas="d-qemu">qemu</primary>
[d28198d3]160 </indexterm>
161
[47274444]162 <para>
163 The Intel or AMD settings are not both required, but the one matching
164 your system processor is required.
165 </para>
[d28198d3]166
[b4c31a6]167 <para>
168 To use the <quote>bridge</quote> network device, as explained below,
169 check that <xref linkend='bridgeutils'/> is installed
170 and the following options in the kernel configuration are enabled:
171 </para>
[9b13441]172
[9cc0aba5]173 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
174 href="qemu-bridge-kernel.xml"/>
[d28198d3]175
176 </sect2>
177
178 <sect2 role="installation">
[2f6053d]179 <title>Installation of qemu</title>
[fdec60a]180<!-- group kvm is created in lfs chapter 7 even for sysv
[9f309be]181 <para revision="sysv">
[b4c31a6]182 You will need a dedicated group that will contain users (other than root)
183 allowed to access the KVM device. Create this group by running the
184 following command as the
185 <systemitem class="username">root</systemitem> user:
186 </para>
187
[9f309be]188<screen role="root" revision="sysv"><userinput>groupadd -g 61 kvm</userinput></screen>
[fdec60a]189-->
[b4c31a6]190 <para>
[0fea832]191 The udev rule of LFS only allows the &root; user, the users owning
192 a local login session supported by the optional runtime dependency
193 &logind;, or the users in the
194 <systemitem class="groupname">kvm</systemitem> group to use the KVM
195 device. As the &root; user, add any non-&root; users that might use
196 the KVM device either without &logind; installed or remotely (via a
197 SSH connection) to the
198 <systemitem class="groupname">kvm</systemitem> group:
[b4c31a6]199 </para>
200
201<screen role="root"><userinput>usermod -a -G kvm <replaceable>&lt;username&gt;</replaceable></userinput></screen>
202
[47274444]203 <para>
204 Install <application>qemu</application> by running the following
205 commands:
206 </para>
[d28198d3]207
[47274444]208 <note>
209 <para>
210 Qemu is capable of running many targets. The build process
211 is also capable of building multiple targets at one time in a
212 comma delimited list assigned to <option>--target-list</option>. Run
213 <command>./configure --help</command> to get a complete list of
214 available targets.
215 </para>
216 </note>
[aa9028e]217
218
219<screen><userinput>if [ $(uname -m) = i686 ]; then
220 QEMU_ARCH=i386-softmmu
221else
222 QEMU_ARCH=x86_64-softmmu
223fi
224
[a29d9e0]225
[10f9bb45]226mkdir -vp build &amp;&amp;
227cd build &amp;&amp;
228
[252e5bf]229../configure --prefix=/usr \
230 --sysconfdir=/etc \
[b0a073b]231 --localstatedir=/var \
[252e5bf]232 --target-list=$QEMU_ARCH \
233 --audio-drv-list=alsa \
[dff46c6]234 --disable-pa \
[9618962]235 --enable-slirp \
[252e5bf]236 --docdir=/usr/share/doc/qemu-&qemu-version; &amp;&amp;
237
[aa9028e]238unset QEMU_ARCH &amp;&amp;
239
[9b13441]240make</userinput></screen>
[d28198d3]241
[43ef29db]242 <para>
[6aa48d38]243 <application>qemu</application> uses <command>ninja</command> as
[542bb708]244 a subprocess when building. To run the tests, issue:
[ca19f43]245 <command>ninja test</command>. Two migration tests are known to fail.
[43ef29db]246 </para>
[d28198d3]247
[9a04a8e9]248 <para>
[ca19f43]249 Now, as the &root; user:
[9a04a8e9]250 </para>
251
[b4c31a6]252<screen role="root"><userinput>make install</userinput></screen>
[d129835c]253<!-- now in LFS
[9a04a8e9]254 <para>
[b4c31a6]255 You will also need to add an Udev rule so that the KVM device gets correct
[1f1f2230]256 permissions. As the &root; user, issue:
[9a04a8e9]257 </para>
258
[b1643e3]259<screen role="root"><userinput>cat > /etc/udev/rules.d/65-kvm.rules &lt;&lt; "EOF"
[009eb04]260<literal>KERNEL=="kvm", GROUP="kvm", MODE="0660"</literal>
[9a04a8e9]261EOF</userinput></screen>
[d129835c]262-->
[b4c31a6]263 <para>
264 Change the permissions and ownership of a helper script, which is needed
[1f1f2230]265 when using the <quote>bridge</quote> network device (see below). Again
266 as the &root; user, issue:
[b4c31a6]267 </para>
268
[d129835c]269 <note>
270 <para>
271 You need to add any users who might use the <quote>bridge</quote>
272 network device into the
273 <systemitem class="groupname">kvm</systemitem> group even if
274 &logind; is installed.
275 </para>
276 </note>
277
[b4c31a6]278<screen role="root"><userinput>chgrp kvm /usr/libexec/qemu-bridge-helper &amp;&amp;
279chmod 4750 /usr/libexec/qemu-bridge-helper</userinput></screen>
280
[8ee3e19c]281 <note>
[47274444]282 <para>
[542bb708]283 For convenience you may want to create a symbolic link to run
[1f1f2230]284 the installed program. For instance (as the &root; user):
[542bb708]285 </para>
[d28198d3]286
[10f9bb45]287<screen role="root"><userinput>ln -sv qemu-system-`uname -m` /usr/bin/qemu</userinput></screen>
[d28198d3]288 </note>
289
290 </sect2>
291
[6a54383]292 <sect2 role="commands">
293 <title>Command Explanations</title>
294
[a29d9e0]295 <para>
[1f1f2230]296 <parameter>--audio-drv-list=alsa --disable-pa</parameter>: This switch
297 sets the audio driver to ALSA. See below for enabling other audio drivers.
[9b13441]298 </para>
[6a54383]299
[9618962]300 <para>
301 <parameter>--enable-slirp</parameter>: This switch forces the building
302 system to check for <xref linkend='libslirp'/>. Remove it if you
303 don't need the <option>-netdev user</option> support.
304 </para>
305
[f9865e2]306 <para>
[1f1f2230]307 <option>--audio-drv-list=pa --disable-alsa</option>: This switch sets
308 the audio driver to pulseaudio. For other drivers see the
309 --audio-drv-list choices in the output of
310 <command>./configure --help</command>. The default audio driver is OSS.
311 To enable support for both alsa and pulseaudio, use
[f9865e2]312 <option>--audio-drv-list=alsa,pa</option>.
313 </para>
314
[9b13441]315 </sect2>
[6a54383]316
[b4c31a6]317 <sect2 role="using">
318 <title>Using Qemu</title>
319
320 <para>
321 Since using qemu means using a virtual computer, the steps to set up
322 the virtual machine are in close analogy with those to set up a real
323 computer. You'll need to decide about CPU, memory, disk, USB devices,
324 network card(s), screen size, etc. Once the <quote>hardware</quote> is
325 decided, you'll have for example to choose how to connect the machine
326 to internet, and/or to install an OS. In the following, we show basic
327 ways of performing those steps. But qemu is much more than this, and it
328 is strongly advised to read the qemu documentation in
329 <filename>/usr/share/doc/qemu-&qemu-version;/qemu-doc.html</filename>.
330 </para>
[d28198d3]331
[b4c31a6]332 <note>
333 <para>
334 It is standard practice to name the computer running qemu
335 <quote>host</quote> and the emulated machine running under qemu the
336 <quote>guest</quote>. We'll use those notations in the following.
337 </para>
338 </note>
[d28198d3]339
[b4c31a6]340 <note>
341 <para>
342 The following instructions assume the optional symbolic link,
343 <filename>qemu</filename>, has been created. Additionally,
[1f1f2230]344 <command>qemu</command> should be run in a graphical environment.
345 But it is possible to use qemu <quote>headless</quote> or through
346 SSH. See the documentation for the various possibilities.
[b4c31a6]347 </para>
348 </note>
[d28198d3]349
[b4c31a6]350 <bridgehead renderas="sect3">Disk</bridgehead>
351 <para>
352 A virtual disk may be set up in the following way:
353 </para>
[d28198d3]354
[b4c31a6]355<screen><userinput>VDISK_SIZE=<replaceable>50G</replaceable>
356VDISK_FILENAME=<replaceable>vdisk.img</replaceable>
357qemu-img create -f qcow2 $VDISK_FILENAME $VDISK_SIZE</userinput></screen>
[d28198d3]358
[b4c31a6]359 <para>
[9d6565bf]360 The virtual disk size and filename should be adjusted as desired. The
[b4c31a6]361 actual size of the file will be less than specified, but will expand as
362 needed, so it is safe to put a high value.
363 </para>
364
365 <bridgehead renderas="sect3">Operating System</bridgehead>
366 <para>
[0639bb6]367 To install an operating system, download an iso image from your preferred
[b4c31a6]368 Linux distribution. For the purposes of this example, we'll use
369 <filename>Fedora-16-x86_64-Live-LXDE.iso</filename> in the current
370 directory. Run the following:
371 </para>
[d28198d3]372
[b4c31a6]373<screen><userinput>qemu -enable-kvm \
374 -drive file=$VDISK_FILENAME \
[0d7900a]375 -cdrom Fedora-16-x86_64-Live-LXDE.iso \
[d28198d3]376 -boot d \
[b4c31a6]377 -m <replaceable>1G</replaceable></userinput></screen>
378
379 <para>
380 Follow the normal installation procedures for the chosen distribution.
381 The <parameter>-boot</parameter> option specifies the boot order of
382 drives as a string of drive letters. Valid drive letters are: a, b
383 (floppy 1 and 2), c (first hard disk), d (first CD-ROM). The
384 <parameter>-m</parameter> option is the amount of memory to use for the
385 virtual machine. The choice depends on the load of the host. Modern
386 distributions should be comfortable with 1GB.
387 The <parameter>-enable-kvm</parameter> option allows hardware
388 acceleration. Without this switch, the emulation is much slower.
389 </para>
390
391 <bridgehead renderas="sect3">Defining the virtual hardware</bridgehead>
392 <para>
393 The virtual machine hardware is defined by the qemu command line.
394 An example command is given below:
395 </para>
396
397<screen><userinput>qemu -enable-kvm \
398 -smp 4 \
399 -cpu host \
400 -m 1G \
401 -drive file=$VDISK_FILENAME \
402 -cdrom grub-img.iso \
403 -boot order=c,once=d,menu=on \
404 -net nic,netdev=net0 \
405 -netdev user,id=net0 \
[42326ce]406 -device ac97 \
[b4c31a6]407 -vga std \
408 -serial mon:stdio \
409 -name "fedora-16"</userinput></screen>
410
411 <bridgehead renderas="sect3">Meaning of the command line options</bridgehead>
412 <para>
413 <parameter>-enable-kvm</parameter>: enable full KVM virtualization
414 support. On some hardware, it may be necessary to add the undocumented
415 <option>-machine smm=off</option> option in order to enable KVM.
416 </para>
417
418 <para>
419 <parameter>-smp &lt;N&gt;</parameter>: enable symmetric multiprocessing
420 with &lt;N&gt; CPUs.
421 </para>
422
423 <para>
424 <parameter>-cpu &lt;model&gt;</parameter>: simulate CPU &lt;model&gt;.
425 the list of supported models can be obtained with <option>-cpu
426 help</option>.
427 </para>
428
429 <para>
430 <parameter>-drive file=&lt;filename&gt;</parameter>: defines a virtual
431 disk whose image is stored in <filename>&lt;filename&gt;</filename>.
432 </para>
433
434 <para>
[b9c353b]435 <parameter>-cdrom grub-img.iso</parameter>: defines an iso formatted file
[b4c31a6]436 to use as a cdrom. Here we use a grub rescue disk, which may turn handy
437 when something goes wrong at boot time.
438 </para>
439
440 <para>
441 <parameter>-boot order=c,once=d,menu=on</parameter>: defines the boot
442 order for the virtual BIOS.
443 </para>
444
445 <para>
446 <parameter>-net nic,netdev=&lt;netid&gt;</parameter>: defines a network
447 card connected to the network device with id &lt;netid&gt;.
448 </para>
449
450 <para>
451 <parameter>-netdev user,id=&lt;netid&gt;</parameter>: defines the
452 network <quote>user</quote> device. This is a virtual local network
453 with addresses 10.0.2.0/24, where the host has address 10.0.2.2 and
454 acts as a gateway to internet, and with a name server at address
455 10.0.2.3, and an smb server at address 10.0.2.4. A builtin DHCP server
456 can allocate addresses between 10.0.2.15 and 10.0.2.31.
457 </para>
458
459 <para>
460 <parameter>-soundhw &lt;model&gt;</parameter>: defines the soundcard
461 model. The list may be obtained with <option>-soundhw help</option>.
462 </para>
463
464 <para>
[f1f1519]465 <parameter>-vga &lt;type&gt;</parameter>: defines the type of VGA card
466 to emulate. For <parameter>-vga std</parameter>, if you are building
467 a Linux kernel for the guest, it's recommended to enable
468 <option>CONFIG_DRM_BOCHS</option> (as a part of the kernel or a kernel
469 module) to drive all the features of the emulated VGA card, and
470 <option>CONFIG_FB</option> to display the Linux console on it. The
471 other <option>&lt;type&gt;</option> values are not tested by the
472 editors and may require additional dependencies.
[b4c31a6]473 </para>
474
475 <para>
476 <parameter>-serial mon:stdio</parameter>: sends the serial port of the
477 guest (<filename>/dev/ttyS0</filename> on linux guests), multiplexed with
478 the qemu monitor, to the standard input and output of the qemu
479 process.
480 </para>
481
482 <para>
483 <parameter>-name &lt;name&gt;</parameter>: sets the name of the guest.
484 This name is displayed in the guest window caption. It may be useful
485 if you run several guests at the same time.
486 </para>
487
[46a8304]488 <para>
[17b1ad9]489 <option>-drive if=pflash,format=raw,readonly=on,file=/usr/share/qemu/edk2-x86_64-code.fd</option>: Load a
[b38aed5]490 pre-built EDK2 UEFI firmware, instead of the default PC BIOS. Use
[46a8304]491 this option if you want to boot the guest OS with UEFI.
492 </para>
493
[10311fa]494 <para>
495 <option>-drive file=&lt;filename&gt;,if=virtio</option>: Provide
496 Virtio interface to the guest kernel for accessing the disk image,
497 instead of simulating a real disk hardware. This can improve disk I/O
498 performance, but it requires a Virtio driver in guest kernel. Use
499 it instead of a plain <option>-drive</option> if the guest kernel
[8cffdfa]500 supports Virtio. To build a Linux kernel with Virtio support for the
501 guest, use
502 <command>make defconfig &amp;&amp; make kvm_guest.config</command> to
503 create an initial kernel configuration with the Virtio drives enabled,
504 then make your customization. And, if the guest kernel is Linux, the
505 virtual disks using Virtio interface will be named
506 <filename>vdx</filename> in the devtmpfs, instead of
507 <filename>sdx</filename>.
[10311fa]508 </para>
509
510 <para>
511 <option>-net nic,netdev=net0,model=virtio-net-pci</option>: Provide
512 Virtio interface to the guest kernel for accessing the network
513 interface, instead of simulating a real network interface card. This
514 can improve network I/O performance, but it requires a Virtio driver
515 in guest kernel. Use it instead of a plain <option>-net</option> if
516 the guest kernel supports Virtio.
517 </para>
518
[0639bb6]519 <bridgehead renderas="sect3">Controlling the Emulated Display</bridgehead>
[b4c31a6]520 <para>
[5c7ad04]521 To set the resolution of the emulated display for a Xorg server
522 running in the guest Linux system, read <xref linkend='xdisplay'/>.
[b4c31a6]523 </para>
[d28198d3]524
[b4c31a6]525 <bridgehead renderas="sect3">Networking</bridgehead>
526 <para>
[449c552]527 The above solution for networking allows the guest to access the local
[b4c31a6]528 network through the host (and possibly to access internet through the
529 local routers), but the converse is not true. Not even the host can
530 access the guest, unless port forwarding is enabled. And in the case
531 several guests are running, they cannot communicate with each other.
532 Other network devices can be used for this purpose. For example, there
533 is the <quote>socket</quote> device, which allows several guests to
534 share a common virtual network. In the following, we describe in more
535 details how to set up the <quote>bridge</quote> device, which allows
536 the guests to appear as if connected to the local network. All the
537 commands below should be run as the <systemitem
538 class="username">root</systemitem> user.
539 </para>
[0d7900a]540
[b4c31a6]541 <para revision="sysv">
542 Set up bridging with <xref linkend="bridgeutils"/>. Only the physical
543 interface(s) should be set up at boot. The virtual interface(s) will be
544 added as needed when qemu is started.
545 </para>
546
[47274444]547 <para revision="systemd">
548 <!-- On SYS-V, IP_FORWARD is enabled by the bridge script. -->
[b4c31a6]549 Allow the host to forward IP packets:
550 </para>
[d28198d3]551
[b4c31a6]552<screen role="root"
553 revision="systemd"><userinput>sysctl -w net.ipv4.ip_forward=1</userinput></screen>
[d28198d3]554
[b4c31a6]555 <para revision="systemd">
556 To make this permanent, add the command to
557 <filename>/etc/sysctl.d/60-net-forward.conf:</filename>
558 </para>
[6e5e4d2]559
[b4c31a6]560<screen role="root"
561 revision="systemd"><userinput>cat &gt;&gt; /etc/sysctl.d/60-net-forward.conf &lt;&lt; EOF
[51dfb3e]562<literal>net.ipv4.ip_forward=1</literal>
[6e5e4d2]563EOF</userinput></screen>
564
[b4c31a6]565 <para>
566 Set up a required configuration file:
567 </para>
[670f775]568
[3a87232]569<!-- /etc/qemu has not been installed by "make install" since version 2.4 -->
570<screen role="root"><userinput>install -vdm 755 /etc/qemu &amp;&amp;
571echo allow br0 &gt; /etc/qemu/bridge.conf</userinput></screen>
[670f775]572
[b4c31a6]573 <para>
[1f1f2230]574 In the qemu command line above, replace the switch
575 <parameter>-netdev user,...</parameter> with
576 <parameter>-netdev bridge,...</parameter>.
[b4c31a6]577 </para>
[d28198d3]578
579 </sect2>
580
581 <sect2 role="content">
582 <title>Contents</title>
583
584 <segmentedlist>
[9b13441]585 <segtitle>Installed Programs</segtitle>
586 <segtitle>Installed Library</segtitle>
[d28198d3]587 <segtitle>Installed Directories</segtitle>
588
589 <seglistitem>
[9b13441]590 <seg>
[a541e080]591 elf2dmp,
[10f9bb45]592 qemu (symlink),
[a541e080]593 qemu-edid,
[9b13441]594 qemu-ga,
595 qemu-img,
596 qemu-io,
[a541e080]597 qemu-keymap,
[9b13441]598 qemu-nbd,
[a541e080]599 qemu-pr-helper,
600 qemu-storage-daemon, and
601 qemu-system-&lt;arch&gt;
[9b13441]602 </seg>
[b4c31a6]603 <seg>None</seg>
[9b13441]604 <seg>
[b4c31a6]605 /usr/share/qemu and
[a541e080]606 /usr/share/doc/qemu-&qemu-version; (optional)
[9b13441]607 </seg>
[d28198d3]608 </seglistitem>
609 </segmentedlist>
610
611 <variablelist>
612 <bridgehead renderas="sect3">Short Description</bridgehead>
613 <?dbfo list-presentation="list"?>
614 <?dbhtml list-presentation="table"?>
615
[a541e080]616 <varlistentry id="elf2dmp">
617 <term><command>elf2dmp</command></term>
618 <listitem>
619 <para>
620 Converts files from elf to dmp format
621 </para>
622 <indexterm zone="qemu elf2dmp">
623 <primary sortas="b-elf2dmp">elf2dmp</primary>
624 </indexterm>
625 </listitem>
626 </varlistentry>
[b4c31a6]627
[f9865e2]628 <varlistentry id="qemu-edid">
629 <term><command>qemu-edid</command></term>
630 <listitem>
[47274444]631 <para>
[4c24eb0a]632 is a test tool for the qemu EDID generator
[47274444]633 </para>
[f9865e2]634 <indexterm zone="qemu qemu-edid">
635 <primary sortas="b-qemu-edid">qemu-edid</primary>
636 </indexterm>
637 </listitem>
638 </varlistentry>
639
[d28198d3]640 <varlistentry id="qemu-ga">
641 <term><command>qemu-ga</command></term>
642 <listitem>
[47274444]643 <para>
644 implements support for QMP (QEMU Monitor Protocol) commands and
645 events that terminate and originate respectively within the guest
[4c24eb0a]646 using an agent built as part of QEMU
[47274444]647 </para>
[2f6053d]648 <indexterm zone="qemu qemu-ga">
[d28198d3]649 <primary sortas="b-qemu-ga">qemu-ga</primary>
650 </indexterm>
651 </listitem>
652 </varlistentry>
653
654 <varlistentry id="qemu-img">
655 <term><command>qemu-img</command></term>
656 <listitem>
[47274444]657 <para>
[4c24eb0a]658 provides commands to manage QEMU disk images
[47274444]659 </para>
[2f6053d]660 <indexterm zone="qemu qemu-img">
[d28198d3]661 <primary sortas="b-qemu-img">qemu-img</primary>
662 </indexterm>
663 </listitem>
664 </varlistentry>
665
666 <varlistentry id="qemu-io">
667 <term><command>qemu-io</command></term>
668 <listitem>
[47274444]669 <para>
670 is a diagnostic and manipulation program for (virtual) memory
[9d6565bf]671 media. It is still at an early stage of development
[47274444]672 </para>
[2f6053d]673 <indexterm zone="qemu qemu-io">
[d28198d3]674 <primary sortas="b-qemu-io">qemu-io</primary>
675 </indexterm>
676 </listitem>
677 </varlistentry>
678
[a541e080]679 <varlistentry id="qemu-keymap">
680 <term><command>qemu-keymap</command></term>
681 <listitem>
682 <para>
683 generates qemu reverse keymaps from xkb keymaps,
684 which can be used with the qemu "-k" command line switch
685 </para>
686 <indexterm zone="qemu qemu-keymap">
687 <primary sortas="b-qemu-keymap">qemu-keymap</primary>
688 </indexterm>
689 </listitem>
690 </varlistentry>
691
692
[d28198d3]693 <varlistentry id="qemu-nbd">
694 <term><command>qemu-nbd</command></term>
695 <listitem>
[47274444]696 <para>
697 exports Qemu disk images using the QEMU Disk Network Block
[4c24eb0a]698 Device (NBD) protocol
[47274444]699 </para>
[2f6053d]700 <indexterm zone="qemu qemu-nbd">
[d28198d3]701 <primary sortas="b-qemu-nbd">qemu-nbd</primary>
702 </indexterm>
703 </listitem>
704 </varlistentry>
705
[a541e080]706 <varlistentry id="qemu-pr-helper">
707 <term><command>qemu-pr-helper</command></term>
708 <listitem>
709 <para>
710 Implements the persistent reservation helper for QEMU
711 </para>
712 <indexterm zone="qemu qemu-pr-helper">
713 <primary sortas="b-qemu-pr-helper">qemu-pr-helper</primary>
714 </indexterm>
715 </listitem>
716 </varlistentry>
717
718 <varlistentry id="qemu-storage-daemon">
719 <term><command>qemu-storage-daemon</command></term>
720 <listitem>
721 <para>
722 allows to modify disk images using the QEMU Monitor Protocol (QMP)
723 without running a VM
724 </para>
725 <indexterm zone="qemu qemu-storage-daemon">
726 <primary sortas="b-qemu-storage-daemon">qemu-storage-daemon</primary>
727 </indexterm>
728 </listitem>
729 </varlistentry>
730
[d28198d3]731 <varlistentry id="qemu-system">
732 <term><command>qemu-system-x86_64</command></term>
733 <listitem>
[47274444]734 <para>
[4c24eb0a]735 is the QEMU PC System emulator
[47274444]736 </para>
[2f6053d]737 <indexterm zone="qemu qemu-system">
[d28198d3]738 <primary sortas="b-qemu-system">qemu-system-x86_64</primary>
739 </indexterm>
740 </listitem>
741 </varlistentry>
[27ed278]742
[d28198d3]743 </variablelist>
744
745 </sect2>
746
747</sect1>
Note: See TracBrowser for help on using the repository browser.