Setup virtualboxguest61 » Historie » Version 1
Jeremias Keihsler, 03.02.2020 21:03
1 | 1 | Jeremias Keihsler | h1. Install Procedure für VirtualBox Guest Additions 6.1 |
---|---|---|---|
2 | |||
3 | h2. Requirements |
||
4 | |||
5 | To install VirtualBox guest additions you will need the following: |
||
6 | * a virtual machine |
||
7 | * a installed and supported operating system (e.g. CentOS 8.x) |
||
8 | * Virtualbox 6.1.2 or above |
||
9 | * root-access |
||
10 | * a fast internet connection |
||
11 | |||
12 | h2. Preliminary Note |
||
13 | |||
14 | This procedure is based on a documentation supplied by http://www.virtualbox.org/manual/ch04.html#idp11234128 |
||
15 | |||
16 | h2. Install Virtual Guest Additions |
||
17 | |||
18 | The VirtualBox Guest Additions for Linux are provided on the same virtual CD-ROM file as the Guest Additions for Windows. They also come with an installation program guiding you through the setup process, although, due to the significant differences between Linux distributions, installation may be slightly more complex than for a windows guest. |
||
19 | |||
20 | Installation generally involves the following steps: |
||
21 | |||
22 | h3. CentOS preperation |
||
23 | |||
24 | Before installing the Guest Additions, you will have to prepare your guest system for building external kernel modules. This works similarly as described in the section called “The VirtualBox kernel module”, except that this step must now be performed in your Linux guest instead of on a Linux host system, as described there. Again, as with Linux hosts, we recommend using DKMS if it is available for the guest system. If it is not installed, use this command for CentOS systems: |
||
25 | |||
26 | # Install EPEL repository |
||
27 | see [[repo_epel|EPEL]] |
||
28 | # update everything |
||
29 | In order to fully update your guest system, open a terminal and run as root |
||
30 | <pre><code class="bash"> |
||
31 | yum update |
||
32 | </code></pre> |
||
33 | # Install DKMS |
||
34 | Install Dynamic Kernel Module System: (automatically installs appropriate kernel modules per selected version) |
||
35 | <pre><code class="bash"> |
||
36 | yum --enablerepo epel install dkms |
||
37 | </code></pre> |
||
38 | Be sure to install DKMS before installing the Linux Guest Additions. If DKMS is not available or not installed, the guest kernel modules will need to be recreated manually as root whenever the guest kernel is updated using the command |
||
39 | <pre><code class="bash"> |
||
40 | /etc/init.d/vboxadd setup |
||
41 | </code></pre> |
||
42 | # install the gcc and kernel development packages |
||
43 | Install the GNU C compiler and the kernel development packages using |
||
44 | <pre><code class="bash"> |
||
45 | yum install gcc |
||
46 | </code></pre> |
||
47 | followed by |
||
48 | <pre><code class="bash"> |
||
49 | yum install kernel-devel |
||
50 | </code></pre> |
||
51 | # install additional tools |
||
52 | Install bzip2 |
||
53 | <pre><code class="bash"> |
||
54 | yum install bzip2 |
||
55 | </code></pre> |
||
56 | # reboot |
||
57 | Reboot your guest system in order to activate the updates and then proceed as described above. |
||
58 | <pre><code class="bash"> |
||
59 | reboot |
||
60 | </code></pre> |
||
61 | |||
62 | h3. installation of Guest Additions via X11 |
||
63 | |||
64 | Insert the VBoxGuestAdditions.iso CD file into your Linux guest's virtual CD-ROM drive. In the "Devices" menu in the virtual machine's menu bar, VirtualBox has a handy menu item named @Install guest additions@, which mounts the Guest Additions .iso file inside your virtual machine. |
||
65 | Change to the directory where your CD-ROM drive is mounted and execute as root: |
||
66 | <pre><code class="bash"> |
||
67 | sh ./VBoxLinuxAdditions.run |
||
68 | </code></pre> |
||
69 | |||
70 | Restart the guest. |
||
71 | <pre><code class="bash"> |
||
72 | reboot |
||
73 | </code></pre> |
||
74 | |||
75 | h3. installation of Guest Additions via CLI |
||
76 | |||
77 | On the host-side stop the guest and then insert the VBoxGuestAdditions.iso CD into the virtual CD-ROM drive via |
||
78 | <pre><code class="bash"> |
||
79 | VBoxManage modifyvm MyCentOSGuest --dvd /usr/share/virtualbox/VBoxGuestAdditions.iso |
||
80 | </code></pre> |
||
81 | if the CD is not mounted automatically on the guest-side you may do it manually by |
||
82 | <pre><code class="bash"> |
||
83 | mount -t iso9660 -o ro /dev/cdrom /media/ |
||
84 | </code></pre> |
||
85 | <pre><code class="bash"> |
||
86 | sh /media/VBoxLinuxAdditions.run |
||
87 | </code></pre> |
||
88 | <pre><code class="bash"> |
||
89 | umount /media/ |
||
90 | poweroff |
||
91 | </code></pre> |
||
92 | |||
93 | On the host-side you remove the CD-ROM by |
||
94 | <pre><code class="bash"> |
||
95 | VBoxManage modifyvm MyCentOSGuest --dvd none |
||
96 | </code></pre> |
||
97 | |||
98 | h2. Problem |