Author: pierre Date: Wed Dec 28 02:12:33 2016 New Revision: 18104 Log: sudo-1.8.19p1 qemu-2.8.0 gcc-6.3.0 llvm-3.9.1 lxterminal-0.3.0
Modified: trunk/BOOK/general.ent trunk/BOOK/general/prog/gcc-ada.xml trunk/BOOK/general/prog/gcc-java.xml trunk/BOOK/general/prog/gcc.xml trunk/BOOK/general/prog/llvm.xml trunk/BOOK/introduction/welcome/changelog.xml trunk/BOOK/lxde/apps/lxterminal.xml trunk/BOOK/packages.ent trunk/BOOK/postlfs/security/sudo.xml trunk/BOOK/postlfs/virtualization/qemu.xml Modified: trunk/BOOK/general.ent ============================================================================== --- trunk/BOOK/general.ent Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/general.ent Wed Dec 28 02:12:33 2016 (r18104) @@ -1,12 +1,12 @@ <!-- $LastChangedBy$ $Date$ --> -<!ENTITY day "27"> <!-- Always 2 digits --> +<!ENTITY day "28"> <!-- Always 2 digits --> <!ENTITY month "12"> <!-- Always 2 digits --> <!ENTITY year "2016"> <!ENTITY copyrightdate "2001-&year;"> <!ENTITY copyholder "The BLFS Development Team"> <!ENTITY version "&year;-&month;-&day;"> -<!ENTITY releasedate "December 27th &year;"> +<!ENTITY releasedate "December 28th &year;"> <!ENTITY pubdate "&year;-&month;-&day;"> <!-- metadata req. by TLDP --> <!ENTITY blfs-version "svn"> <!-- svn|[release #] --> <!ENTITY lfs-version "development"> <!-- x.y|development --> Modified: trunk/BOOK/general/prog/gcc-ada.xml ============================================================================== --- trunk/BOOK/general/prog/gcc-ada.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/general/prog/gcc-ada.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -6,10 +6,10 @@ <!ENTITY gcc-download-http "http://ftpmirror.gnu.org/gcc/gcc-&gcc-ada-version;/gcc-&gcc-ada-version;.tar.bz2"> <!ENTITY gcc-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-ada-version;/gcc-&gcc-ada-version;.tar.bz2"> - <!ENTITY gcc-md5sum "9768625159663b300ae4de2f4745fcc4"> + <!ENTITY gcc-md5sum "677a7623c7ef6ab99881bc4e048debb6"> <!ENTITY gcc-size "95 MB"> - <!ENTITY gcc-ada-buildsize "6.3 GB (1.1 GB added if GNAT install dir is not removed)"> - <!ENTITY gcc-ada-time "42 SBU (with tests and parallelism=5)"> + <!ENTITY gcc-ada-buildsize "7.8 GB (1.1 GB added if GNAT install dir is not removed)"> + <!ENTITY gcc-ada-time "56 SBU (with tests and parallelism=4)"> <!ENTITY gnat-download-http "https://libre.adacore.com/download/"> <!ENTITY gnat-64-download-http "http://mirrors.cdn.adacore.com/art/5739cefdc7a447658e0b016b"> @@ -117,7 +117,7 @@ You will need to install <application>GNAT</application> temporarily to satisfy the circular dependency. You may point your browser to the <ulink url="&gnat-download-http;">AdaCore download - page</ulink>, choose your platform and 2015 (64 bit machines) or + page</ulink>, choose your platform and 2016 (64 bit machines) or 2014 (32 bit machines), then select the file to download. Alternatively, direct links to the 64 bit and 32 bit linux versions are given below. Modified: trunk/BOOK/general/prog/gcc-java.xml ============================================================================== --- trunk/BOOK/general/prog/gcc-java.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/general/prog/gcc-java.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -6,15 +6,15 @@ <!ENTITY gcc-java-download-http "http://ftpmirror.gnu.org/gcc/gcc-&gcc-java-version;/gcc-&gcc-java-version;.tar.bz2"> <!ENTITY gcc-java-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-java-version;/gcc-&gcc-java-version;.tar.bz2"> - <!ENTITY gcc-java-md5sum "9768625159663b300ae4de2f4745fcc4"> + <!ENTITY gcc-java-md5sum "677a7623c7ef6ab99881bc4e048debb6"> <!ENTITY gcc-java-size "95 MB"> - <!ENTITY gcc-java-buildsize "4.2 GB"> - <!ENTITY gcc-java-time "29 SBU (with tests and parallelism=4)"> + <!ENTITY gcc-java-buildsize "4.5 GB"> + <!ENTITY gcc-java-time "34 SBU (with tests and parallelism=4)"> <!-- ecj-latest points to 4.5 while ecj-4.9 is available --> <!ENTITY ecj-download-ftp "ftp://sourceware.org/pub/java/ecj-4.9.jar"> - <!ENTITY antlr-version "4.5.1"> + <!ENTITY antlr-version "4.6"> <!ENTITY antlr-download-http "http://www.antlr.org/download/antlr-&antlr-version;-complete.jar"> ]> Modified: trunk/BOOK/general/prog/gcc.xml ============================================================================== --- trunk/BOOK/general/prog/gcc.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/general/prog/gcc.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -6,10 +6,10 @@ <!ENTITY gcc-download-http "http://ftpmirror.gnu.org/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> <!ENTITY gcc-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2"> - <!ENTITY gcc-md5sum "9768625159663b300ae4de2f4745fcc4"> + <!ENTITY gcc-md5sum "677a7623c7ef6ab99881bc4e048debb6"> <!ENTITY gcc-size "95 MB"> - <!ENTITY gcc-buildsize "7.3 GB (with tests)"> - <!ENTITY gcc-time "49 SBU (with tests and parallelism=4)"> + <!ENTITY gcc-buildsize "7.7 GB (with tests)"> + <!ENTITY gcc-time "58 SBU (with tests and parallelism=4)"> ]> <sect1 id="gcc" xreflabel="GCC-&gcc-version;"> @@ -331,10 +331,7 @@ libobjc.{so,a}, and numerous other run-time libraries and executables </seg> <seg> - /usr/include/c++/&gcc-version;, - /usr/libexec/gcc/<arch-triplet>/&gcc-version;, - /usr/lib/gcc/<arch-triplet>/&gcc-version;, - /usr/lib/go/&gcc-version;, and /usr/share/gcc-&gcc-version; + /usr/lib/go/&gcc-version; </seg> </seglistitem> </segmentedlist> Modified: trunk/BOOK/general/prog/llvm.xml ============================================================================== --- trunk/BOOK/general/prog/llvm.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/general/prog/llvm.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -6,19 +6,19 @@ <!ENTITY llvm-download-http "http://llvm.org/releases/&llvm-version;/llvm-&llvm-version;.src.tar.xz"> <!ENTITY llvm-download-ftp " "> - <!ENTITY llvm-md5sum "f2093e98060532449eb7d2fcfd0bc6c6"> + <!ENTITY llvm-md5sum "3259018a7437e157f3642df80f1983ea"> <!ENTITY llvm-size "17 MB"> - <!ENTITY llvm-buildsize "1.2 GB (with Clang, add 7.2 GB for tests)"> - <!ENTITY llvm-time "44 SBU (with Clang, add 13 SBU for tests)"> + <!ENTITY llvm-buildsize "2.2 GB (with Clang, add 7.3 GB for tests)"> + <!ENTITY llvm-time "20 SBU (with Clang and parallelism=4, add 5 SBU for tests)"> <!ENTITY clang-download-http "http://llvm.org/releases/&llvm-version;/cfe-&llvm-version;.src.tar.xz"> - <!ENTITY clang-md5sum "29e1d86bee422ab5345f5e9fb808d2dc"> + <!ENTITY clang-md5sum "45713ec5c417ed9cad614cd283d786a1"> <!ENTITY clang-size "10 MB"> <!ENTITY rt-version "&llvm-version;"> <!ENTITY compiler-rt-download-http "http://llvm.org/releases/&rt-version;/compiler-rt-&rt-version;.src.tar.xz"> - <!ENTITY compiler-rt-md5sum "b7ea34c9d744da16ffc0217b6990d095"> - <!ENTITY compiler-rt-size "1.4 MB"> + <!ENTITY compiler-rt-md5sum "aadc76e7e180fafb10fb729444e287a3"> + <!ENTITY compiler-rt-size "1.3 MB"> ]> <sect1 id="llvm" xreflabel="LLVM-&llvm-version;"> @@ -231,10 +231,10 @@ </para> <screen><userinput>make docs-clang-html docs-clang-man</userinput></screen> <para> -<!-- all tests pass for version 3.8.0--> - To test the results, issue: <command>make check-all</command>. + To test the results, issue: <command>make check-all</command>. Tests are + run using the maximum number of processors/threads available. Note that the Address Sanitizer tests are known to fail currently. -<!-- Some tests may fail for unknown reasons.--> +<!-- Still true for v 3.9.1 --> </para> <para> @@ -338,7 +338,7 @@ llvm-objdump, llvm-pdbdump, llvm-profdata, llvm-ranlib (symlink to llvm-ar), llvm-readobj, llvm-rtdyld, llvm-size, llvm-split, llvm-stress, llvm-symbolizer, llvm-tblgen, obj2yaml, opt, sancov, - scan-build, scan-view, verify-uselistorder, and yaml2obj + sanstats, scan-build, scan-view, verify-uselistorder, and yaml2obj </seg> <seg> BugpointPasses.so, LLVMHello.so, libLLVM.so, libLLVM*.a (57 @@ -800,6 +800,18 @@ </indexterm> </listitem> </varlistentry> + + <varlistentry id="sanstats"> + <term><command>sanstats</command></term> + <listitem> + <para> + is the sanitizer statistics processing tool. + </para> + <indexterm zone="llvm sanstats"> + <primary sortas="b-sanstats">sanstats</primary> + </indexterm> + </listitem> + </varlistentry> <varlistentry id="scan-build"> <term><command>scan-build</command></term> Modified: trunk/BOOK/introduction/welcome/changelog.xml ============================================================================== --- trunk/BOOK/introduction/welcome/changelog.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/introduction/welcome/changelog.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -42,6 +42,35 @@ </itemizedlist> </listitem> --> + + <listitem> + <para>December 28th, 2016</para> + <itemizedlist> + <listitem> + <para>[pierre] - Update to gcc-6.3.0, gcc-java-6.3.0 and + gcc-ada-6.3.0. Fixes + <ulink url="&blfs-ticket-root;8667">#8667</ulink>.</para> + </listitem> + <listitem> + <para>[pierre] - Update to qemu-2.8.0. Fixes + <ulink url="&blfs-ticket-root;8663">#8663</ulink>. Rework + the <quote>Using</quote> part to correspond to recent versions.</para> + </listitem> + <listitem> + <para>[pierre] - Update to lxterminal-0.3.0. Fixes + <ulink url="&blfs-ticket-root;8659">#8659</ulink>.</para> + </listitem> + <listitem> + <para>[pierre] - Update to sudo-1.8.19p1. Fixes + <ulink url="&blfs-ticket-root;8657">#8657</ulink>.</para> + </listitem> + <listitem> + <para>[pierre] - Update to llvm-3.9.1. Fixes + <ulink url="&blfs-ticket-root;8651">#8651</ulink>.</para> + </listitem> + </itemizedlist> + </listitem> + <listitem> <para>December 27th, 2016</para> <itemizedlist> Modified: trunk/BOOK/lxde/apps/lxterminal.xml ============================================================================== --- trunk/BOOK/lxde/apps/lxterminal.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/lxde/apps/lxterminal.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -4,11 +4,11 @@ <!ENTITY % general-entities SYSTEM "../../general.ent"> %general-entities; - <!ENTITY lxterminal-download-http "&sourceforge-repo;/lxde/lxterminal-&lxterminal-version;.tar.gz"> + <!ENTITY lxterminal-download-http "&sourceforge-repo;/lxde/lxterminal-&lxterminal-version;.tar.xz"> <!ENTITY lxterminal-download-ftp " "> - <!ENTITY lxterminal-md5sum "e80ad1b6e26212f3d43908c2ad87ba4d"> - <!ENTITY lxterminal-size "244 KB"> - <!ENTITY lxterminal-buildsize "4 MB"> + <!ENTITY lxterminal-md5sum "235cda66f5a35654cb162dcc518a5171"> + <!ENTITY lxterminal-size "189 KB"> + <!ENTITY lxterminal-buildsize "4.6 MB"> <!ENTITY lxterminal-time "less than 0.1 SBU"> ]> Modified: trunk/BOOK/packages.ent ============================================================================== --- trunk/BOOK/packages.ent Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/packages.ent Wed Dec 28 02:12:33 2016 (r18104) @@ -40,7 +40,7 @@ <!ENTITY shadow-version "4.2.1"> <!ENTITY ssh-askpass-version "&openssh-version;"> <!ENTITY stunnel-version "5.38"> -<!ENTITY sudo-version "1.8.18p1"> +<!ENTITY sudo-version "1.8.19p1"> <!ENTITY tripwire-version "2.4.3.1"> <!-- Chapter 5 --> @@ -72,7 +72,7 @@ <!ENTITY zsh-version "5.3"> <!-- Chapter 8 Virtualization --> -<!ENTITY qemu-version "2.7.0"> +<!ENTITY qemu-version "2.8.0"> <!-- Part III --> <!-- Chapter 9 --> @@ -284,15 +284,15 @@ <!ENTITY doxygen-version "1.8.12"> <!ENTITY elfutils-version "0.167"> <!ENTITY expect-version "5.45"> -<!ENTITY gcc-version "6.2.0"> -<!ENTITY gcc-java-version "6.2.0"> -<!ENTITY gcc-ada-version "6.2.0"> +<!ENTITY gcc-version "6.3.0"> +<!ENTITY gcc-java-version "6.3.0"> +<!ENTITY gcc-ada-version "6.3.0"> <!ENTITY gc-version "7.6.0"> <!ENTITY gdb-version "7.12"> <!ENTITY git-version "2.11.0"> <!ENTITY guile-version "2.0.13"> <!ENTITY librep-version "0.92.6"> -<!ENTITY llvm-version "3.9.0"> +<!ENTITY llvm-version "3.9.1"> <!ENTITY lua-version "5.3.3"> <!ENTITY mercurial-version "4.0.1"> <!ENTITY nasm-version "2.12.02"> @@ -645,7 +645,7 @@ <!ENTITY lxinput-version "0.3.5"> <!ENTITY lxrandr-version "0.3.1"> <!ENTITY lxtask-version "0.1.7"> -<!ENTITY lxterminal-version "0.2.0"> +<!ENTITY lxterminal-version "0.3.0"> <!-- Chapter 40 --> <!ENTITY lxqt-version "0.11.0"> Modified: trunk/BOOK/postlfs/security/sudo.xml ============================================================================== --- trunk/BOOK/postlfs/security/sudo.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/postlfs/security/sudo.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -6,9 +6,9 @@ <!ENTITY sudo-download-http "http://www.sudo.ws/dist/sudo-&sudo-version;.tar.gz"> <!ENTITY sudo-download-ftp "ftp://ftp.sudo.ws/pub/sudo/sudo-&sudo-version;.tar.gz"> - <!ENTITY sudo-md5sum "28f5214d5bcb5af5710decb95184a0a6"> + <!ENTITY sudo-md5sum "1b34f00e604f4208e7004546f251ddf7"> <!ENTITY sudo-size "2.7 MB"> - <!ENTITY sudo-buildsize "28 MB (with tests)"> + <!ENTITY sudo-buildsize "29 MB (with tests)"> <!ENTITY sudo-time "0.4 SBU (with tests)"> ]> @@ -205,8 +205,8 @@ The <filename>sudoers</filename> file can be quite complicated. It is composed of two types of entries: aliases (basically variables) and user specifications (which specify who may run what). The installation - installs a default configuration that has no privileges installed for any - user. + installs a default configuration that has no privileges installed for + any user. </para> <para> @@ -216,7 +216,7 @@ </para> <screen># User alias specification -User_Alias ADMIN = YourLoginId +User_Alias ADMIN = <replaceable>YourLoginId</replaceable> # Allow people in group ADMIN to run all commands without a password ADMIN ALL = NOPASSWD: ALL</screen> @@ -230,17 +230,17 @@ The <application>Sudo</application> developers highly recommend using the <command>visudo</command> program to edit the <filename>sudoers</filename> file. This will provide basic sanity - checking like syntax parsing and file permission to avoid some possible - mistakes that could lead to a vulnerable configuration. + checking like syntax parsing and file permission to avoid some + possible mistakes that could lead to a vulnerable configuration. </para> </note> <para> If <application>PAM</application> is installed on the system, <application>Sudo</application> is built with - <application>PAM</application> support. In that case, issue the following - command as the <systemitem class="username">root</systemitem> user - to create the <application>PAM</application> configuration file: + <application>PAM</application> support. In that case, issue the + following command as the <systemitem class="username">root</systemitem> + user to create the <application>PAM</application> configuration file: </para> <screen role="root"><userinput>cat > /etc/pam.d/sudo << "EOF" Modified: trunk/BOOK/postlfs/virtualization/qemu.xml ============================================================================== --- trunk/BOOK/postlfs/virtualization/qemu.xml Tue Dec 27 14:32:26 2016 (r18103) +++ trunk/BOOK/postlfs/virtualization/qemu.xml Wed Dec 28 02:12:33 2016 (r18104) @@ -6,10 +6,10 @@ <!ENTITY qemu-download-http "http://wiki.qemu.org/download/qemu-&qemu-version;.tar.bz2"> <!ENTITY qemu-download-ftp " "> - <!ENTITY qemu-md5sum "08d4d06d1cb598efecd796137f4844ab"> - <!ENTITY qemu-size "26 MB"> - <!ENTITY qemu-buildsize "579 MB (with tests)"> - <!ENTITY qemu-time "3.5 SBU (with tests)"> + <!ENTITY qemu-md5sum "17940dce063b6ce450a12e719a6c9c43"> + <!ENTITY qemu-size "27 MB"> + <!ENTITY qemu-buildsize "435 MB (add 315 MB for tests)"> + <!ENTITY qemu-time "2.1 SBU (add 1.6 SBU for tests)"> ]> <sect1 id="qemu" xreflabel="qemu-&qemu-version;"> @@ -68,7 +68,7 @@ <bridgehead renderas="sect4">Recommended</bridgehead> <para role="recommended"> - <xref linkend="sdl"/> + <xref linkend="sdl2"/> </para> <bridgehead renderas="sect4">Optional</bridgehead> @@ -85,11 +85,12 @@ <xref linkend="libgcrypt"/>, <xref linkend="lzo"/>, <xref linkend="nettle"/>, - <xref linkend="nss"/> (for libcacard.so), <xref linkend="mesa"/>, <xref linkend="sdl"/>, - <xref linkend="vte"/>, and - <ulink url="http://www.libssh2.org">libssh2</ulink> + <xref linkend="vte"/> or <xref linkend="vte2"/>, +<!-- libcacard has been a standalone project since qemu-2.5.--> + <ulink url="https://www.spice-space.org/page/Libcacard">libcacard</ulink>, + and <ulink url="http://www.libssh2.org">libssh2</ulink> </para> <note> @@ -137,8 +138,11 @@ <para>The Intel or AMD settings are not both required, but the one matching your system processor is required.</para> - <para>For networking, check that <xref linkend='bridgeutils'/> is installed - and the following options in the kernel configuration are enabled:</para> + <para> + To use the <quote>bridge</quote> network device, as explained below, + check that <xref linkend='bridgeutils'/> is installed + and the following options in the kernel configuration are enabled: + </para> <screen><literal>[*] Networking support ---> [CONFIG_NET] Networking options ---> @@ -152,6 +156,21 @@ <sect2 role="installation"> <title>Installation of qemu</title> + <para> + You will need a dedicated group that will contain users (other than root) + allowed to access the KVM device. Create this group by running the + following command as the + <systemitem class="username">root</systemitem> user: + </para> + +<screen role="root"><userinput>groupadd -g 61 kvm</userinput></screen> + + <para> + Add any users that might use the KVM device to that group: + </para> + +<screen role="root"><userinput>usermod -a -G kvm <replaceable><username></replaceable></userinput></screen> + <para>Install <application>qemu</application> by running the following commands:</para> @@ -175,6 +194,7 @@ --sysconfdir=/etc \ --target-list=$QEMU_ARCH \ --audio-drv-list=alsa \ + --with-sdlabi=2.0 \ --docdir=/usr/share/doc/qemu-&qemu-version; && unset QEMU_ARCH && @@ -185,27 +205,14 @@ To run the built in tests, run <command>make V=1 -k check</command>. </para> - <para>Now, as the <systemitem class="username">root</systemitem> user:</para> - -<screen role="root"><userinput>make install</userinput></screen> - <para> - You will need a dedicated group that will contain users (other than root) - allowed to access the KVM device. Create this group by running the - following command as the - <systemitem class="username">root</systemitem> user: + Now, as the <systemitem class="username">root</systemitem> user: </para> -<screen role="root"><userinput>groupadd -g 61 kvm</userinput></screen> - - <para> - Add any users that might use the KVM device to that group: - </para> - -<screen role="root"><userinput>usermod -a -G kvm <replaceable><username></replaceable></userinput></screen> +<screen role="root"><userinput>make install</userinput></screen> <para> - You will also need to add a Udev rule so that the KVM device gets correct + You will also need to add an Udev rule so that the KVM device gets correct permissions: </para> @@ -213,6 +220,14 @@ <literal>KERNEL=="kvm", GROUP="kvm", MODE="0660"</literal> EOF</userinput></screen> + <para> + Change the permissions and ownership of a helper script, which is needed + when using the <quote>bridge</quote> network device (see below): + </para> + +<screen role="root"><userinput>chgrp kvm /usr/libexec/qemu-bridge-helper && +chmod 4750 /usr/libexec/qemu-bridge-helper</userinput></screen> + <note> <para>For convenience you may want to create a symbolic link to run the installed program. For instance:</para> @@ -232,86 +247,191 @@ OSS. </para> + <para> + <parameter>--with-sdlabi=2.0</parameter>: Chooses to build with SDL-2 if + both SDL and SDL-2 are installed. + </para> + + <para> + <option>--with-gtkabi=3.0</option>: builds with GTK+-3 if both GTK+-2 + and GTK+-3 are installed. + </para> + </sect2> - <sect2 role="configuration"> - <title>Configuring qemu</title> + <sect2 role="using"> + <title>Using Qemu</title> + + <para> + Since using qemu means using a virtual computer, the steps to set up + the virtual machine are in close analogy with those to set up a real + computer. You'll need to decide about CPU, memory, disk, USB devices, + network card(s), screen size, etc. Once the <quote>hardware</quote> is + decided, you'll have for example to choose how to connect the machine + to internet, and/or to install an OS. In the following, we show basic + ways of performing those steps. But qemu is much more than this, and it + is strongly advised to read the qemu documentation in + <filename>/usr/share/doc/qemu-&qemu-version;/qemu-doc.html</filename>. + </para> - <para>To generate an image, run:</para> + <note> + <para> + It is standard practice to name the computer running qemu + <quote>host</quote> and the emulated machine running under qemu the + <quote>guest</quote>. We'll use those notations in the following. + </para> + </note> - <screen><userinput>qemu-img create -f qcow2 vdisk.img 10G</userinput></screen> + <note> + <para> + The following instructions assume the optional symbolic link, + <filename>qemu</filename>, has been created. Additionally, + <command>qemu</command> must be run from an X Window System based + terminal (either locally or over ssh). + </para> + </note> - <para>Adjust the virtual disk size and image filename as desired. The - actual size of the file will be less than specified, but will expand as it - is used.</para> + <bridgehead renderas="sect3">Disk</bridgehead> + <para> + A virtual disk may be set up in the following way: + </para> - <note><para>The following instructions assume you have created the optional - symbolic link, <userinput>qemu</userinput>. Additionally, you must run - <userinput>qemu</userinput> from an X Window System based terminal - (either locally or over ssh).</para></note> +<screen><userinput>VDISK_SIZE=<replaceable>50G</replaceable> +VDISK_FILENAME=<replaceable>vdisk.img</replaceable> +qemu-img create -f qcow2 $VDISK_FILENAME $VDISK_SIZE</userinput></screen> - <para>To install an operating system, download an iso of your choice or use - a pre-installed cdrom device. For the purposes of this example, use - Fedora 16 that is downloaded as - <filename>Fedora-16-x86_64-Live-LXDE.iso</filename> in the current - directory. Run the following:</para> + <para> + The virtual disk size and filename should be ajusted as desired. The + actual size of the file will be less than specified, but will expand as + needed, so it is safe to put a high value. + </para> + + <bridgehead renderas="sect3">Operating System</bridgehead> + <para> + To install an operating system, download an iso image from your prefered + Linux distribution. For the purposes of this example, we'll use + <filename>Fedora-16-x86_64-Live-LXDE.iso</filename> in the current + directory. Run the following: + </para> -<screen><userinput>qemu -enable-kvm -hda vdisk.img \ +<screen><userinput>qemu -enable-kvm \ + -drive file=$VDISK_FILENAME \ -cdrom Fedora-16-x86_64-Live-LXDE.iso \ -boot d \ - -m 384</userinput></screen> + -m <replaceable>1G</replaceable></userinput></screen> + + <para> + Follow the normal installation procedures for the chosen distribution. + The <parameter>-boot</parameter> option specifies the boot order of + drives as a string of drive letters. Valid drive letters are: a, b + (floppy 1 and 2), c (first hard disk), d (first CD-ROM). The + <parameter>-m</parameter> option is the amount of memory to use for the + virtual machine. The choice depends on the load of the host. Modern + distributions should be comfortable with 1GB. + The <parameter>-enable-kvm</parameter> option allows hardware + acceleration. Without this switch, the emulation is much slower. + </para> + + <bridgehead renderas="sect3">Defining the virtual hardware</bridgehead> + <para> + The virtual machine hardware is defined by the qemu command line. + An example command is given below: + </para> - <para>Follow the normal installation procedures for the chosen - distribution. The -boot option specifies the boot order of drives as a - string of drive letters. Valid drive letters are: a, b (floppy 1 and 2), c - (first hard disk), d (first CD-ROM). The -m option is the amount of memory - to use for the virtual machine. If you have sufficient memory (2G or - more), 1G is a reasonable value. For computers with 512MB of RAM it's safe - to use -m 192, or even -m 128 (the default). The -enable-kvm option allows - for hardware acceleration. Without this switch, the emulation is - relatively slow.</para> - - <para>To run the newly installed operating system, run:</para> - -<screen><userinput>qemu -enable-kvm vdisk.img -m 384</userinput></screen> - - <para>You may have problem with <parameter>-enable-kvm</parameter>. Also, - you may want to define audio and video drivers, number of cpu cores and - threads. An alternative command to install the operating system is (see qemu - man page for the parameters definitions):</para> - -<screen><userinput>qemu -enable-kvm \ - -cdrom /home/fernando/ISO/linuxmint-17.1-mate-32bit.iso \ - -boot order=d \ - -m 1G,slots=3,maxmem=4G \ - -machine smm=off \ - -soundhw es1370 \ - -cpu host \ - -smp cores=4,threads=2 \ - -vga std \ - vdisk.img</userinput></screen> - - <para>One parameter not appearing in the qemu man page is - <parameter>-machine smm=off</parameter>, and is used to allow - <parameter>-enable-kvm</parameter> in some systems. In order to run the - machine, you can alternatively issue:</para> - -<screen><userinput>qemu -enable-kvm \ - -machine smm=off \ - -boot order=d \ - -m 1G,slots=3,maxmem=4G \ - -soundhw es1370 \ - -cpu host \ - -smp cores=4,threads=2 \ - -vga vmware \ - -hda vdisk.img</userinput></screen> - - <para>Sometimes, you want the machine to have different screen sizes than - the ones natively offered by the virtual grahics card. The example below is - for qemu vmware graphics card, which uses <xref - linkend="xorg-vmmouse-driver"/> and is set to give maximum screen size of - 1600x900. As the <systemitem class="username">root</systemitem> user, - issue:</para> +<screen><userinput>qemu -enable-kvm \ + -smp 4 \ + -cpu host \ + -m 1G \ + -drive file=$VDISK_FILENAME \ + -cdrom grub-img.iso \ + -boot order=c,once=d,menu=on \ + -net nic,netdev=net0 \ + -netdev user,id=net0 \ + -soundhw ac97 \ + -vga std \ + -serial mon:stdio \ + -name "fedora-16"</userinput></screen> + + <bridgehead renderas="sect3">Meaning of the command line options</bridgehead> + <para> + <parameter>-enable-kvm</parameter>: enable full KVM virtualization + support. On some hardware, it may be necessary to add the undocumented + <option>-machine smm=off</option> option in order to enable KVM. + </para> + + <para> + <parameter>-smp <N></parameter>: enable symmetric multiprocessing + with <N> CPUs. + </para> + + <para> + <parameter>-cpu <model></parameter>: simulate CPU <model>. + the list of supported models can be obtained with <option>-cpu + help</option>. + </para> + + <para> + <parameter>-drive file=<filename></parameter>: defines a virtual + disk whose image is stored in <filename><filename></filename>. + </para> + + <para> + <parameter>-cdrom grub-img.iso</parameter>: defines an iso formated file + to use as a cdrom. Here we use a grub rescue disk, which may turn handy + when something goes wrong at boot time. + </para> + + <para> + <parameter>-boot order=c,once=d,menu=on</parameter>: defines the boot + order for the virtual BIOS. + </para> + + <para> + <parameter>-net nic,netdev=<netid></parameter>: defines a network + card connected to the network device with id <netid>. + </para> + + <para> + <parameter>-netdev user,id=<netid></parameter>: defines the + network <quote>user</quote> device. This is a virtual local network + with addresses 10.0.2.0/24, where the host has address 10.0.2.2 and + acts as a gateway to internet, and with a name server at address + 10.0.2.3, and an smb server at address 10.0.2.4. A builtin DHCP server + can allocate addresses between 10.0.2.15 and 10.0.2.31. + </para> + + <para> + <parameter>-soundhw <model></parameter>: defines the soundcard + model. The list may be obtained with <option>-soundhw help</option>. + </para> + + <para> + <parameter>-vga <type></parameter>: defines the type of vga card + to emulate. + </para> + + <para> + <parameter>-serial mon:stdio</parameter>: sends the serial port of the + guest (<filename>/dev/ttyS0</filename> on linux guests), multiplexed with + the qemu monitor, to the standard input and output of the qemu + process. + </para> + + <para> + <parameter>-name <name></parameter>: sets the name of the guest. + This name is displayed in the guest window caption. It may be useful + if you run several guests at the same time. + </para> + + <bridgehead renderas="sect3">Controling the Emulated Display</bridgehead> + <para> + It may happen that the guest window displayed by qemu does not correspond + to the full capability of the emulated vga card. For example, the vmware + card is 1600x900 capable, but only 1024x768 is displayed by default. + A suitable Xorg configuration on the guest allows to use the full size + (Note that the Xorg video driver to use is <xref + linkend="xorg-vmware-driver"/>): + </para> <screen role="root"><userinput>cat > /usr/share/X11/xorg.conf.d/20-vmware.conf << "EOF" <literal>Section "Monitor" @@ -343,126 +463,68 @@ EndSection</literal> EOF</userinput></screen> - <para>New sizes will be available besides the native ones. You need to - restart X in order to have the new sizes available.</para> - - <para><!--To add networking to the instance add "-net nic -net user" to the - command above. -->qemu provides a DHCP server for the VM and, depending on - the client system, sets up networking though the host.</para> - - <para>One problem with the above networking solution is that it does not - provide the ability to connect with the local network. To do that, there are - several additional steps that need to be done, all as the <systemitem - class="username">root</systemitem> user:</para> - - <itemizedlist spacing="compact"> - <listitem> - <para>Set up bridging with <xref linkend='bridgeutils'/>.</para> - </listitem> - - <listitem> - <para>Allow the host system to forward IP packets.</para> + <para> + New sizes will be available besides the native ones. You need to + restart X in order to have the new sizes available. + </para> -<screen role="root"><userinput>sysctl -w net.ipv4.ip_forward=1</userinput></screen> + <bridgehead renderas="sect3">Networking</bridgehead> + <para> + The above solution for networking allows the guest to access the local + network through the host (and possibly to access internet through the + local routers), but the converse is not true. Not even the host can + access the guest, unless port forwarding is enabled. And in the case + several guests are running, they cannot communicate with each other. + Other network devices can be used for this purpose. For example, there + is the <quote>socket</quote> device, which allows several guests to + share a common virtual network. In the following, we describe in more + details how to set up the <quote>bridge</quote> device, which allows + the guests to appear as if connected to the local network. All the + commands below should be run as the <systemitem + class="username">root</systemitem> user. + </para> - <para revision="sysv">To make this permanent, add the command to - <filename>/etc/sysctl.conf:</filename></para> + <para revision="sysv"> + Set up bridging with <xref linkend="bridgeutils"/>. Only the physical + interface(s) should be set up at boot. The virtual interface(s) will be + added as needed when qemu is started. + </para> +<!-- Place holder for systemd: bridgeutils page does not have configuration + information for systemd: + <para revision="systemd"> + TODO + </para>--> + + <para revision="systemd"><!-- On SYS-V, IP_FORWARD is enabled by the + bridge script. --> + Allow the host to forward IP packets: + </para> -<screen role="root" revision="sysv"><userinput>cat >> /etc/sysctl.conf << EOF -net.ipv4.ip_forward=1 -EOF</userinput></screen> +<screen role="root" + revision="systemd"><userinput>sysctl -w net.ipv4.ip_forward=1</userinput></screen> - <para revision="systemd">To make this permanent, add the command to - <filename>/etc/sysctl.d/60-net-forward.conf:</filename></para> + <para revision="systemd"> + To make this permanent, add the command to + <filename>/etc/sysctl.d/60-net-forward.conf:</filename> + </para> -<screen role="root" revision="systemd"><userinput>cat >> /etc/sysctl.d/60-net-forward.conf << EOF +<screen role="root" + revision="systemd"><userinput>cat >> /etc/sysctl.d/60-net-forward.conf << EOF net.ipv4.ip_forward=1 EOF</userinput></screen> - - </listitem> - - <listitem> - <para>Allow the network connection when running as a part of the - kvm group:</para> - -<screen role="root"><userinput>chgrp kvm /usr/libexec/qemu-bridge-helper && -chmod 4750 /usr/libexec/qemu-bridge-helper</userinput></screen> - - </listitem> - - <listitem> - <para>Set up a required configuration file:</para> + <para> + Set up a required configuration file: + </para> <!-- /etc/qemu has not been installed by "make install" since version 2.4 --> <screen role="root"><userinput>install -vdm 755 /etc/qemu && echo allow br0 > /etc/qemu/bridge.conf</userinput></screen> - </listitem> - -<!-- - <listitem> - <para>Create scripts for qemu to attach the client network - device, usually visible as tap0, to the host bridge.</para> - -<screen role="root"><userinput>cat > /etc/qemu-ifup << EOF -#!/bin/bash - -switch=br0 - -if [ -n "\$1" ]; then - # Add new tap0 interface to bridge - /sbin/ip link set \$1 up - sleep 0.5s - /usr/sbin/brctl addif \$switch \$1 -else - echo "Error: no interface specified" - exit 1 -fi - -exit 0 -EOF - -chmod +x /etc/qemu-ifup</userinput></screen> - -<screen role="root"><userinput>cat > /etc/qemu-ifdown << EOF -#!/bin/bash - -switch=br0 - -if [ -n "\$1" ]; then - # Remove tap0 interface from bridge - /usr/sbin/brctl delif \$switch \$1 -else - echo "Error: no interface specified" - exit 1 -fi - -exit 0 -EOF - -chmod +x /etc/qemu-ifdown</userinput></screen> - - </listitem> - </itemizedlist> - - <note><para>The backslashes in the above script are for convenience - for cut/paste operations. The backslashes should <emphasis>not</emphasis> - appear in the final scripts.</para></note> - - <itemizedlist spacing="compact"> --> - <listitem> - <!--<para>Start qemu with "-net nic -net tap" options. </para>--> - <para>Start qemu with "-net nic -net bridge" options. </para> - </listitem> - - <listitem> - <para>If a connection, such as ssh, from the local network to the - client VM is desired, the client should be configured - with a static IP address.</para> - </listitem> - - </itemizedlist> + <para> + In the command above, replace the switch <parameter>-netdev user,... + </parameter> with <parameter>-netdev bridge,id=net0</parameter>. + </para> </sect2> @@ -483,13 +545,12 @@ qemu-img, qemu-io, qemu-nbd, - qemu-system-<arch>, - virtfs-proxy-helper, and - vscclient + qemu-system-<arch>, and + virtfs-proxy-helper </seg> - <seg>libcacard.so</seg> + <seg>None</seg> <seg> - /etc/qemu and + /usr/share/qemu and /usr/share/doc/qemu-&qemu-version; </seg> </seglistitem> @@ -500,6 +561,26 @@ <?dbfo list-presentation="list"?> <?dbhtml list-presentation="table"?> + <varlistentry id="ivshmem-client"> + <term><command>ivshmem-client</command></term> + <listitem> + <para>is a standalone client for using the ivshmem device.</para> + <indexterm zone="qemu ivshmem-client"> + <primary sortas="b-ivshmem-client">ivshmem-client</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="ivshmem-server"> + <term><command>ivshmem-server</command></term> + <listitem> + <para>is an example server for the ivshmem device.</para> + <indexterm zone="qemu ivshmem-server"> + <primary sortas="b-ivshmem-server">ivshmem-server</primary> + </indexterm> + </listitem> + </varlistentry> + <varlistentry id="qemu-ga"> <term><command>qemu-ga</command></term> <listitem> @@ -566,7 +647,7 @@ </indexterm> </listitem> </varlistentry> - +<!-- libcacard has been a standalone project since qemu-2.5 <varlistentry id="vscclient"> <term><command>vscclient</command></term> <listitem> @@ -586,7 +667,7 @@ <primary sortas="c-libcacard">libcacard.so</primary> </indexterm> </listitem> - </varlistentry> + </varlistentry>--> </variablelist> -- http://lists.linuxfromscratch.org/listinfo/blfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
