VirtualBox

source: vbox/trunk/doc/manual/en_US/user_Installation.xml@ 33539

最後變更 在這個檔案從33539是 31735,由 vboxsync 提交於 14 年 前

export the manual to OSE

檔案大小: 38.0 KB
 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4<chapter id="installation">
5 <title>Installation details</title>
6
7 <para>As installation of VirtualBox varies depending on your host operating
8 system, we provide installation instructions in four separate chapters for
9 Windows, Mac OS X, Linux and Solaris, respectively.</para>
10
11 <sect1>
12 <title>Installing on Windows hosts</title>
13
14 <sect2>
15 <title>Prerequisites</title>
16
17 <para>For the various versions of Windows that we support as host
18 operating systems, please refer to <xref
19 linkend="hostossupport" />.</para>
20
21 <para>In addition, Windows Installer 1.1 or higher must be present on
22 your system. This should be the case if you have all recent Windows
23 updates installed.</para>
24 </sect2>
25
26 <sect2>
27 <title>Performing the installation</title>
28
29 <para>The VirtualBox installation can be started <itemizedlist>
30 <listitem>
31 <para>either by double-clicking on its executable file (contains
32 both 32- and 64-bit architectures)</para>
33 </listitem>
34
35 <listitem>
36 <para>or by entering <screen>VirtualBox.exe -extract</screen></para>
37
38 <para>on the command line. This will extract both installers into
39 a temporary directory in which you'll then find the usual .MSI
40 files. Then you can do a <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi</screen>
41 to perform the installation.</para>
42 </listitem>
43 </itemizedlist></para>
44
45 <para>In either case, this will display the installation welcome dialog
46 and allow you to choose where to install VirtualBox to and which
47 components to install. In addition to the VirtualBox application, the
48 following components are available:<glosslist>
49 <glossentry>
50 <glossterm>USB support</glossterm>
51
52 <glossdef>
53 <para>This package contains special drivers for your Windows
54 host that VirtualBox requires to fully support USB devices
55 inside your virtual machines.</para>
56 </glossdef>
57 </glossentry>
58
59 <glossentry>
60 <glossterm>Networking</glossterm>
61
62 <glossdef>
63 <para>This package contains extra networking drivers for your
64 Windows host that VirtualBox needs to support Host Interface
65 Networking (to make your VM's virtual network cards accessible
66 from other machines on your physical network).</para>
67 </glossdef>
68 </glossentry>
69
70 <glossentry>
71 <glossterm>Python Support</glossterm>
72
73 <glossdef>
74 <para>This package contains Python scripting support for the
75 VirtualBox API (see <xref linkend="VirtualBoxAPI" />). To get this
76 feature installed an already working Python installation on the
77 system is required.</para>
78 </glossdef>
79 </glossentry>
80 </glosslist></para>
81
82 <para>Depending on your Windows configuration, you may see warnings
83 about "unsigned drivers" or similar. Please select "Continue" on these
84 warnings as otherwise VirtualBox might not function correctly after
85 installation.</para>
86
87 <para>The installer will create a "VirtualBox" group in the programs
88 startup folder which allows you to launch the application and access its
89 documentation.</para>
90
91 <para>With standard settings, VirtualBox will be installed for all users
92 on the local system. In case this is not wanted, you have to invoke the
93 installer by first extracting it by using <screen>VirtualBox.exe -extract</screen>
94 and then do as follows: <screen>VirtualBox.exe -msiparams ALLUSERS=2</screen>
95 or <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi ALLUSERS=2</screen>
96 on the extracted .MSI files. This will install VirtualBox only for the
97 current user.</para>
98
99 <para>To not install certain features of VirtualBox there is an <computeroutput>ADDLOCAL</computeroutput>
100 parameter that can be specified additionally to explicitly name the features
101 to be installed. The following features are available:
102
103 <glosslist>
104 <glossentry>
105 <glossterm>VBoxApplication</glossterm>
106
107 <glossdef>
108 <para>Main binaries of VirtualBox.
109 <note>This feature never can be absent,
110 since it contains the minimum set of files to have working VirtualBox installation!</note>
111 </para>
112 </glossdef>
113 </glossentry>
114
115 <glossentry>
116 <glossterm>VBoxUSB</glossterm>
117
118 <glossdef>
119 <para>USB support.</para>
120 </glossdef>
121 </glossentry>
122
123 <glossentry>
124 <glossterm>VBoxNetwork</glossterm>
125
126 <glossdef>
127 <para>All networking support; includes the VBoxNetworkFlt and VBoxNetworkAdp features (see below).</para>
128 </glossdef>
129 </glossentry>
130
131 <glossentry>
132 <glossterm>VBoxNetworkFlt</glossterm>
133
134 <glossdef>
135 <para>Bridged networking support.</para>
136 </glossdef>
137 </glossentry>
138
139 <glossentry>
140 <glossterm>VBoxNetworkAdp</glossterm>
141
142 <glossdef>
143 <para>Host-only networking support.</para>
144 </glossdef>
145 </glossentry>
146
147 <glossentry>
148 <glossterm>VBoxPython</glossterm>
149
150 <glossdef>
151 <para>Python support.</para>
152 </glossdef>
153 </glossentry>
154 </glosslist>
155
156 To only install USB support along with the main binaries, do a:
157 <screen>VirtualBox.exe -msiparams ADDLOCAL=VBoxApplication,VBoxUSB</screen>
158 or <screen>msiexec /i VirtualBox-&lt;version&gt;-MultiArch_&lt;x86|amd64&gt;.msi ADDLOCAL=VBoxApplication,VBoxUSB</screen></para>
159
160 </sect2>
161
162 <sect2>
163 <title>Uninstallation</title>
164
165 <para>As we use the Microsoft Installer, VirtualBox can be safely
166 uninstalled at any time by choosing the program entry in the "Add/Remove
167 Programs" applet in the Windows Control Panel.</para>
168 </sect2>
169
170 <sect2>
171 <title>Unattended installation</title>
172
173 <para>Unattended installations can be performed using the standard MSI
174 support.</para>
175 </sect2>
176 </sect1>
177
178 <sect1>
179 <title>Installing on Mac OS X hosts</title>
180
181 <sect2>
182 <title>Performing the installation</title>
183
184 <para>For Mac OS X hosts, VirtualBox ships in a disk image (dmg) file.
185 Perform the following steps: <orderedlist>
186 <listitem>
187 <para>Double-click on that file to have its contents
188 mounted.</para>
189 </listitem>
190
191 <listitem>
192 <para>A window will open telling you to double click on the
193 <computeroutput>VirtualBox.mpkg</computeroutput> installer file
194 displayed in that window.</para>
195 </listitem>
196
197 <listitem>
198 <para>This will start the installer, which will allow you to
199 select where to install VirtualBox to.</para>
200 </listitem>
201 </orderedlist></para>
202
203 <para>After installation, you can find a VirtualBox icon in the
204 "Applications" folder in the Finder.</para>
205 </sect2>
206
207 <sect2>
208 <title>Uninstallation</title>
209
210 <para>To uninstall VirtualBox, open the disk image (dmg) file again and
211 double-click on the uninstall icon contained therein.</para>
212 </sect2>
213
214 <sect2>
215 <title>Unattended installation</title>
216
217 <para>To perform a non-interactive installation of VirtualBox you can
218 use the command line version of the installer application.</para>
219
220 <para>Mount the disk image (dmg) file as described in the normal
221 installation. Then open a terminal session and execute:</para>
222
223 <screen>sudo installer -pkg /Volumes/VirtualBox/VirtualBox.mpkg \
224 -target /Volumes/Macintosh\ HD</screen>
225 </sect2>
226 </sect1>
227
228 <sect1>
229 <title id="install-linux-host">Installing on Linux hosts</title>
230
231 <sect2>
232 <title>Prerequisites</title>
233
234 <para>For the various versions of Linux that we support as host
235 operating systems, please refer to <xref
236 linkend="hostossupport" />.</para>
237
238 <para>You will need to install the following packages on your Linux
239 system before starting the installation (some systems will do this for
240 you automatically when you install VirtualBox):</para>
241
242 <itemizedlist>
243 <listitem>
244 <para>Qt 4.4.0 or higher;</para>
245 </listitem>
246
247 <listitem>
248 <para>SDL 1.2.7 or higher (this graphics library is typically called
249 <computeroutput>libsdl</computeroutput> or similar).</para>
250 </listitem>
251 </itemizedlist>
252
253 <note>
254 <para>To be precise, these packages are only required if you want to
255 run the VirtualBox graphical user interfaces. In particular,
256 <computeroutput>VirtualBox</computeroutput>, our main graphical user
257 interface, requires both Qt and SDL;
258 <computeroutput>VBoxSDL</computeroutput>, our simplified GUI, requires
259 only SDL. By contrast, if you only want to run the headless VRDP
260 server that comes with VirtualBox, neither Qt nor SDL are
261 required.</para>
262 </note>
263 </sect2>
264
265 <sect2 id="externalkernelmodules">
266 <title>The VirtualBox kernel module</title>
267
268 <para>VirtualBox uses a special kernel module to perform physical memory
269 allocation and to gain control of the processor for guest system
270 execution. Without this kernel module, you will still be able to work
271 with virtual machines in the configuration interface, but you will not
272 be able to start any virtual machines.</para>
273
274 <para>The VirtualBox kernel module is automatically installed on your
275 system when you install VirtualBox. To maintain it with future kernel
276 updates, for recent Linux distributions -- for example Fedora Core 5 and
277 later, Ubuntu 7.10 (Gutsy) and later and Mandriva 2007.1 and later --,
278 generally we recommend installing Dynamic Kernel Module Support
279 (DKMS)<footnote>
280 <para>See <ulink
281 url="http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support">http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support</ulink>
282 for an introduction.</para>
283 </footnote>. This framework helps to build kernel modules and to deal
284 with kernel upgrades.</para>
285
286 <para>If DKMS is not already installed, execute one of the following:
287 <itemizedlist>
288 <listitem>
289 <para>On an Ubuntu system:</para>
290
291 <screen>sudo apt-get install dkms</screen>
292 </listitem>
293
294 <listitem>
295 <para>On a Fedora system:<screen>yum install dkms</screen></para>
296 </listitem>
297
298 <listitem>
299 <para>On a Mandriva system:<screen>urpmi dkms</screen></para>
300 </listitem>
301 </itemizedlist></para>
302
303 <para>If DKMS is available and installed, the VirtualBox kernel module
304 should always work automatically, and it will be automatically rebuilt
305 if your host kernel is updated.</para>
306
307 <para>Otherwise, there are only two situations in which you will need to
308 worry about the kernel module:<orderedlist>
309 <listitem>
310 <para>The original installation fails. This probably means that
311 your Linux system is not prepared for building external kernel
312 modules.</para>
313
314 <para>Most Linux distributions can be set up simply by installing
315 the right packages - normally, these will be the GNU compiler
316 (GCC), GNU Make (make) and packages containing header files for
317 your kernel - and making sure that all system updates are
318 installed and that the system is running the most up-to-date
319 kernel included in the distribution. <emphasis>The version numbers
320 of the header file packages must be the same as that of the kernel
321 you are using.</emphasis></para>
322
323 <itemizedlist>
324 <listitem>
325 <para>With Debian and Ubuntu releases, you must install the
326 right version of the
327 <computeroutput>linux-headers</computeroutput> and if it
328 exists the <computeroutput>linux-kbuild</computeroutput>
329 package. Current Ubuntu releases should have the right
330 packages installed by default.</para>
331 </listitem>
332
333 <listitem>
334 <para>In even older Debian and Ubuntu releases, you must
335 install the right version of the
336 <computeroutput>kernel-headers</computeroutput>
337 package.</para>
338 </listitem>
339
340 <listitem>
341 <para>On Fedora and Redhat systems, the package is
342 <computeroutput>kernel-devel</computeroutput>.</para>
343 </listitem>
344
345 <listitem>
346 <para>On SUSE and openSUSE Linux, you must install the right
347 versions of the <computeroutput>kernel-source</computeroutput>
348 and <computeroutput>kernel-syms</computeroutput>
349 packages.</para>
350 </listitem>
351
352 <listitem>
353 <para>Alternatively, if you have built your own kernel,
354 <computeroutput>/usr/src/linux</computeroutput> should point
355 to your kernel sources. If you have not removed the files
356 created during the build process, then your system will
357 already be set up correctly.</para>
358 </listitem>
359 </itemizedlist>
360 </listitem>
361
362 <listitem>
363 <para>The kernel of your Linux host got updated. In that case, the
364 kernel module will need to be reinstalled by executing (as
365 root):</para>
366
367 <screen>/etc/init.d/vboxdrv setup</screen>
368 </listitem>
369 </orderedlist></para>
370 </sect2>
371
372 <sect2>
373 <title>USB and advanced networking support</title>
374
375 <para>In order to use VirtualBox's USB support, the user account under
376 which you intend to run VirtualBox must have read and write access to
377 the USB filesystem (<computeroutput>usbfs</computeroutput>).</para>
378
379 <para>In addition, access to
380 <computeroutput>/dev/net/tun</computeroutput> will be required if you
381 want to use Host Interface Networking, which is described in detail in
382 <xref linkend="network_bridged" />.</para>
383
384 <!--TODO Write a couple of notes about hardened kernels. If PaX is installed, VBox presently doesn't start. I tried with a
385gentoo hardened kernel that had PaX enabled, and VBoxHeadless failed with really funny VERR_NO_MEMORY messages. Discussing
386it with Knut revealed that PaX might be the problem, and running paxctl to disable these protections actually
387helped. For reference:
388First run paxctl -C VBoxVDRP to have the executable modified to support PaX flags in the first place.
389Then paxctl -pemrxs VBoxHeadless to disable all protections. TODO: Figure out which ones are really needed.-->
390 </sect2>
391
392 <sect2>
393 <title>Performing the installation</title>
394
395 <para>VirtualBox is available in a number of package formats native to
396 various common Linux distributions (see <xref linkend="hostossupport" />
397 for details). In addition, there is an alternative generic installer
398 (.run) which should work on most Linux distributions.</para>
399
400 <sect3>
401 <title>Installing VirtualBox from a Debian/Ubuntu package</title>
402
403 <para>First, download the appropriate package for your distribution.
404 The following examples assume that you are installing to a 32-bit Ubuntu
405 Karmic system. Use <computeroutput>dpkg</computeroutput> to install the
406 Debian package:</para>
407
408 <screen>sudo dpkg -i VirtualBox-3.2_$VBOX_VERSION_STRING_Ubuntu_karmic_i386.deb</screen>
409
410 <para>You will be asked to accept the VirtualBox Personal Use and
411 Evaluation License. Unless you answer "yes" here, the installation
412 will be aborted.</para>
413
414 <para>The group <computeroutput>vboxusers</computeroutput> will be
415 created during installation. Note that a user who is going to run
416 VirtualBox must be member of that group. A user can be made member of
417 the group <computeroutput>vboxusers</computeroutput> through the GUI
418 user/group management or at the command line with</para>
419
420 <screen>sudo usermod -a -G vboxusers username</screen>
421
422 <para>Also note that adding an active user to that group will require
423 that user to log out and back in again. This should be done manually
424 after successful installation of the package.</para>
425
426 <para>The installer will also search for a VirtualBox kernel module
427 suitable for your kernel. The package includes pre-compiled modules
428 for the most common kernel configurations. If no suitable kernel
429 module is found, the installation script tries to build a module
430 itself. If the build process is not successful you will be shown a
431 warning and the package will be left unconfigured. Please have a look
432 at <computeroutput>/var/log/vbox-install.log</computeroutput> to find
433 out why the compilation failed. You may have to install the
434 appropriate Linux kernel headers (see <xref
435 linkend="externalkernelmodules" />). After correcting any problems, do
436 <screen>sudo /etc/init.d/vboxdrv setup</screen>This will start a
437 second attempt to build the module.</para>
438
439 <para>If a suitable kernel module was found in the package or the
440 module was successfully built, the installation script will attempt to
441 load that module. If this fails, please see <xref
442 linkend="linuxkernelmodulefailstoload" /> for further
443 information.</para>
444
445 <para>Once VirtualBox has been successfully installed and configured,
446 you can start it by selecting "VirtualBox" in your start menu or from
447 the command line (see <xref linkend="startingvboxonlinux" />).</para>
448 </sect3>
449
450 <sect3>
451 <title>Using the alternative installer (VirtualBox.run)</title>
452
453 <para>The alternative installer performs the following steps:</para>
454
455 <itemizedlist>
456 <listitem>
457 <para>It unpacks the application files to a target directory of
458 choice. By default, <screen>/opt/VirtualBox/</screen> will be
459 used.</para>
460 </listitem>
461
462 <listitem>
463 <para>It builds the VirtualBox kernel module
464 (<computeroutput>vboxdrv</computeroutput>) and installs it.</para>
465 </listitem>
466
467 <listitem>
468 <para>It creates
469 <computeroutput>/etc/init.d/vboxdrv</computeroutput>, an init
470 script to start the VirtualBox kernel module.</para>
471 </listitem>
472
473 <listitem>
474 <para>It creates a new system group called
475 <computeroutput>vboxusers</computeroutput>.</para>
476 </listitem>
477
478 <listitem>
479 <para>It creates symbolic links to
480 <computeroutput>VirtualBox</computeroutput>,
481 <computeroutput>VBoxSDL</computeroutput>,
482 <computeroutput>VBoxVRDP</computeroutput>,
483 <computeroutput>VBoxHeadless</computeroutput> and
484 <computeroutput>VBoxManage</computeroutput> in
485 <computeroutput>/usr/bin</computeroutput>.</para>
486 </listitem>
487
488 <listitem>
489 <para>It creates
490 <computeroutput>/etc/udev/60-vboxdrv.rules</computeroutput>, a
491 description file for udev, if that is present, which makes the
492 module accessible to anyone in the group
493 <computeroutput>vboxusers</computeroutput>.</para>
494 </listitem>
495
496 <listitem>
497 <para>It writes the installation directory to
498 <computeroutput>/etc/vbox/vbox.cfg</computeroutput>.</para>
499 </listitem>
500 </itemizedlist>
501
502 <para>The installer must be executed as root with either
503 <computeroutput>install</computeroutput> or
504 <computeroutput>uninstall</computeroutput> as the first parameter. If
505 you do not want the installer to ask you whether you wish to accept
506 the license agreement (for example, for performing unattended
507 installations), you can add the parameter
508 <computeroutput>license_accepted_unconditionally</computeroutput>.
509 Finally, if you want to use a directory other than the default
510 installation directory, add the desired path as an extra
511 parameter.</para>
512
513 <screen>sudo ./VirtualBox.run install /opt/VirtualBox</screen>
514
515 <para>Or if you do not have the "sudo" command available, run the
516 following as root instead:<screen>./VirtualBox.run install /opt/VirtualBox</screen></para>
517
518 <para>After that you need to put every user which should be able to
519 use VirtualBox in the group
520 <computeroutput>vboxusers</computeroutput>, either through the GUI
521 user management tools or by running the following command as
522 root:</para>
523
524 <screen>sudo usermod -a -G vboxusers username</screen>
525
526 <para><note>
527 <para>The <computeroutput>usermod</computeroutput> command of some
528 older Linux distributions does not support the
529 <computeroutput>-a</computeroutput> option (which adds the user to
530 the given group without affecting membership of other groups). In
531 this case, find out the current group memberships with the
532 <computeroutput>groups</computeroutput> command and add all these
533 groups in a comma-separated list to the command line after the
534 <computeroutput>-G</computeroutput> option, e.g. like this:
535 <computeroutput>usermod -G group1,group2,vboxusers
536 username</computeroutput>.</para>
537 </note>If any users on your system should be able to access host USB
538 devices from within VirtualBox guests, you should also add them to the
539 appropriate user group that your distribution uses for USB access,
540 e.g. <computeroutput>usb</computeroutput> or
541 <computeroutput>usbusers</computeroutput>.</para>
542 </sect3>
543
544 <sect3>
545 <title>Performing a manual installation</title>
546
547 <para>If, for any reason, you cannot use the shell script installer
548 described previously, you can also perform a manual installation.
549 Invoke the installer like this:</para>
550
551 <screen>./VirtualBox.run --keep --noexec</screen>
552
553 <para>This will unpack all the files needed for installation in the
554 directory <computeroutput>install</computeroutput> under the current
555 directory. The VirtualBox application files are contained in
556 <computeroutput>VirtualBox.tar.bz2</computeroutput> which you can
557 unpack to any directory on your system. For example:</para>
558
559 <screen>sudo mkdir /opt/VirtualBox
560sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox</screen>
561
562 <para>or as root:<screen>mkdir /opt/VirtualBox
563tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox</screen></para>
564
565 <para>The sources for VirtualBox's kernel module are provided in the
566 <computeroutput>src</computeroutput> directory. To build the module,
567 change to the directory and issue</para>
568
569 <screen>make</screen>
570
571 <para>If everything builds correctly, issue the following command to
572 install the module to the appropriate module directory:</para>
573
574 <screen>sudo make install</screen>
575
576 <para>In case you do not have sudo, switch the user account to root
577 and perform<screen>make install</screen></para>
578
579 <para>The VirtualBox kernel module needs a device node to operate. The
580 above make command will tell you how to create the device node,
581 depending on your Linux system. The procedure is slightly different
582 for a classical Linux setup with a
583 <computeroutput>/dev</computeroutput> directory, a system with the now
584 deprecated <computeroutput>devfs</computeroutput> and a modern Linux
585 system with <computeroutput>udev</computeroutput>.</para>
586
587 <para>On certain Linux distributions, you might experience
588 difficulties building the module. You will have to analyze the error
589 messages from the build system to diagnose the cause of the problems.
590 In general, make sure that the correct Linux kernel sources are used
591 for the build process.</para>
592
593 <para>Note that the user who is going to run VirtualBox needs read and
594 write permission on the VirtualBox kernel module device node
595 <computeroutput>/dev/vboxdrv</computeroutput>. You can either define a
596 <computeroutput>vboxusers</computeroutput> group by entering<screen>groupadd vboxusers
597chgrp vboxusers /dev/vboxdrv
598chmod 660 /dev/vboxdrv</screen>or, alternatively, simply give all users access
599 (insecure, not recommended!)<screen>chmod 666 /dev/vboxdrv</screen>You
600 should also add any users who will be allowed to use host USB devices
601 in VirtualBox guests to the appropriate USB users group for your
602 distribution. This group is often called
603 <computeroutput>usb</computeroutput> or
604 <computeroutput>usbusers</computeroutput>.</para>
605
606 <para>Next, you will have to install the system initialization script
607 for the kernel module:<screen>cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv</screen>(assuming
608 you installed VirtualBox to the
609 <computeroutput>/opt/VirtualBox</computeroutput> directory) and
610 activate the initialization script using the right method for your
611 distribution. You should create VirtualBox's configuration
612 file:<screen>mkdir /etc/vbox
613echo INSTALL_DIR=/opt/VirtualBox &gt; /etc/vbox/vbox.cfg</screen>and, for
614 convenience, create the following symbolic links:</para>
615
616 <screen>ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
617ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSVC
618ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
619ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
620ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL</screen>
621 </sect3>
622
623 <sect3>
624 <title>Updating and uninstalling VirtualBox</title>
625
626 <para>Before updating or uninstalling VirtualBox, you must terminate
627 any virtual machines which are currently running and exit the
628 VirtualBox or VBoxSVC applications. To update VirtualBox, simply run
629 the installer of the updated version. To uninstall VirtualBox, invoke
630 the installer like this: <screen>sudo ./VirtualBox.run uninstall</screen>
631 or as root<screen>./VirtualBox.run uninstall</screen>. Starting with
632 version 2.2.2, you can uninstall the .run package by invoking <screen>/opt/VirtualBox/uninstall.sh</screen>To
633 manually uninstall VirtualBox, simply undo the steps in the manual
634 installation in reverse order.</para>
635 </sect3>
636
637 <sect3>
638 <title>Automatic installation of Debian packages</title>
639
640 <para>The Debian packages will request some user feedback when
641 installed for the first time. The debconf system is used to perform
642 this task. To prevent any user interaction during installation,
643 default values can be defined. A file
644 <computeroutput>vboxconf</computeroutput> can contain the following
645 debconf settings: <screen>virtualbox virtualbox/module-compilation-allowed boolean true
646virtualbox virtualbox/delete-old-modules boolean true</screen>The first line
647 allows compilation of the vboxdrv kernel module if no module was found
648 for the current kernel. The second line allows the package to delete
649 any old vboxdrv kernel modules compiled by previous
650 installations.</para>
651
652 <para>These default settings can be applied with <screen>debconf-set-selections vboxconf</screen>
653 prior to the installation of the VirtualBox Debian package.</para>
654
655 <para>In addition there are some common configuration options that can be set prior to
656 the installation, described in <xref linkend="linux_install_opts" />.</para>
657 </sect3>
658
659 <sect3>
660 <title>Automatic installation of .rpm packages</title>
661
662 <para>The .rpm format does not provide a configuration system
663 comparable to the debconf system. See <xref linkend="linux_install_opts" />
664 for how to set some common installation options provided by VirtualBox.</para>
665 </sect3>
666
667 <sect3>
668 <title id="linux_install_opts">Automatic installation options</title>
669 <para>To configure the installation process of our .deb and .rpm packages, a file
670 <computeroutput>/etc/default/virtualbox</computeroutput> is interpreted.
671 The automatic generation of the udev rule can be prevented by the following setting:
672 <screen>INSTALL_NO_UDEV=1</screen> The creation of the group vboxusers can be prevented
673 by <screen>INSTALL_NO_GROUP=1</screen> If the line <screen>INSTALL_NO_VBOXDRV=1</screen>
674 is specified, the package installer will not try to build the
675 <computeroutput>vboxdrv</computeroutput> kernel module if no module according to the
676 current kernel was found.</para>
677 </sect3>
678
679 </sect2>
680
681 <sect2 id="startingvboxonlinux">
682 <title>Starting VirtualBox on Linux</title>
683
684 <para>The easiest way to start a VirtualBox program is by running the
685 program of your choice (<computeroutput>VirtualBox</computeroutput>,
686 <computeroutput>VBoxManage</computeroutput>,
687 <computeroutput>VBoxSDL</computeroutput> or
688 <computeroutput>VBoxHeadless</computeroutput>) from a terminal. These
689 are symbolic links to <computeroutput>VBox.sh</computeroutput> that
690 start the required program for you.</para>
691
692 <para>The following detailed instructions should only be of interest if
693 you wish to execute VirtualBox without installing it first. You should
694 start by compiling the <computeroutput>vboxdrv</computeroutput> kernel
695 module (see above) and inserting it into the Linux kernel. VirtualBox
696 consists of a service daemon (<computeroutput>VBoxSVC</computeroutput>)
697 and several application programs. The daemon is automatically started if
698 necessary. All VirtualBox applications will communicate with the daemon
699 through Unix local domain sockets. There can be multiple daemon
700 instances under different user accounts and applications can only
701 communicate with the daemon running under the user account as the
702 application. The local domain socket resides in a subdirectory of your
703 system's directory for temporary files called
704 <computeroutput>.vbox-&lt;username&gt;-ipc</computeroutput>. In case of
705 communication problems or server startup problems, you may try to remove
706 this directory.</para>
707
708 <para>All VirtualBox applications
709 (<computeroutput>VirtualBox</computeroutput>,
710 <computeroutput>VBoxSDL</computeroutput>,
711 <computeroutput>VBoxManage</computeroutput> and
712 <computeroutput>VBoxHeadless</computeroutput>) require the VirtualBox
713 directory to be in the library path:</para>
714
715 <screen>LD_LIBRARY_PATH=. ./VBoxManage showvminfo "Windows XP"</screen>
716 </sect2>
717 </sect1>
718
719 <sect1>
720 <title id="install-solaris-host">Installing on Solaris hosts</title>
721
722 <para>For the various versions of Solaris that we support as host
723 operating systems, please refer to <xref
724 linkend="hostossupport" />.</para>
725
726 <para>If you have a previously installed instance of VirtualBox on your
727 Solaris host, please uninstall it first before installing a new instance.
728 Refer to <xref linkend="uninstallsolhost" /> for uninstall
729 instructions.</para>
730
731 <sect2>
732 <title>Performing the installation</title>
733
734 <para>VirtualBox is available as a standard Solaris package. Download
735 the VirtualBox SunOS package which includes both the 32-bit and 64-bit
736 versions of VirtualBox. <emphasis>The installation must be performed as
737 root and from the global zone</emphasis> as the VirtualBox installer
738 loads kernel drivers which cannot be done from non-global zones. To
739 verify which zone you are currently in, execute the
740 <computeroutput>zonename</computeroutput> command. Execute the following
741 commands:</para>
742
743 <screen>gunzip -cd VirtualBox-$VBOX_VERSION_STRING-SunOS.tar.gz | tar xvf -</screen>
744
745 <para>Starting with VirtualBox 3.1 the VirtualBox kernel package is no
746 longer a separate package and has been integrated into the main package.
747 Install the VirtualBox package using:</para>
748
749 <screen>pkgadd -d VirtualBox-$VBOX_VERSION_STRING-SunOS.pkg</screen>
750
751 <note>
752 <para>If you are using Solaris Zones, to install VirtualBox only into
753 the current zone and not into any other zone, use
754 <computeroutput>pkgadd -G</computeroutput>. For more information refer
755 to the <computeroutput>pkgadd</computeroutput> manual; see also <xref
756 linkend="solariszones" />.</para>
757 </note>
758
759 <para>The installer will then prompt you to enter the package you wish
760 to install. Choose "1" or "all" and proceed. Next the installer will ask
761 you if you want to allow the postinstall script to be executed. Choose
762 "y" and proceed as it is essential to execute this script which installs
763 the VirtualBox kernel module. Following this confirmation the installer
764 will install VirtualBox and execute the postinstall setup script.</para>
765
766 <para>Once the postinstall script has been executed your installation is
767 now complete. You may now safely delete the uncompressed package and
768 <computeroutput>autoresponse</computeroutput> files from your system.
769 VirtualBox would be installed in
770 <computeroutput>/opt/VirtualBox</computeroutput>.</para>
771 </sect2>
772
773 <sect2>
774 <title>Starting VirtualBox on Solaris</title>
775
776 <para>The easiest way to start a VirtualBox program is by running the
777 program of your choice (<computeroutput>VirtualBox</computeroutput>,
778 <computeroutput>VBoxManage</computeroutput>,
779 <computeroutput>VBoxSDL</computeroutput> or
780 <computeroutput>VBoxHeadless</computeroutput>) from a terminal. These
781 are symbolic links to <computeroutput>VBox.sh</computeroutput> that
782 start the required program for you.</para>
783
784 <para>Alternatively, you can directly invoke the required programs from
785 <computeroutput>/opt/VirtualBox</computeroutput>. Using the links
786 provided is easier as you do not have to type the full path.</para>
787
788 <para>You can configure some elements of the
789 <computeroutput>VirtualBox</computeroutput> Qt GUI such as fonts and
790 colours by executing <computeroutput>VBoxQtconfig</computeroutput> from
791 the terminal.</para>
792 </sect2>
793
794 <sect2>
795 <title id="uninstallsolhost">Uninstallation</title>
796
797 <para>Uninstallation of VirtualBox on Solaris requires root permissions.
798 To perform the uninstallation, start a root terminal session and
799 execute:</para>
800
801 <screen>pkgrm SUNWvbox</screen>
802
803 <para>After confirmation, this will remove VirtualBox from your
804 system.</para>
805
806 <para>If you are uninstalling VirtualBox version 3.0 or lower, you need
807 to remove the VirtualBox kernel interface package, execute:</para>
808
809 <para><screen>pkgrm SUNWvboxkern</screen></para>
810 </sect2>
811
812 <sect2>
813 <title>Unattended installation</title>
814
815 <para>To perform a non-interactive installation of VirtualBox we have
816 provided a response file named
817 <computeroutput>autoresponse</computeroutput> that the installer will
818 use for responses to inputs rather than ask them from you.</para>
819
820 <para>Extract the tar.gz package as described in the normal
821 installation. Then open a root terminal session and execute:</para>
822
823 <screen>pkgadd -d VirtualBox-$VBOX_VERSION_STRING-SunOS-x86 -n -a autoresponse SUNWvbox</screen>
824
825 <para>To perform a non-interactive uninstallation, open a root terminal
826 session and execute:</para>
827
828 <screen>pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox</screen>
829 </sect2>
830
831 <sect2>
832 <title id="solariszones">Configuring a zone for running
833 VirtualBox</title>
834
835 <para>Starting with VirtualBox 1.6 it is possible to run VirtualBox from
836 within Solaris zones. For an introduction of Solaris zones, please refer
837 to <ulink
838 url="http://www.sun.com/bigadmin/features/articles/solaris_zones.jsp">http://www.sun.com/bigadmin/features/articles/solaris_zones.jsp</ulink>.</para>
839
840 <para>Assuming that VirtualBox has already been installed into your
841 zone, you need to give the zone access to VirtualBox's device node. This
842 is done by performing the following steps. Start a root terminal and
843 execute:</para>
844
845 <screen>zonecfg -z vboxzone</screen>
846
847 <para>Inside the <computeroutput>zonecfg</computeroutput> prompt add the
848 <computeroutput>device</computeroutput> resource and
849 <computeroutput>match</computeroutput> properties to the zone. Here's
850 how it can be done:</para>
851
852 <screen>zonecfg:vboxzone&gt;add device
853zonecfg:vboxzone:device&gt;set match=/dev/vboxdrv
854zonecfg:vboxzone:device&gt;end
855zonecfg:vboxzone&gt;verify
856zonecfg:vboxzone&gt;exit</screen>
857
858 <para>If you are running VirtualBox 2.2.0 or above on OpenSolaris or
859 Nevada hosts, you should add a device for
860 <computeroutput>/dev/vboxusbmon</computeroutput> too, similar to what
861 was shown above. This does not apply to Solaris 10 hosts due to lack of
862 USB support.</para>
863
864 <para>Replace "vboxzone" with the name of the zone in which you intend
865 to run VirtualBox. Next reboot the zone using
866 <computeroutput>zoneadm</computeroutput> and you should be able to run
867 VirtualBox from within the configured zone.</para>
868 </sect2>
869 </sect1>
870</chapter>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette