Virtual Box に CentOS 6.3 の仮想マシンを作りましたよ。

vbox_logo

そしたら、Guest Additions のインストールが一筋縄ではいかなかったので、そこでの対処方法を書きます。

スポンサーリンク

まず、"VBoxLinuxAdditions.run" を実行したら、以下メッセージが。

The gcc utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-279.el6.x86_64

Building the main Guest Additions module                   [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions              [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.10 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]

インストールのパッケージ種類に "Minimum Desktop" 選んだからか・・・
gcc と kernel-devel がねーぞと叱られてます。

そこで、yum を使って2つのパッケージ群をインストール

# yum install gcc
# yum install kernel-devel

それでも、まだ以下のようなメッセージが出て怒られる・・・

# '/media/VBOXADDITIONS_4.1.18_78361/VBoxLinuxAdditions.run' 
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.18 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.18 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-279.el6.x86_64

Building the main Guest Additions module                   [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions              [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.10 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]

うーむ、そうなのか。"kernel-devel-2.6.32-279.el6.x86_64" をインストールせぇと・・・
さっき yum でインストールされたのは、別の version らしい。

以下のコマンドを使って、再度インストールを実行。

# yum install kernel-devel-2.6.32-279.el6.x86_64

まだエラーがでるな・・・

# '/media/VBOXADDITIONS_4.1.18_78361/VBoxLinuxAdditions.run' 
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.18 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.18 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
Building the shared folder support module                  [  OK  ]
Building the OpenGL support module                         [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions              [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.10 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]

でも、失敗となっている OpenGL を使用したそこまでのグラフィック機能は使う予定ないし、これで再起動してみる。

再起動後、ディスプレイサイズの変更、マウスカーソルの統合、共有フォルダが使用できたことを確認。 ヨシとしよう!



スポンサーリンク