vagrant 1.5 以降にupgrade

vagrant cloud のアカウント作成

vagrant cloud にログイン

% vagrant login
In a moment we'll ask for your username and password to Vagrant Cloud.
After authenticating, we will store an access token locally. Your
login details will be transmitted over a secure connection, and are
never stored on disk locally.
If you don't have a Vagrant Cloud account, sign up at vagrantcloud.com
Username or Email: YOUR USERNAME
Password (will be hidden):
You're now logged in!

Summary

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

Summary

[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.
Guest Additions Version: 4.1.8
VirtualBox Version: 4.2

ゲスト側で VBoxGuestAdditions.iso をマウント

VBoxGuestAdditions の更新

$ cd /media/cdrom0
$ ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.18 Guest Additions for Linux............
This program must be run with administrator privileges. Aborting
vagrant@debian:/media/cdrom0$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.18 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.1.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
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
Installing the Window System drivers ...fail!
(Could not find the X.Org or XFree86 Window System.)