[Vagrant]共有ディレクトリのマウントが失敗する

環境

  • HOST

    • Mac OS X 10.8
    • Vagrant 1.3.2
    • Virtual Box 4.2.18
    • ruby 1.9.3p392
  • GUEST

    • CentOS 6.3 minimal

エラー内容

vagrantから新規仮想マシンを作成し、ホストOSとゲストOSの共有ディレクトリの設定後、起動させたところ 下記のエラーが出力された。

1
2
3
4
5
6
7
8
9
10
11
12
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /share /share

Stdout from the command:



Stderr from the command:

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

Guest additionsが正常にインストールされていないようなので /var/log/vboxadd-install.log を確認する。

1
2
3
4
5
6
7
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)

automake, autoconf がインストールされてない…

1
$ sudo yum install automake autoconf

Guest additionsの再インストール

ログアウト後

1
2
$ vagrant vbguest --do install # requier vagrant-vbguest
$ vagrant reload

これで共有設定が反映される。

Comments