[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 |
|
---|
[2f6053d] | 7 | <!ENTITY qemu-download-http "http://wiki.qemu.org/download/qemu-&qemu-version;.tar.bz2">
|
---|
| 8 | <!ENTITY qemu-download-ftp " ">
|
---|
[dd9e0c3] | 9 | <!ENTITY qemu-md5sum "ca3f70b43f093e33e9e014f144067f13">
|
---|
| 10 | <!ENTITY qemu-size "25 MB">
|
---|
| 11 | <!ENTITY qemu-buildsize "559 MB (with tests)">
|
---|
| 12 | <!ENTITY qemu-time "3.3 SBU (with tests)">
|
---|
[d28198d3] | 13 | ]>
|
---|
| 14 |
|
---|
[2f6053d] | 15 | <sect1 id="qemu" xreflabel="qemu-&qemu-version;">
|
---|
| 16 | <?dbhtml filename="qemu.html"?>
|
---|
[d28198d3] | 17 |
|
---|
| 18 | <sect1info>
|
---|
[c4a1934a] | 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[d28198d3] | 21 | </sect1info>
|
---|
| 22 |
|
---|
[2f6053d] | 23 | <title>qemu-&qemu-version;</title>
|
---|
[d28198d3] | 24 |
|
---|
[2f6053d] | 25 | <indexterm zone="qemu">
|
---|
| 26 | <primary sortas="a-qemu">qemu</primary>
|
---|
[d28198d3] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[2f6053d] | 30 | <title>Introduction to qemu</title>
|
---|
[d28198d3] | 31 |
|
---|
[2f6053d] | 32 | <para><application>qemu</application> is a full virtualization solution
|
---|
[d28198d3] | 33 | for Linux on x86 hardware containing virtualization extensions (Intel VT or
|
---|
| 34 | AMD-V).</para>
|
---|
| 35 |
|
---|
[ac38e9dc] | 36 | &lfs77_checked;
|
---|
[27643d0f] | 37 |
|
---|
[d28198d3] | 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
[2f6053d] | 41 | <para>Download (HTTP): <ulink url="&qemu-download-http;"/></para>
|
---|
[d28198d3] | 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
[2f6053d] | 44 | <para>Download (FTP): <ulink url="&qemu-download-ftp;"/></para>
|
---|
[d28198d3] | 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
[2f6053d] | 47 | <para>Download MD5 sum: &qemu-md5sum;</para>
|
---|
[d28198d3] | 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
[2f6053d] | 50 | <para>Download size: &qemu-size;</para>
|
---|
[d28198d3] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[2f6053d] | 53 | <para>Estimated disk space required: &qemu-buildsize;</para>
|
---|
[d28198d3] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[2f6053d] | 56 | <para>Estimated build time: &qemu-time;</para>
|
---|
[d28198d3] | 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
[54f740f] | 59 |
|
---|
[2f6053d] | 60 | <bridgehead renderas="sect3">Qemu Dependencies</bridgehead>
|
---|
[d28198d3] | 61 |
|
---|
| 62 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 63 | <para role="required">
|
---|
[aa4778c4] | 64 | <xref linkend="glib2"/>,
|
---|
[aedf4d7] | 65 | <xref linkend="python2"/>, and
|
---|
[d28198d3] | 66 | <xref linkend="x-window-system"/>
|
---|
| 67 | </para>
|
---|
| 68 |
|
---|
[aedf4d7] | 69 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 70 | <para role="recommended">
|
---|
| 71 | <xref linkend="sdl"/>
|
---|
| 72 | </para>
|
---|
| 73 |
|
---|
[d28198d3] | 74 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 75 | <para role="optional">
|
---|
| 76 | <xref linkend="alsa"/>,
|
---|
[ac38e9dc] | 77 | <xref linkend="bluez"/>,
|
---|
[d28198d3] | 78 | <xref linkend="check"/>,
|
---|
| 79 | <xref linkend="curl"/>,
|
---|
[ac38e9dc] | 80 | <xref linkend="cyrus-sasl"/>,
|
---|
[54789f3] | 81 | <xref linkend="gnutls"/>,
|
---|
[ac38e9dc] | 82 | <xref linkend="gtk2"/>,
|
---|
| 83 | <xref linkend="gtk3"/>,
|
---|
| 84 | <xref linkend="libusb"/>,
|
---|
[54789f3] | 85 | <xref linkend="libgcrypt"/>,
|
---|
[ac38e9dc] | 86 | <xref linkend="lzo"/>,
|
---|
[54789f3] | 87 | <xref linkend="nettle"/>,
|
---|
[ac38e9dc] | 88 | <xref linkend="nss"/> (for libcacard.so),
|
---|
[ba8cf0e] | 89 | <xref linkend="mesa"/>,
|
---|
[54789f3] | 90 | <xref linkend="sdl"/>, and
|
---|
[ac38e9dc] | 91 | <xref linkend="vte"/>
|
---|
[54789f3] | 92 | <ulink url="http://www.libssh2.org">libssh2</ulink>
|
---|
[d28198d3] | 93 | </para>
|
---|
| 94 |
|
---|
[9b13441] | 95 | <note>
|
---|
| 96 | <para>
|
---|
| 97 | This optional dependencies list is not comprehensive. See the output of
|
---|
| 98 | <command>./configure --help</command> for a more complete list.
|
---|
| 99 | </para>
|
---|
| 100 | </note>
|
---|
| 101 |
|
---|
[d28198d3] | 102 | <para condition="html" role="usernotes">User Notes:
|
---|
[2f6053d] | 103 | <ulink url="&blfs-wiki;/qemu"/></para>
|
---|
[d28198d3] | 104 |
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
[2f6053d] | 107 | <sect2 id='qemu-prereq'>
|
---|
[1eb4fcf] | 108 | <title>KVM Prerequisites</title>
|
---|
[d28198d3] | 109 |
|
---|
[2f6053d] | 110 | <para>Before building <application>qemu</application>, check to see if
|
---|
[d28198d3] | 111 | your processor supports Virtualization Technology (VT):</para>
|
---|
| 112 |
|
---|
| 113 | <screen><userinput>egrep '^flags.*(vmx|svm)' /proc/cpuinfo</userinput></screen>
|
---|
| 114 |
|
---|
| 115 | <para>If you get any output, you have VT technology (vmx for Intel
|
---|
| 116 | processors and svm for AMD processors). You then need to go into your
|
---|
| 117 | system BIOS and ensure it is enabled. After enabing, reboot back to your
|
---|
| 118 | LFS instance.</para>
|
---|
| 119 |
|
---|
| 120 | </sect2>
|
---|
| 121 |
|
---|
[2f6053d] | 122 | <sect2 role="kernel" id='qemu-kernel'>
|
---|
[d28198d3] | 123 | <title>Kernel Configuration</title>
|
---|
| 124 |
|
---|
[ac38e9dc] | 125 | <para>Enable the following options in the kernel configuration and
|
---|
| 126 | recompile the kernel if necessary:</para>
|
---|
[d28198d3] | 127 |
|
---|
[ac38e9dc] | 128 | <screen><literal>[*] Virtualization: ---> [CONFIG_VIRTUALIZATION]
|
---|
| 129 | <*/M> Kernel-based Virtual Machine (KVM) support [CONFIG_KVM]
|
---|
| 130 | <*/M> KVM for Intel processors support [CONFIG_KVM_INTEL]
|
---|
| 131 | <*/M> KVM for AMD processors support [CONFIG_KVM_AMD]</literal></screen>
|
---|
[d28198d3] | 132 |
|
---|
[2f6053d] | 133 | <indexterm zone="qemu qemu-kernel">
|
---|
| 134 | <primary sortas="d-qemu">qemu</primary>
|
---|
[d28198d3] | 135 | </indexterm>
|
---|
| 136 |
|
---|
| 137 | <para>The Intel or AMD settings are not both required, but the one matching
|
---|
| 138 | your system processor is required.</para>
|
---|
| 139 |
|
---|
[ac38e9dc] | 140 | <para>For networking, check that <xref linkend='bridgeutils'/> is installed
|
---|
[9b13441] | 141 | and the following options in the kernel configuration are enabled:</para>
|
---|
| 142 |
|
---|
[ac38e9dc] | 143 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
| 144 | Networking options --->
|
---|
| 145 | <*/M> 802.1d Ethernet Bridging [CONFIG_BRIDGE]
|
---|
| 146 | Device Drivers --->
|
---|
| 147 | [*] Network device support ---> [CONFIG_NETDEVICES]
|
---|
| 148 | <*/M> Universal TUN/TAP device driver support [CONFIG_TUN]</literal></screen>
|
---|
[d28198d3] | 149 |
|
---|
| 150 | </sect2>
|
---|
| 151 |
|
---|
| 152 | <sect2 role="installation">
|
---|
[2f6053d] | 153 | <title>Installation of qemu</title>
|
---|
[0d7900a] | 154 |
|
---|
[2f6053d] | 155 | <para>Install <application>qemu</application> by running the following
|
---|
[d28198d3] | 156 | commands:</para>
|
---|
| 157 |
|
---|
[54789f3] | 158 | <note><para>Qemu is capable of running many targets. The build process
|
---|
| 159 | is also capable of building multiple targets at one time in a
|
---|
| 160 | comma delimited list assigned to <option>--target-list</option>. Run
|
---|
| 161 | <command>./configure --help</command> to get a complete list of
|
---|
| 162 | available targets.</para></note>
|
---|
| 163 |
|
---|
| 164 | <screen><userinput>if [ $(uname -m) = i686 ]; then
|
---|
| 165 | QEMU_ARCH=i386-softmmu
|
---|
| 166 | else
|
---|
| 167 | QEMU_ARCH=x86_64-softmmu
|
---|
| 168 | fi
|
---|
| 169 |
|
---|
| 170 | mkdir -vp build &&
|
---|
| 171 | cd build &&
|
---|
| 172 |
|
---|
| 173 | ../configure --prefix=/usr \
|
---|
| 174 | --sysconfdir=/etc \
|
---|
| 175 | --target-list=$QEMU_ARCH \
|
---|
| 176 | --audio-drv-list=alsa \
|
---|
| 177 | --docdir=/usr/share/doc/qemu-&qemu-version; &&
|
---|
| 178 |
|
---|
| 179 | unset QEMU_ARCH &&
|
---|
| 180 |
|
---|
[9b13441] | 181 | make</userinput></screen>
|
---|
[d28198d3] | 182 |
|
---|
[6d11bc30] | 183 | <para>
|
---|
| 184 | To run the built in tests, run <command>make V=1 check</command>.
|
---|
| 185 | </para>
|
---|
[d28198d3] | 186 |
|
---|
| 187 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 188 |
|
---|
[54aaa89] | 189 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[9a04a8e9] | 190 |
|
---|
| 191 | <para>
|
---|
| 192 | You will need a dedicated group that will contain users (other than root)
|
---|
[ac38e9dc] | 193 | allowed to access the KVM device. Create this group by running the following
|
---|
[9a04a8e9] | 194 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 195 | </para>
|
---|
| 196 |
|
---|
| 197 | <screen role="root"><userinput>groupadd -g 61 kvm</userinput></screen>
|
---|
| 198 |
|
---|
| 199 | <para>
|
---|
| 200 | Add any users that might use the KVM device to that group:
|
---|
| 201 | </para>
|
---|
| 202 |
|
---|
| 203 | <screen role="root"><userinput>usermod -a -G kvm <replaceable><username></replaceable></userinput></screen>
|
---|
| 204 |
|
---|
| 205 | <para>
|
---|
[6463c3c] | 206 | You will also need to add a Udev rule so that the KVM device gets correct
|
---|
[9a04a8e9] | 207 | permissions:
|
---|
| 208 | </para>
|
---|
| 209 |
|
---|
| 210 | <screen role="root"><userinput>cat > /lib/udev/rules.d/65-kvm.rules << "EOF"
|
---|
[a1b18af2] | 211 | <literal>KERNEL=="kvm", GROUP="kvm", MODE="0660"</literal>
|
---|
[9a04a8e9] | 212 | EOF</userinput></screen>
|
---|
| 213 |
|
---|
[54aaa89] | 214 | <note>
|
---|
| 215 | <para>For convenience you may want to create a symbolic link to run
|
---|
| 216 | The installed program. For instance:</para>
|
---|
[d28198d3] | 217 |
|
---|
[54789f3] | 218 | <screen role="root"><userinput>ln -sv qemu-system-`uname -m` /usr/bin/qemu</userinput></screen>
|
---|
[d28198d3] | 219 | </note>
|
---|
| 220 |
|
---|
| 221 | </sect2>
|
---|
| 222 |
|
---|
[6a54383] | 223 | <sect2 role="commands">
|
---|
| 224 | <title>Command Explanations</title>
|
---|
| 225 |
|
---|
[9b13441] | 226 | <para>
|
---|
[54789f3] | 227 | <parameter>--audio-drv-list=alsa</parameter>: This switch sets the audio driver
|
---|
[9b13441] | 228 | to ALSA. For other drivers see the --audio-drv-list list in
|
---|
| 229 | <command>configure</command>'s help output. The default audio driver is
|
---|
| 230 | OSS.
|
---|
| 231 | </para>
|
---|
[6a54383] | 232 |
|
---|
[9b13441] | 233 | </sect2>
|
---|
[6a54383] | 234 |
|
---|
[d28198d3] | 235 | <sect2 role="configuration">
|
---|
[2f6053d] | 236 | <title>Configuring qemu</title>
|
---|
[d28198d3] | 237 |
|
---|
| 238 | <para>To generate an image, run:</para>
|
---|
| 239 |
|
---|
| 240 | <screen><userinput>qemu-img create -f qcow2 vdisk.img 10G</userinput></screen>
|
---|
| 241 |
|
---|
| 242 | <para>Adjust the virtual disk size and image filename as desired. The
|
---|
| 243 | actual size of the file will be less than specified, but will expand as it
|
---|
| 244 | is used.</para>
|
---|
| 245 |
|
---|
| 246 | <note><para>The following instructions assume you have created the optional
|
---|
| 247 | symbolic link, <userinput>qemu</userinput>. Additionally, you must run
|
---|
[54789f3] | 248 | <userinput>qemu</userinput> from an X Window System based terminal.
|
---|
| 249 | (either locally or over ssh).</para></note>
|
---|
[d28198d3] | 250 |
|
---|
| 251 | <para>To install an operating system, download an iso of your choice or use
|
---|
[ac38e9dc] | 252 | a pre-installed cdrom device. For the purposes of this example, use
|
---|
[d28198d3] | 253 | Fedora 16 that is downloaded as
|
---|
| 254 | <filename>Fedora-16-x86_64-Live-LXDE.iso</filename> in the current
|
---|
| 255 | directory. Run the following:</para>
|
---|
| 256 |
|
---|
[2f6053d] | 257 | <screen><userinput>qemu -enable-kvm -hda vdisk.img \
|
---|
[0d7900a] | 258 | -cdrom Fedora-16-x86_64-Live-LXDE.iso \
|
---|
[d28198d3] | 259 | -boot d \
|
---|
| 260 | -m 384</userinput></screen>
|
---|
| 261 |
|
---|
| 262 | <para>Follow the normal installation procedures for the chosen
|
---|
[2f6053d] | 263 | distribution. The -boot option specifies the boot order of drives as a
|
---|
| 264 | string of drive letters. Valid drive letters are: a, b (floppy 1 and 2), c
|
---|
| 265 | (first hard disk), d (first CD-ROM). The -m option is the amount of memory
|
---|
| 266 | to use for the virtual machine. If you have sufficient memory (2G or
|
---|
| 267 | more), 1G is a reasonable value. For computers with 512MB of RAM it's safe
|
---|
| 268 | to use -m 192, or even -m 128 (the default). The -enable-kvm option allows
|
---|
| 269 | for hardware acceleeration. Without this switch, the emulation is
|
---|
| 270 | relatively slow.</para>
|
---|
[d28198d3] | 271 |
|
---|
| 272 | <para>To run the newly installed operating system, run:</para>
|
---|
| 273 |
|
---|
[2f6053d] | 274 | <screen><userinput>qemu -enable-kvm vdisk.img -m 384</userinput></screen>
|
---|
[d28198d3] | 275 |
|
---|
[54789f3] | 276 | <para>You may have a problem with <parameter>--enable-kvm</parameter>. Also,
|
---|
| 277 | you may want to define audio and video drivers, the number of cpu cores, and
|
---|
| 278 | the number of threads. An alternative command to install the operating system is (see qemu
|
---|
| 279 | man page for parameters definitions):</para>
|
---|
| 280 |
|
---|
| 281 | <screen><userinput>qemu -enable-kvm \
|
---|
| 282 | -cdrom /home/fernando/ISO/linuxmint-17.1-mate-32bit.iso \
|
---|
| 283 | -boot order=d \
|
---|
| 284 | -m 1G,slots=3,maxmem=4G \
|
---|
| 285 | -machine smm=off \
|
---|
| 286 | -soundhw es1370 \
|
---|
| 287 | -cpu host \
|
---|
| 288 | -smp cores=4,threads=2 \
|
---|
| 289 | -vga std \
|
---|
| 290 | vdisk.img</userinput></screen>
|
---|
| 291 |
|
---|
| 292 | <para>One parameter not appearing in the qemu man page is
|
---|
| 293 | <parameter>-machine smm=off</parameter>, and it used to allow
|
---|
| 294 | <parameter>-enable-kvm</parameter> in some systems. In order to run the
|
---|
| 295 | machine, you can alternatively issue:</para>
|
---|
| 296 |
|
---|
| 297 | <screen><userinput>qemu -enable-kvm \
|
---|
| 298 | -machine smm=off \
|
---|
| 299 | -boot order=d \
|
---|
| 300 | -m 1G,slots=3,maxmem=4G \
|
---|
| 301 | -soundhw es1370 \
|
---|
| 302 | -cpu host \
|
---|
| 303 | -smp cores=4,threads=2 \
|
---|
| 304 | -vga vmware \
|
---|
| 305 | -hda vdisk.img</userinput></screen>
|
---|
| 306 |
|
---|
| 307 | <para>Sometimes, you want the machine to have different screen sizes than
|
---|
| 308 | the ones natively offered by the virtual graphics card. The example below is
|
---|
| 309 | for the qemu vmware graphics card, which uses
|
---|
| 310 | <xref linkend="xorg-vmware-driver"/> and is set to give the maximum screen size
|
---|
| 311 | of 1600x900. As the <systemitem class="username">root</systemitem> user,
|
---|
| 312 | issue the following:</para>
|
---|
| 313 |
|
---|
| 314 | <screen role="root"><userinput>cat > /usr/share/X11/xorg.conf.d/20-vmware.conf << "EOF"
|
---|
| 315 | <literal>Section "Monitor"
|
---|
| 316 | Identifier "Monitor0"
|
---|
| 317 | # cvt 1600 900
|
---|
| 318 | # 1600x900 59.95 Hz (CVT 1.44M9) hsync:55.99 kHz; pclk: 118.25 MHz
|
---|
| 319 | Modeline "1600x900" 118.25 1600 1696 1856 2112 900 903 908 934 -hysnc +vsync
|
---|
| 320 | Option "PreferredMode" "1600x900"
|
---|
| 321 | HorizSync 1-200
|
---|
| 322 | VertRefresh 1-200
|
---|
| 323 | EndSection
|
---|
| 324 |
|
---|
| 325 | Section "Device"
|
---|
| 326 | Identifier "VMWare SVGA II Adapter"
|
---|
| 327 | Option "Monitor" "Default"
|
---|
| 328 | Driver "vmware"
|
---|
| 329 | EndSection
|
---|
| 330 |
|
---|
| 331 | Section "Screen"
|
---|
| 332 | Identifier "Default Screen"
|
---|
| 333 | Device "VMWare SVGA II Adapter"
|
---|
| 334 | Monitor "Monitor0"
|
---|
| 335 |
|
---|
| 336 | SubSection "Display"
|
---|
| 337 | Depth 24
|
---|
| 338 | Modes "1600x900" "1440x900" "1366x768" "1280x720" "800x480"
|
---|
| 339 | EndSubSection
|
---|
| 340 | EndSection </literal>
|
---|
| 341 | EOF </userinput></screen>
|
---|
| 342 |
|
---|
| 343 | <para>New sizes will be available besides the native ones. You need to
|
---|
| 344 | restart X in order to have the new sizes available.</para>
|
---|
| 345 |
|
---|
| 346 | <para><!--To add networking to the instance add "-net nic -net user" to the
|
---|
| 347 | command above.--> qemu provides a DHCP server for the VM and, depending on
|
---|
[d28198d3] | 348 | the client system, sets up networking though the host.</para>
|
---|
| 349 |
|
---|
| 350 | <para>One problem with the above networking solution is that it does not
|
---|
[0d7900a] | 351 | provide the ability to connect with the local network. To do that, there are
|
---|
[d28198d3] | 352 | several additional steps that need to be done, all as the <systemitem
|
---|
| 353 | class="username">root</systemitem> user:</para>
|
---|
| 354 |
|
---|
| 355 | <itemizedlist spacing="compact">
|
---|
| 356 | <listitem>
|
---|
[54789f3] | 357 | <para>Set up bridging using <xref linkend="bridgeutils"/>.</para>
|
---|
[d28198d3] | 358 | </listitem>
|
---|
| 359 |
|
---|
| 360 | <listitem>
|
---|
| 361 | <para>Allow the host system to forward IP packets.</para>
|
---|
| 362 |
|
---|
[58196bbf] | 363 | <screen role="root"><userinput>sysctl -w net.ipv4.ip_forward=1</userinput></screen>
|
---|
[0d7900a] | 364 |
|
---|
| 365 | <para>To make this permanent, add the command to
|
---|
[a7b13539] | 366 | <filename>/etc/sysctl.d/60-net-forward.conf:</filename></para>
|
---|
[d28198d3] | 367 |
|
---|
[a7b13539] | 368 | <screen role="root"><userinput>cat >> /etc/sysctl.d/60-net-forward.conf << "EOF"
|
---|
[0d7900a] | 369 | net.ipv4.ip_forward=1
|
---|
[d28198d3] | 370 | EOF</userinput></screen>
|
---|
| 371 |
|
---|
| 372 | </listitem>
|
---|
| 373 |
|
---|
[ac38e9dc] | 374 | <listitem>
|
---|
| 375 | <para>Allow the network connection when running as a part of the
|
---|
| 376 | kvm group:</para>
|
---|
| 377 |
|
---|
| 378 | <screen role="root"><userinput>chgrp kvm /usr/libexec/qemu-bridge-helper &&
|
---|
| 379 | chmod 4750 /usr/libexec/qemu-bridge-helper</userinput></screen>
|
---|
| 380 |
|
---|
| 381 | </listitem>
|
---|
| 382 |
|
---|
| 383 | <listitem>
|
---|
| 384 | <para>Set up a required configuration file:</para>
|
---|
| 385 |
|
---|
| 386 | <screen role="root"><userinput>echo 'allow br0' > /etc/qemu/bridge.conf</userinput></screen>
|
---|
| 387 |
|
---|
| 388 | </listitem>
|
---|
| 389 |
|
---|
| 390 | <!--
|
---|
[d28198d3] | 391 | <listitem>
|
---|
[0d7900a] | 392 | <para>Create scripts for qemu to attach the client network
|
---|
[d28198d3] | 393 | device, usually visible as tap0, to the host bridge.</para>
|
---|
| 394 |
|
---|
[a7b13539] | 395 | <screen role="root"><userinput>cat > /etc/qemu-ifup << "EOF"
|
---|
[d28198d3] | 396 | #!/bin/bash
|
---|
| 397 |
|
---|
| 398 | switch=br0
|
---|
| 399 |
|
---|
[a7b13539] | 400 | if [ -n "$1" ]; then
|
---|
[d28198d3] | 401 | # Add new tap0 interface to bridge
|
---|
[a7b13539] | 402 | /usr/sbin/brctl addif $switch $1
|
---|
[d28198d3] | 403 | else
|
---|
| 404 | echo "Error: no interface specified"
|
---|
| 405 | exit 1
|
---|
| 406 | fi
|
---|
| 407 |
|
---|
[0d7900a] | 408 | exit 0
|
---|
[71e6ae5] | 409 | EOF
|
---|
| 410 |
|
---|
| 411 | chmod +x /etc/qemu-ifup</userinput></screen>
|
---|
[d28198d3] | 412 |
|
---|
[a7b13539] | 413 | <screen role="root"><userinput>cat > /etc/qemu-ifdown << "EOF"
|
---|
[d28198d3] | 414 | #!/bin/bash
|
---|
| 415 |
|
---|
| 416 | switch=br0
|
---|
| 417 |
|
---|
[a7b13539] | 418 | if [ -n "$1" ]; then
|
---|
[d28198d3] | 419 | # Remove tap0 interface from bridge
|
---|
[a7b13539] | 420 | /usr/sbin/brctl delif $switch $1
|
---|
[d28198d3] | 421 | else
|
---|
| 422 | echo "Error: no interface specified"
|
---|
| 423 | exit 1
|
---|
| 424 | fi
|
---|
| 425 |
|
---|
[0d7900a] | 426 | exit 0
|
---|
[71e6ae5] | 427 | EOF
|
---|
| 428 |
|
---|
| 429 | chmod +x /etc/qemu-ifdown</userinput></screen>
|
---|
[d28198d3] | 430 |
|
---|
| 431 | </listitem>
|
---|
[71e6ae5] | 432 | </itemizedlist>
|
---|
| 433 |
|
---|
[ac38e9dc] | 434 | <note><para>The backslashes in the above script are for convenience
|
---|
[71e6ae5] | 435 | for cut/paste operations. The backslashes should <emphasis>not</emphasis>
|
---|
[ac38e9dc] | 436 | appear in the final scripts.</para></note>
|
---|
[d28198d3] | 437 |
|
---|
[ac38e9dc] | 438 | <itemizedlist spacing="compact"> -->
|
---|
[d28198d3] | 439 | <listitem>
|
---|
[ac38e9dc] | 440 | <!--<para>Start qemu with "-net nic -net tap" options. </para>-->
|
---|
| 441 | <para>Start qemu with "-net nic -net bridge" options. </para>
|
---|
[d28198d3] | 442 | </listitem>
|
---|
| 443 |
|
---|
| 444 | <listitem>
|
---|
[0d7900a] | 445 | <para>If a connection, such as ssh, from the local network to the
|
---|
[ac38e9dc] | 446 | client VM is desired, the client should be configured
|
---|
[d28198d3] | 447 | with a static IP address.</para>
|
---|
| 448 | </listitem>
|
---|
| 449 |
|
---|
| 450 | </itemizedlist>
|
---|
| 451 |
|
---|
| 452 | </sect2>
|
---|
| 453 |
|
---|
| 454 | <sect2 role="content">
|
---|
| 455 | <title>Contents</title>
|
---|
| 456 |
|
---|
| 457 | <segmentedlist>
|
---|
[9b13441] | 458 | <segtitle>Installed Programs</segtitle>
|
---|
| 459 | <segtitle>Installed Library</segtitle>
|
---|
[d28198d3] | 460 | <segtitle>Installed Directories</segtitle>
|
---|
| 461 |
|
---|
| 462 | <seglistitem>
|
---|
[9b13441] | 463 | <seg>
|
---|
[54789f3] | 464 | ivshmem-client,
|
---|
| 465 | ivshmem-server,
|
---|
| 466 | qemu (symlink),
|
---|
[9b13441] | 467 | qemu-ga,
|
---|
| 468 | qemu-img,
|
---|
| 469 | qemu-io,
|
---|
| 470 | qemu-nbd,
|
---|
[54789f3] | 471 | qemu-system-<arch>,
|
---|
[9b13441] | 472 | virtfs-proxy-helper, and
|
---|
| 473 | vscclient
|
---|
| 474 | </seg>
|
---|
| 475 | <seg>libcacard.so</seg>
|
---|
| 476 | <seg>
|
---|
[54789f3] | 477 | /etc/qemu, and
|
---|
[9b13441] | 478 | /usr/share/doc/qemu-&qemu-version;
|
---|
| 479 | </seg>
|
---|
[d28198d3] | 480 | </seglistitem>
|
---|
| 481 | </segmentedlist>
|
---|
| 482 |
|
---|
| 483 | <variablelist>
|
---|
| 484 | <bridgehead renderas="sect3">Short Description</bridgehead>
|
---|
| 485 | <?dbfo list-presentation="list"?>
|
---|
| 486 | <?dbhtml list-presentation="table"?>
|
---|
| 487 |
|
---|
| 488 | <varlistentry id="qemu-ga">
|
---|
| 489 | <term><command>qemu-ga</command></term>
|
---|
| 490 | <listitem>
|
---|
| 491 | <para>implements support for QMP (QEMU Monitor Protocol) commands and
|
---|
| 492 | events that terminate and originate respectively within the guest
|
---|
| 493 | using an agent built as part of QEMU.</para>
|
---|
[2f6053d] | 494 | <indexterm zone="qemu qemu-ga">
|
---|
[d28198d3] | 495 | <primary sortas="b-qemu-ga">qemu-ga</primary>
|
---|
| 496 | </indexterm>
|
---|
| 497 | </listitem>
|
---|
| 498 | </varlistentry>
|
---|
| 499 |
|
---|
| 500 | <varlistentry id="qemu-img">
|
---|
| 501 | <term><command>qemu-img</command></term>
|
---|
| 502 | <listitem>
|
---|
| 503 | <para>provides commands to manage QEMU disk images.</para>
|
---|
[2f6053d] | 504 | <indexterm zone="qemu qemu-img">
|
---|
[d28198d3] | 505 | <primary sortas="b-qemu-img">qemu-img</primary>
|
---|
| 506 | </indexterm>
|
---|
| 507 | </listitem>
|
---|
| 508 | </varlistentry>
|
---|
| 509 |
|
---|
| 510 | <varlistentry id="qemu-io">
|
---|
| 511 | <term><command>qemu-io</command></term>
|
---|
| 512 | <listitem>
|
---|
| 513 | <para>is a diagnostic and manipulation program for (virtual) memory
|
---|
| 514 | media. It is still at an early stage of development.</para>
|
---|
[2f6053d] | 515 | <indexterm zone="qemu qemu-io">
|
---|
[d28198d3] | 516 | <primary sortas="b-qemu-io">qemu-io</primary>
|
---|
| 517 | </indexterm>
|
---|
| 518 | </listitem>
|
---|
| 519 | </varlistentry>
|
---|
| 520 |
|
---|
| 521 | <varlistentry id="qemu-nbd">
|
---|
| 522 | <term><command>qemu-nbd</command></term>
|
---|
| 523 | <listitem>
|
---|
| 524 | <para>exports Qemu disk images using the QEMU Disk Network Block
|
---|
| 525 | Device (NBD) protocol.</para>
|
---|
[2f6053d] | 526 | <indexterm zone="qemu qemu-nbd">
|
---|
[d28198d3] | 527 | <primary sortas="b-qemu-nbd">qemu-nbd</primary>
|
---|
| 528 | </indexterm>
|
---|
| 529 | </listitem>
|
---|
| 530 | </varlistentry>
|
---|
| 531 |
|
---|
| 532 | <varlistentry id="qemu-system">
|
---|
| 533 | <term><command>qemu-system-x86_64</command></term>
|
---|
| 534 | <listitem>
|
---|
| 535 | <para>is the QEMU PC System emulator.</para>
|
---|
[2f6053d] | 536 | <indexterm zone="qemu qemu-system">
|
---|
[d28198d3] | 537 | <primary sortas="b-qemu-system">qemu-system-x86_64</primary>
|
---|
| 538 | </indexterm>
|
---|
| 539 | </listitem>
|
---|
| 540 | </varlistentry>
|
---|
| 541 |
|
---|
[cb0bbd2] | 542 | <varlistentry id="virtfs-proxy-helper">
|
---|
| 543 | <term><command>virtfs-proxy-helper</command></term>
|
---|
| 544 | <listitem>
|
---|
| 545 | <para>creates a socket pair or a named socket. QEMU and proxy helper
|
---|
| 546 | communicate using this socket. QEMU proxy fs driver sends
|
---|
| 547 | filesystem request to proxy helper and receives the response
|
---|
| 548 | from it.</para>
|
---|
| 549 | <indexterm zone="qemu virtfs-proxy-helper">
|
---|
| 550 | <primary sortas="b-virtfs-proxy-helper">virtfs-proxy-helper</primary>
|
---|
| 551 | </indexterm>
|
---|
| 552 | </listitem>
|
---|
| 553 | </varlistentry>
|
---|
| 554 |
|
---|
| 555 | <varlistentry id="vscclient">
|
---|
| 556 | <term><command>vscclient</command></term>
|
---|
| 557 | <listitem>
|
---|
| 558 | <para>implements a sockets interface to the virtual CCID reader
|
---|
| 559 | on the guest.</para>
|
---|
| 560 | <indexterm zone="qemu vscclient">
|
---|
| 561 | <primary sortas="b-vscclient">vscclient</primary>
|
---|
| 562 | </indexterm>
|
---|
| 563 | </listitem>
|
---|
| 564 | </varlistentry>
|
---|
| 565 |
|
---|
[9b13441] | 566 | <varlistentry id="libcacard">
|
---|
| 567 | <term><filename class="libraryfile">libcacard.so</filename></term>
|
---|
| 568 | <listitem>
|
---|
| 569 | <para>is the Virtual Smart Card Emulator library.</para>
|
---|
| 570 | <indexterm zone="qemu libcacard">
|
---|
| 571 | <primary sortas="c-libcacard">libcacard.so</primary>
|
---|
| 572 | </indexterm>
|
---|
| 573 | </listitem>
|
---|
| 574 | </varlistentry>
|
---|
| 575 |
|
---|
[d28198d3] | 576 | </variablelist>
|
---|
| 577 |
|
---|
| 578 | </sect2>
|
---|
| 579 |
|
---|
| 580 | </sect1>
|
---|