vagrant の Shared folder が共有できない


vagrant up の際、以下メッセージが表示される。
そして、vagrant の Shared folder が共有できない。

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir -p /vagrant

Stdout from the command:

Stderr from the command:

sudo: no tty present and no askpass program specified

vbox の問題のようなので、 vbox をリビルドする。

# aptitude install build-essential module-assistant
# aptitude install linux-headers-amd64
# export KERN_DIR=/usr/src/linux-headers-X.X.X-X-amd64
# /etc/init.d/vboxadd setup
Removing existing VirtualBox non-DKMS kernel modules ...done.
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.

Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Building the OpenGL support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used



シドニーで働くプログラマーのBLOG - 2012-05-22 - Vagrantでmountエラーで、フォルダがShareされない

メモ超 - 2010-12-04 - CentOS5へのVBoxLinuxAdditionsインストール