Amazon

2014年10月25日土曜日

vagrantの共有フォルダエラー

vagrantで共有フォルダー作成時に下記のエラーが出ました。

$ git init remote.git
==> default: Mounting shared folders...
default: /vagrant => /home/vagrant/oraclelinux7
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

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

The error output from the last command was:

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

VirtualBoxのGuest Additionのバージョンが古いのが原因でした。
Guest Additionを自動的にアップグレードするプラグインをインストールします。

$ git init remote.git
$  vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.10.0)'!
$ 

再度、vagrant upすると下記のように自動的に新しいGuest Additionをインストールして共有フォルダーを作成します。

==> default: Machine booted and ready!
GuestAdditions versions on your host (4.3.18) and guest (4.3.16) do not match.
No package kernel-devel-3.8.13-44.1.3.el7uek.x86_64 available.
Package gcc-4.8.2-16.2.el7_0.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package 4:perl-5.16.3-283.el7.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 4.3.18 - guest version is 4.3.16
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.18 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.16 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
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[  OK  ]
Doing non-kernel setup of the Guest Additions[  OK  ]
Starting the VirtualBox Guest Additions [  OK  ]
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.18. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
==> default: Checking for guest additions in VM...

0 件のコメント: