/vagrantのマウントに失敗 – その2

表題の通り。また最近使っていて同じ現象(?)に当たったので、以前にも書いたのと似たようなものだけど書いておく。

■ 環境

  • Vagrant 1.9.1
  • Mac OSX El Capitan

■ bento/centos-6.7

CentOS 6“のVMを使いたくて下記boxを利用している。

Vagrant box bento/centos-6.7 | Atlas by HashiCorp
https://atlas.hashicorp.com/bento/boxes/centos-6.7

このboxを起動すると、いつも下記のような黄色いメッセージと最後に赤いメッセージで起動に失敗となってしまう。複数のVMを起動しようとしてるときは、最初のVMで失敗してしまうので後続が起動してくれない。

$ vagrant up centos67
  :
[cent67] GuestAdditions versions on your host (5.1.16) and guest (5.0.20) do not match.
  :
Installing Virtualbox Guest Additions 5.1.16 - guest version is 5.0.20
  :
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.20
VBoxService inside the vm claims: 5.1.16
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.20
VBoxService inside the vm claims: 5.1.16
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.20
VBoxService inside the vm claims: 5.1.16
Going on, assuming VBoxService is correct...
Restarting VM to apply changes...
  :
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=500,gid=500 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

$

/vagrant“はもちろんマウントできていない。VM側の”Guest Addition“が古いのが原因のようである。しかし”bento/centos-6.7“のversionはこれ以上新しいものはリリースされていない。

$ vagrant box list
bento/centos-6.7 (virtualbox, 2.2.7)
centos/7         (virtualbox, 1608.02)
ubuntu/trusty64  (virtualbox, 20170222.0.0)
ubuntu/xenial64  (virtualbox, 20170331.0.0)
$

状況を確認する。プラグイン。

$ vagrant plugin list
vagrant-share (1.1.6, system)
vagrant-vbguest (0.13.0)
$

vbguest“のプラグインが新しくなっていないか?と思い確認。

$ vagrant plugin update vagrant-vbguest
Updating plugins: vagrant-vbguest. This may take a few minutes...
All plugins are up to date.
$

`update`対象は無いようである。”vbguest“の状態を確認する。

$ vagrant vbguest cent67 --status
[cent67] No installation found.
$
$ vagrant vbguest cent67
[cent67] No installation found.
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: mirror.qoxy.com
 * updates: mirror.vodien.com
No package kernel-devel-2.6.32-573.el6.x86_64 available.
Package gcc-4.4.7-18.el6.x86_64 already installed and latest version
Package binutils-2.20.51.0.2-5.47.el6_9.1.x86_64 already installed and latest version
Package 1:make-3.81-23.el6.x86_64 already installed and latest version
Package 4:perl-5.10.1-144.el6.x86_64 already installed and latest version
Package bzip2-1.0.5-7.el6_0.x86_64 already installed and latest version
Nothing to do
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 5.1.16 - guest version is unknown
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.16 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.16 of VirtualBox Guest Additions...
vboxadd.sh: Stopping VirtualBox Additions.
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.

$
$ vagrant vbguest cent67 --status
[cent67] No installation found.
$

状況は変わらない。以前のエントリの通りログインして操作することにする。

$ vagrant ssh cent67
[vagrant@cent67 ~]$ sudo yum update

VMを再起動してみる。

$ vagrant reload cent67
  :
[cent67] No installation found.
  :
Installing Virtualbox Guest Additions 5.1.16 - guest version is unknown
  :
$

気になるメッセージはまた表示されているが、マウントはしてくれた。

一度起動して対応して…と、最初の起動時からは解決できていないので根本解決にはなっていないが仕方が無い。

以上。

■ 関連

VirtualBoxの/vagrantがマウントに失敗

コメントを残す

メールアドレスが公開されることはありません。

CAPTCHA


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください