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 |
|
---|
7 | <!ENTITY qemu-download-http "http://download.qemu-project.org/qemu-&qemu-version;.tar.xz">
|
---|
8 | <!ENTITY qemu-download-ftp " ">
|
---|
9 | <!ENTITY qemu-md5sum "f3eb729786591f05a9ac5d8ab03b9269">
|
---|
10 | <!ENTITY qemu-size "60 MB">
|
---|
11 | <!ENTITY qemu-buildsize "1.1 GB (add 450 MB for tests)">
|
---|
12 | <!ENTITY qemu-time "0.9 SBU (using parallelism=4; add 5.0 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="qemu" xreflabel="qemu-&qemu-version;">
|
---|
16 | <?dbhtml filename="qemu.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>qemu-&qemu-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="qemu">
|
---|
26 | <primary sortas="a-qemu">qemu</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to qemu</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>qemu</application> is a full virtualization solution for
|
---|
34 | Linux on x86 hardware containing virtualization extensions (Intel VT or
|
---|
35 | AMD-V).
|
---|
36 | </para>
|
---|
37 |
|
---|
38 | &lfs91_checked;
|
---|
39 |
|
---|
40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
41 | <itemizedlist spacing="compact">
|
---|
42 | <listitem>
|
---|
43 | <para>
|
---|
44 | Download (HTTP): <ulink url="&qemu-download-http;"/>
|
---|
45 | </para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>
|
---|
49 | Download (FTP): <ulink url="&qemu-download-ftp;"/>
|
---|
50 | </para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>
|
---|
54 | Download MD5 sum: &qemu-md5sum;
|
---|
55 | </para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>
|
---|
59 | Download size: &qemu-size;
|
---|
60 | </para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>
|
---|
64 | Estimated disk space required: &qemu-buildsize;
|
---|
65 | </para>
|
---|
66 | </listitem>
|
---|
67 | <listitem>
|
---|
68 | <para>
|
---|
69 | Estimated build time: &qemu-time;
|
---|
70 | </para>
|
---|
71 | </listitem>
|
---|
72 | </itemizedlist>
|
---|
73 |
|
---|
74 | <bridgehead renderas="sect3">Qemu Dependencies</bridgehead>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
77 | <para role="required">
|
---|
78 | <xref linkend="glib2"/>, and
|
---|
79 | <xref linkend="x-window-system"/>
|
---|
80 | </para>
|
---|
81 |
|
---|
82 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
83 | <para role="recommended">
|
---|
84 | <xref linkend="alsa-lib"/> and
|
---|
85 | <xref linkend="sdl2"/>
|
---|
86 | </para>
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
89 | <para role="optional">
|
---|
90 | Depending on the sound system, various packages in <xref linkend="alsa"/>,
|
---|
91 | <xref linkend="python3"/>,
|
---|
92 | <xref linkend="pulseaudio"/>,
|
---|
93 | <xref linkend="bluez"/>,
|
---|
94 | <xref linkend="curl"/>,
|
---|
95 | <xref linkend="cyrus-sasl"/>,
|
---|
96 | <xref linkend="gnutls"/>,
|
---|
97 | <xref linkend="gtk2"/>,
|
---|
98 | <xref linkend="gtk3"/>,
|
---|
99 | <xref linkend="libusb"/>,
|
---|
100 | <xref linkend="libgcrypt"/>,
|
---|
101 | <xref linkend="libssh2"/>,
|
---|
102 | <xref linkend="lzo"/>,
|
---|
103 | <xref linkend="nettle"/>,
|
---|
104 | <xref linkend="mesa"/>,
|
---|
105 | <xref linkend="sdl"/>,
|
---|
106 | <xref role="nodep" linkend="vte"/> or <xref linkend="vte2"/>, and
|
---|
107 | <!-- libcacard has been a standalone project since qemu-2.5.-->
|
---|
108 | <ulink url="https://www.spice-space.org/page/Libcacard">libcacard</ulink>
|
---|
109 | </para>
|
---|
110 |
|
---|
111 | <note>
|
---|
112 | <para>
|
---|
113 | This optional dependencies list is not comprehensive. See the output of
|
---|
114 | <command>./configure --help</command> for a more complete list.
|
---|
115 | </para>
|
---|
116 | </note>
|
---|
117 |
|
---|
118 | <para condition="html" role="usernotes">User Notes:
|
---|
119 | <ulink url="&blfs-wiki;/qemu"/></para>
|
---|
120 |
|
---|
121 | </sect2>
|
---|
122 |
|
---|
123 | <sect2 id='qemu-prereq'>
|
---|
124 | <title>KVM Prerequisites</title>
|
---|
125 |
|
---|
126 | <para>
|
---|
127 | Before building <application>qemu</application>, check to see if
|
---|
128 | your processor supports Virtualization Technology (VT):
|
---|
129 | </para>
|
---|
130 |
|
---|
131 | <screen><userinput>egrep '^flags.*(vmx|svm)' /proc/cpuinfo</userinput></screen>
|
---|
132 |
|
---|
133 | <para>
|
---|
134 | If you get any output, you have VT technology (vmx for Intel
|
---|
135 | processors and svm for AMD processors). You then need to go into your
|
---|
136 | system BIOS and ensure it is enabled. After enabing, reboot back to your
|
---|
137 | LFS instance.
|
---|
138 | </para>
|
---|
139 |
|
---|
140 | </sect2>
|
---|
141 |
|
---|
142 | <sect2 role="kernel" id='qemu-kernel'>
|
---|
143 | <title>Kernel Configuration</title>
|
---|
144 |
|
---|
145 | <para>
|
---|
146 | Enable the following options in the kernel configuration and
|
---|
147 | recompile the kernel if necessary:
|
---|
148 | </para>
|
---|
149 |
|
---|
150 | <screen><literal>[*] Virtualization: ---> [CONFIG_VIRTUALIZATION]
|
---|
151 | <*/M> Kernel-based Virtual Machine (KVM) support [CONFIG_KVM]
|
---|
152 | <*/M> KVM for Intel processors support [CONFIG_KVM_INTEL]
|
---|
153 | <*/M> KVM for AMD processors support [CONFIG_KVM_AMD]</literal></screen>
|
---|
154 |
|
---|
155 | <indexterm zone="qemu qemu-kernel">
|
---|
156 | <primary sortas="d-qemu">qemu</primary>
|
---|
157 | </indexterm>
|
---|
158 |
|
---|
159 | <para>
|
---|
160 | The Intel or AMD settings are not both required, but the one matching
|
---|
161 | your system processor is required.
|
---|
162 | </para>
|
---|
163 |
|
---|
164 | <para>
|
---|
165 | To use the <quote>bridge</quote> network device, as explained below,
|
---|
166 | check that <xref linkend='bridgeutils'/> is installed
|
---|
167 | and the following options in the kernel configuration are enabled:
|
---|
168 | </para>
|
---|
169 |
|
---|
170 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
171 | Networking options --->
|
---|
172 | <*/M> 802.1d Ethernet Bridging [CONFIG_BRIDGE]
|
---|
173 | Device Drivers --->
|
---|
174 | [*] Network device support ---> [CONFIG_NETDEVICES]
|
---|
175 | <*/M> Universal TUN/TAP device driver support [CONFIG_TUN]</literal></screen>
|
---|
176 |
|
---|
177 | </sect2>
|
---|
178 |
|
---|
179 | <sect2 role="installation">
|
---|
180 | <title>Installation of qemu</title>
|
---|
181 |
|
---|
182 | <para revision="sysv">
|
---|
183 | You will need a dedicated group that will contain users (other than root)
|
---|
184 | allowed to access the KVM device. Create this group by running the
|
---|
185 | following command as the
|
---|
186 | <systemitem class="username">root</systemitem> user:
|
---|
187 | </para>
|
---|
188 |
|
---|
189 | <screen role="root" revision="sysv"><userinput>groupadd -g 61 kvm</userinput></screen>
|
---|
190 |
|
---|
191 | <para>
|
---|
192 | Add any users that might use the KVM device to that group:
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <screen role="root"><userinput>usermod -a -G kvm <replaceable><username></replaceable></userinput></screen>
|
---|
196 |
|
---|
197 | <para>
|
---|
198 | Install <application>qemu</application> by running the following
|
---|
199 | commands:
|
---|
200 | </para>
|
---|
201 |
|
---|
202 | <note>
|
---|
203 | <para>
|
---|
204 | Qemu is capable of running many targets. The build process
|
---|
205 | is also capable of building multiple targets at one time in a
|
---|
206 | comma delimited list assigned to <option>--target-list</option>. Run
|
---|
207 | <command>./configure --help</command> to get a complete list of
|
---|
208 | available targets.
|
---|
209 | </para>
|
---|
210 | </note>
|
---|
211 |
|
---|
212 |
|
---|
213 | <screen><userinput>if [ $(uname -m) = i686 ]; then
|
---|
214 | QEMU_ARCH=i386-softmmu
|
---|
215 | else
|
---|
216 | QEMU_ARCH=x86_64-softmmu
|
---|
217 | fi
|
---|
218 |
|
---|
219 |
|
---|
220 | mkdir -vp build &&
|
---|
221 | cd build &&
|
---|
222 |
|
---|
223 | ../configure --prefix=/usr \
|
---|
224 | --sysconfdir=/etc \
|
---|
225 | --target-list=$QEMU_ARCH \
|
---|
226 | --audio-drv-list=alsa \
|
---|
227 | --docdir=/usr/share/doc/qemu-&qemu-version; &&
|
---|
228 |
|
---|
229 | unset QEMU_ARCH &&
|
---|
230 |
|
---|
231 | make</userinput></screen>
|
---|
232 |
|
---|
233 | <para>
|
---|
234 | To run the built in tests, run <command>make V=1 -k check</command>.
|
---|
235 | </para>
|
---|
236 |
|
---|
237 | <para>
|
---|
238 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
239 | </para>
|
---|
240 |
|
---|
241 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
242 |
|
---|
243 | <para>
|
---|
244 | You will also need to add an Udev rule so that the KVM device gets correct
|
---|
245 | permissions:
|
---|
246 | </para>
|
---|
247 |
|
---|
248 | <screen role="root"><userinput>cat > /lib/udev/rules.d/65-kvm.rules << "EOF"
|
---|
249 | <literal>KERNEL=="kvm", GROUP="kvm", MODE="0660"</literal>
|
---|
250 | EOF</userinput></screen>
|
---|
251 |
|
---|
252 | <para>
|
---|
253 | Change the permissions and ownership of a helper script, which is needed
|
---|
254 | when using the <quote>bridge</quote> network device (see below):
|
---|
255 | </para>
|
---|
256 |
|
---|
257 | <screen role="root"><userinput>chgrp kvm /usr/libexec/qemu-bridge-helper &&
|
---|
258 | chmod 4750 /usr/libexec/qemu-bridge-helper</userinput></screen>
|
---|
259 |
|
---|
260 | <note>
|
---|
261 | <para>
|
---|
262 | For convenience you may want to create a symbolic link to run
|
---|
263 | the installed program. For instance:
|
---|
264 | </para>
|
---|
265 |
|
---|
266 | <screen role="root"><userinput>ln -sv qemu-system-`uname -m` /usr/bin/qemu</userinput></screen>
|
---|
267 | </note>
|
---|
268 |
|
---|
269 | </sect2>
|
---|
270 |
|
---|
271 | <sect2 role="commands">
|
---|
272 | <title>Command Explanations</title>
|
---|
273 |
|
---|
274 | <!-- Not used anymore
|
---|
275 | <para>
|
---|
276 | <command>sed ... util/memfd.c</command>: This command fixes a conflict
|
---|
277 | introduced with glibc-2.27.
|
---|
278 | </para>
|
---|
279 | -->
|
---|
280 | <para>
|
---|
281 | <parameter>--audio-drv-list=alsa</parameter>: This switch sets the audio
|
---|
282 | driver to ALSA. See below for enabling other audio drivers.
|
---|
283 | </para>
|
---|
284 |
|
---|
285 | <para>
|
---|
286 | <option>--audio-drv-list=pa</option>: This switch sets the audio
|
---|
287 | driver to pulseaudio. For other drivers see the --audio-drv-list list in
|
---|
288 | <command>configure</command>'s help output. The default audio driver is
|
---|
289 | OSS. To enable support for both alsa and pulseaudio, use
|
---|
290 | <option>--audio-drv-list=alsa,pa</option>.
|
---|
291 | </para>
|
---|
292 |
|
---|
293 | <!-- this appears to be rejected in 4.1.0
|
---|
294 | ERROR: unknown option \-\-with-gtkabi=3.0
|
---|
295 | <para>
|
---|
296 | <option>\-\-with-gtkabi=3.0</option>: builds with GTK+-3 if both GTK+-2
|
---|
297 | and GTK+-3 are installed.
|
---|
298 | </para> -->
|
---|
299 |
|
---|
300 | </sect2>
|
---|
301 |
|
---|
302 | <sect2 role="using">
|
---|
303 | <title>Using Qemu</title>
|
---|
304 |
|
---|
305 | <para>
|
---|
306 | Since using qemu means using a virtual computer, the steps to set up
|
---|
307 | the virtual machine are in close analogy with those to set up a real
|
---|
308 | computer. You'll need to decide about CPU, memory, disk, USB devices,
|
---|
309 | network card(s), screen size, etc. Once the <quote>hardware</quote> is
|
---|
310 | decided, you'll have for example to choose how to connect the machine
|
---|
311 | to internet, and/or to install an OS. In the following, we show basic
|
---|
312 | ways of performing those steps. But qemu is much more than this, and it
|
---|
313 | is strongly advised to read the qemu documentation in
|
---|
314 | <filename>/usr/share/doc/qemu-&qemu-version;/qemu-doc.html</filename>.
|
---|
315 | </para>
|
---|
316 |
|
---|
317 | <note>
|
---|
318 | <para>
|
---|
319 | It is standard practice to name the computer running qemu
|
---|
320 | <quote>host</quote> and the emulated machine running under qemu the
|
---|
321 | <quote>guest</quote>. We'll use those notations in the following.
|
---|
322 | </para>
|
---|
323 | </note>
|
---|
324 |
|
---|
325 | <note>
|
---|
326 | <para>
|
---|
327 | The following instructions assume the optional symbolic link,
|
---|
328 | <filename>qemu</filename>, has been created. Additionally,
|
---|
329 | <command>qemu</command> must be run from an X Window System based
|
---|
330 | terminal (either locally or over ssh).
|
---|
331 | </para>
|
---|
332 | </note>
|
---|
333 |
|
---|
334 | <bridgehead renderas="sect3">Disk</bridgehead>
|
---|
335 | <para>
|
---|
336 | A virtual disk may be set up in the following way:
|
---|
337 | </para>
|
---|
338 |
|
---|
339 | <screen><userinput>VDISK_SIZE=<replaceable>50G</replaceable>
|
---|
340 | VDISK_FILENAME=<replaceable>vdisk.img</replaceable>
|
---|
341 | qemu-img create -f qcow2 $VDISK_FILENAME $VDISK_SIZE</userinput></screen>
|
---|
342 |
|
---|
343 | <para>
|
---|
344 | The virtual disk size and filename should be ajusted as desired. The
|
---|
345 | actual size of the file will be less than specified, but will expand as
|
---|
346 | needed, so it is safe to put a high value.
|
---|
347 | </para>
|
---|
348 |
|
---|
349 | <bridgehead renderas="sect3">Operating System</bridgehead>
|
---|
350 | <para>
|
---|
351 | To install an operating system, download an iso image from your preferred
|
---|
352 | Linux distribution. For the purposes of this example, we'll use
|
---|
353 | <filename>Fedora-16-x86_64-Live-LXDE.iso</filename> in the current
|
---|
354 | directory. Run the following:
|
---|
355 | </para>
|
---|
356 |
|
---|
357 | <screen><userinput>qemu -enable-kvm \
|
---|
358 | -drive file=$VDISK_FILENAME \
|
---|
359 | -cdrom Fedora-16-x86_64-Live-LXDE.iso \
|
---|
360 | -boot d \
|
---|
361 | -m <replaceable>1G</replaceable></userinput></screen>
|
---|
362 |
|
---|
363 | <para>
|
---|
364 | Follow the normal installation procedures for the chosen distribution.
|
---|
365 | The <parameter>-boot</parameter> option specifies the boot order of
|
---|
366 | drives as a string of drive letters. Valid drive letters are: a, b
|
---|
367 | (floppy 1 and 2), c (first hard disk), d (first CD-ROM). The
|
---|
368 | <parameter>-m</parameter> option is the amount of memory to use for the
|
---|
369 | virtual machine. The choice depends on the load of the host. Modern
|
---|
370 | distributions should be comfortable with 1GB.
|
---|
371 | The <parameter>-enable-kvm</parameter> option allows hardware
|
---|
372 | acceleration. Without this switch, the emulation is much slower.
|
---|
373 | </para>
|
---|
374 |
|
---|
375 | <bridgehead renderas="sect3">Defining the virtual hardware</bridgehead>
|
---|
376 | <para>
|
---|
377 | The virtual machine hardware is defined by the qemu command line.
|
---|
378 | An example command is given below:
|
---|
379 | </para>
|
---|
380 |
|
---|
381 | <screen><userinput>qemu -enable-kvm \
|
---|
382 | -smp 4 \
|
---|
383 | -cpu host \
|
---|
384 | -m 1G \
|
---|
385 | -drive file=$VDISK_FILENAME \
|
---|
386 | -cdrom grub-img.iso \
|
---|
387 | -boot order=c,once=d,menu=on \
|
---|
388 | -net nic,netdev=net0 \
|
---|
389 | -netdev user,id=net0 \
|
---|
390 | -soundhw ac97 \
|
---|
391 | -vga std \
|
---|
392 | -serial mon:stdio \
|
---|
393 | -name "fedora-16"</userinput></screen>
|
---|
394 |
|
---|
395 | <bridgehead renderas="sect3">Meaning of the command line options</bridgehead>
|
---|
396 | <para>
|
---|
397 | <parameter>-enable-kvm</parameter>: enable full KVM virtualization
|
---|
398 | support. On some hardware, it may be necessary to add the undocumented
|
---|
399 | <option>-machine smm=off</option> option in order to enable KVM.
|
---|
400 | </para>
|
---|
401 |
|
---|
402 | <para>
|
---|
403 | <parameter>-smp <N></parameter>: enable symmetric multiprocessing
|
---|
404 | with <N> CPUs.
|
---|
405 | </para>
|
---|
406 |
|
---|
407 | <para>
|
---|
408 | <parameter>-cpu <model></parameter>: simulate CPU <model>.
|
---|
409 | the list of supported models can be obtained with <option>-cpu
|
---|
410 | help</option>.
|
---|
411 | </para>
|
---|
412 |
|
---|
413 | <para>
|
---|
414 | <parameter>-drive file=<filename></parameter>: defines a virtual
|
---|
415 | disk whose image is stored in <filename><filename></filename>.
|
---|
416 | </para>
|
---|
417 |
|
---|
418 | <para>
|
---|
419 | <parameter>-cdrom grub-img.iso</parameter>: defines an iso formated file
|
---|
420 | to use as a cdrom. Here we use a grub rescue disk, which may turn handy
|
---|
421 | when something goes wrong at boot time.
|
---|
422 | </para>
|
---|
423 |
|
---|
424 | <para>
|
---|
425 | <parameter>-boot order=c,once=d,menu=on</parameter>: defines the boot
|
---|
426 | order for the virtual BIOS.
|
---|
427 | </para>
|
---|
428 |
|
---|
429 | <para>
|
---|
430 | <parameter>-net nic,netdev=<netid></parameter>: defines a network
|
---|
431 | card connected to the network device with id <netid>.
|
---|
432 | </para>
|
---|
433 |
|
---|
434 | <para>
|
---|
435 | <parameter>-netdev user,id=<netid></parameter>: defines the
|
---|
436 | network <quote>user</quote> device. This is a virtual local network
|
---|
437 | with addresses 10.0.2.0/24, where the host has address 10.0.2.2 and
|
---|
438 | acts as a gateway to internet, and with a name server at address
|
---|
439 | 10.0.2.3, and an smb server at address 10.0.2.4. A builtin DHCP server
|
---|
440 | can allocate addresses between 10.0.2.15 and 10.0.2.31.
|
---|
441 | </para>
|
---|
442 |
|
---|
443 | <para>
|
---|
444 | <parameter>-soundhw <model></parameter>: defines the soundcard
|
---|
445 | model. The list may be obtained with <option>-soundhw help</option>.
|
---|
446 | </para>
|
---|
447 |
|
---|
448 | <para>
|
---|
449 | <parameter>-vga <type></parameter>: defines the type of vga card
|
---|
450 | to emulate.
|
---|
451 | </para>
|
---|
452 |
|
---|
453 | <para>
|
---|
454 | <parameter>-serial mon:stdio</parameter>: sends the serial port of the
|
---|
455 | guest (<filename>/dev/ttyS0</filename> on linux guests), multiplexed with
|
---|
456 | the qemu monitor, to the standard input and output of the qemu
|
---|
457 | process.
|
---|
458 | </para>
|
---|
459 |
|
---|
460 | <para>
|
---|
461 | <parameter>-name <name></parameter>: sets the name of the guest.
|
---|
462 | This name is displayed in the guest window caption. It may be useful
|
---|
463 | if you run several guests at the same time.
|
---|
464 | </para>
|
---|
465 |
|
---|
466 | <bridgehead renderas="sect3">Controlling the Emulated Display</bridgehead>
|
---|
467 | <para>
|
---|
468 | It may happen that the guest window displayed by qemu does not correspond
|
---|
469 | to the full capability of the emulated vga card. For example, the vmware
|
---|
470 | card is 1600x900 capable, but only 1024x768 is displayed by default.
|
---|
471 | A suitable Xorg configuration on the guest allows to use the full size
|
---|
472 | (Note that the Xorg video driver to use is <xref
|
---|
473 | linkend="xorg-vmware-driver"/>):
|
---|
474 | </para>
|
---|
475 |
|
---|
476 | <screen role="root"><userinput>cat > /usr/share/X11/xorg.conf.d/20-vmware.conf << "EOF"
|
---|
477 | <literal>Section "Monitor"
|
---|
478 | Identifier "Monitor0"
|
---|
479 | # cvt 1600 900
|
---|
480 | # 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz
|
---|
481 | Modeline "1600x900" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
|
---|
482 | Option "PreferredMode" "1600x900"
|
---|
483 | HorizSync 1-200
|
---|
484 | VertRefresh 1-200
|
---|
485 | EndSection
|
---|
486 |
|
---|
487 | Section "Device"
|
---|
488 | Identifier "VMware SVGA II Adapter"
|
---|
489 | Option "Monitor" "default"
|
---|
490 | Driver "vmware"
|
---|
491 | EndSection
|
---|
492 |
|
---|
493 | Section "Screen"
|
---|
494 | Identifier "Default Screen"
|
---|
495 | Device "VMware SVGA II Adapter"
|
---|
496 | Monitor "Monitor0"
|
---|
497 |
|
---|
498 | SubSection "Display"
|
---|
499 | Depth 24
|
---|
500 | Modes "1600x900" "1440x900" "1366x768" "1280x720" "800x480"
|
---|
501 | EndSubSection
|
---|
502 |
|
---|
503 | EndSection</literal>
|
---|
504 | EOF</userinput></screen>
|
---|
505 |
|
---|
506 | <para>
|
---|
507 | New sizes will be available besides the native ones. You need to
|
---|
508 | restart X in order to have the new sizes available.
|
---|
509 | </para>
|
---|
510 |
|
---|
511 | <bridgehead renderas="sect3">Networking</bridgehead>
|
---|
512 | <para>
|
---|
513 | The above solution for networking allows the guest to access the local
|
---|
514 | network through the host (and possibly to access internet through the
|
---|
515 | local routers), but the converse is not true. Not even the host can
|
---|
516 | access the guest, unless port forwarding is enabled. And in the case
|
---|
517 | several guests are running, they cannot communicate with each other.
|
---|
518 | Other network devices can be used for this purpose. For example, there
|
---|
519 | is the <quote>socket</quote> device, which allows several guests to
|
---|
520 | share a common virtual network. In the following, we describe in more
|
---|
521 | details how to set up the <quote>bridge</quote> device, which allows
|
---|
522 | the guests to appear as if connected to the local network. All the
|
---|
523 | commands below should be run as the <systemitem
|
---|
524 | class="username">root</systemitem> user.
|
---|
525 | </para>
|
---|
526 |
|
---|
527 | <para revision="sysv">
|
---|
528 | Set up bridging with <xref linkend="bridgeutils"/>. Only the physical
|
---|
529 | interface(s) should be set up at boot. The virtual interface(s) will be
|
---|
530 | added as needed when qemu is started.
|
---|
531 | </para>
|
---|
532 |
|
---|
533 | <para revision="systemd">
|
---|
534 | <!-- On SYS-V, IP_FORWARD is enabled by the bridge script. -->
|
---|
535 | Allow the host to forward IP packets:
|
---|
536 | </para>
|
---|
537 |
|
---|
538 | <screen role="root"
|
---|
539 | revision="systemd"><userinput>sysctl -w net.ipv4.ip_forward=1</userinput></screen>
|
---|
540 |
|
---|
541 | <para revision="systemd">
|
---|
542 | To make this permanent, add the command to
|
---|
543 | <filename>/etc/sysctl.d/60-net-forward.conf:</filename>
|
---|
544 | </para>
|
---|
545 |
|
---|
546 | <screen role="root"
|
---|
547 | revision="systemd"><userinput>cat >> /etc/sysctl.d/60-net-forward.conf << EOF
|
---|
548 | <literal>net.ipv4.ip_forward=1</literal>
|
---|
549 | EOF</userinput></screen>
|
---|
550 |
|
---|
551 | <para>
|
---|
552 | Set up a required configuration file:
|
---|
553 | </para>
|
---|
554 |
|
---|
555 | <!-- /etc/qemu has not been installed by "make install" since version 2.4 -->
|
---|
556 | <screen role="root"><userinput>install -vdm 755 /etc/qemu &&
|
---|
557 | echo allow br0 > /etc/qemu/bridge.conf</userinput></screen>
|
---|
558 |
|
---|
559 | <para>
|
---|
560 | In the command above, replace the switch <parameter>-netdev user,...
|
---|
561 | </parameter> with <parameter>-netdev bridge,id=net0</parameter>.
|
---|
562 | </para>
|
---|
563 |
|
---|
564 | </sect2>
|
---|
565 |
|
---|
566 | <sect2 role="content">
|
---|
567 | <title>Contents</title>
|
---|
568 |
|
---|
569 | <segmentedlist>
|
---|
570 | <segtitle>Installed Programs</segtitle>
|
---|
571 | <segtitle>Installed Library</segtitle>
|
---|
572 | <segtitle>Installed Directories</segtitle>
|
---|
573 |
|
---|
574 | <seglistitem>
|
---|
575 | <seg>
|
---|
576 | ivshmem-client,
|
---|
577 | ivshmem-server,
|
---|
578 | qemu (symlink),
|
---|
579 | qemu-ga,
|
---|
580 | qemu-img,
|
---|
581 | qemu-io,
|
---|
582 | qemu-nbd,
|
---|
583 | qemu-system-<arch>, and
|
---|
584 | virtfs-proxy-helper
|
---|
585 | </seg>
|
---|
586 | <seg>None</seg>
|
---|
587 | <seg>
|
---|
588 | /usr/share/qemu and
|
---|
589 | /usr/share/doc/qemu-&qemu-version;
|
---|
590 | </seg>
|
---|
591 | </seglistitem>
|
---|
592 | </segmentedlist>
|
---|
593 |
|
---|
594 | <variablelist>
|
---|
595 | <bridgehead renderas="sect3">Short Description</bridgehead>
|
---|
596 | <?dbfo list-presentation="list"?>
|
---|
597 | <?dbhtml list-presentation="table"?>
|
---|
598 |
|
---|
599 | <varlistentry id="ivshmem-client">
|
---|
600 | <term><command>ivshmem-client</command></term>
|
---|
601 | <listitem>
|
---|
602 | <para>
|
---|
603 | is a standalone client for using the ivshmem device.
|
---|
604 | </para>
|
---|
605 | <indexterm zone="qemu ivshmem-client">
|
---|
606 | <primary sortas="b-ivshmem-client">ivshmem-client</primary>
|
---|
607 | </indexterm>
|
---|
608 | </listitem>
|
---|
609 | </varlistentry>
|
---|
610 |
|
---|
611 | <varlistentry id="ivshmem-server">
|
---|
612 | <term><command>ivshmem-server</command></term>
|
---|
613 | <listitem>
|
---|
614 | <para>
|
---|
615 | is an example server for the ivshmem device.
|
---|
616 | </para>
|
---|
617 | <indexterm zone="qemu ivshmem-server">
|
---|
618 | <primary sortas="b-ivshmem-server">ivshmem-server</primary>
|
---|
619 | </indexterm>
|
---|
620 | </listitem>
|
---|
621 | </varlistentry>
|
---|
622 |
|
---|
623 | <varlistentry id="qemu-edid">
|
---|
624 | <term><command>qemu-edid</command></term>
|
---|
625 | <listitem>
|
---|
626 | <para>
|
---|
627 | is a test tool for the qemu EDID generator.
|
---|
628 | </para>
|
---|
629 | <indexterm zone="qemu qemu-edid">
|
---|
630 | <primary sortas="b-qemu-edid">qemu-edid</primary>
|
---|
631 | </indexterm>
|
---|
632 | </listitem>
|
---|
633 | </varlistentry>
|
---|
634 |
|
---|
635 | <varlistentry id="qemu-ga">
|
---|
636 | <term><command>qemu-ga</command></term>
|
---|
637 | <listitem>
|
---|
638 | <para>
|
---|
639 | implements support for QMP (QEMU Monitor Protocol) commands and
|
---|
640 | events that terminate and originate respectively within the guest
|
---|
641 | using an agent built as part of QEMU.
|
---|
642 | </para>
|
---|
643 | <indexterm zone="qemu qemu-ga">
|
---|
644 | <primary sortas="b-qemu-ga">qemu-ga</primary>
|
---|
645 | </indexterm>
|
---|
646 | </listitem>
|
---|
647 | </varlistentry>
|
---|
648 |
|
---|
649 | <varlistentry id="qemu-img">
|
---|
650 | <term><command>qemu-img</command></term>
|
---|
651 | <listitem>
|
---|
652 | <para>
|
---|
653 | provides commands to manage QEMU disk images.
|
---|
654 | </para>
|
---|
655 | <indexterm zone="qemu qemu-img">
|
---|
656 | <primary sortas="b-qemu-img">qemu-img</primary>
|
---|
657 | </indexterm>
|
---|
658 | </listitem>
|
---|
659 | </varlistentry>
|
---|
660 |
|
---|
661 | <varlistentry id="qemu-io">
|
---|
662 | <term><command>qemu-io</command></term>
|
---|
663 | <listitem>
|
---|
664 | <para>
|
---|
665 | is a diagnostic and manipulation program for (virtual) memory
|
---|
666 | media. It is still at an early stage of development.
|
---|
667 | </para>
|
---|
668 | <indexterm zone="qemu qemu-io">
|
---|
669 | <primary sortas="b-qemu-io">qemu-io</primary>
|
---|
670 | </indexterm>
|
---|
671 | </listitem>
|
---|
672 | </varlistentry>
|
---|
673 |
|
---|
674 | <varlistentry id="qemu-nbd">
|
---|
675 | <term><command>qemu-nbd</command></term>
|
---|
676 | <listitem>
|
---|
677 | <para>
|
---|
678 | exports Qemu disk images using the QEMU Disk Network Block
|
---|
679 | Device (NBD) protocol.
|
---|
680 | </para>
|
---|
681 | <indexterm zone="qemu qemu-nbd">
|
---|
682 | <primary sortas="b-qemu-nbd">qemu-nbd</primary>
|
---|
683 | </indexterm>
|
---|
684 | </listitem>
|
---|
685 | </varlistentry>
|
---|
686 |
|
---|
687 | <varlistentry id="qemu-system">
|
---|
688 | <term><command>qemu-system-x86_64</command></term>
|
---|
689 | <listitem>
|
---|
690 | <para>
|
---|
691 | is the QEMU PC System emulator.
|
---|
692 | </para>
|
---|
693 | <indexterm zone="qemu qemu-system">
|
---|
694 | <primary sortas="b-qemu-system">qemu-system-x86_64</primary>
|
---|
695 | </indexterm>
|
---|
696 | </listitem>
|
---|
697 | </varlistentry>
|
---|
698 |
|
---|
699 | <varlistentry id="virtfs-proxy-helper">
|
---|
700 | <term><command>virtfs-proxy-helper</command></term>
|
---|
701 | <listitem>
|
---|
702 | <para>
|
---|
703 | creates a socket pair or a named socket. QEMU and proxy helper
|
---|
704 | communicate using this socket. QEMU proxy fs driver sends
|
---|
705 | filesystem request to proxy helper and receives the response
|
---|
706 | from it.
|
---|
707 | </para>
|
---|
708 | <indexterm zone="qemu virtfs-proxy-helper">
|
---|
709 | <primary sortas="b-virtfs-proxy-helper">virtfs-proxy-helper</primary>
|
---|
710 | </indexterm>
|
---|
711 | </listitem>
|
---|
712 | </varlistentry>
|
---|
713 |
|
---|
714 | </variablelist>
|
---|
715 |
|
---|
716 | </sect2>
|
---|
717 |
|
---|
718 | </sect1>
|
---|