Vagrant mountエラー
vagrantでupとかreloadとかすると、いつも下記のように最後にエラーがでる。
Installing the Window System drivers[FAILED](Could not find the X.Org or XFree86 Window System.)An error occurred during installation of VirtualBox Guest Additions 4.3.6. Some functionality may not work as intended.In most cases it is OK that the "Window System drivers" installation failed.[default] Configuring and enabling network interfaces...[default] Mounting shared folders...[default] -- /vagrantFailed to mount folders in Linux guest. This is usually beacusethe "vboxsf" file system is not available. Please verify thatthe guest additions are properly installed in the guest andcan work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrantmount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrantまさしく一緒のエラー発見。vagrantでmountエラーの解決方法
$ ssh centos65Last login: Wed Feb 26 02:03:17 2014 from 10.0.2.2[vagrant@vagrant-centos65 ~]$ sudo /etc/init.d/vboxadd setupRemoving existing VirtualBox non-DKMS kernel modules [ OK ]Building the VirtualBox Guest Additions kernel modulesThe headers for the current running kernel were not found. If the followingmodule compilation fails then this could be the reason.The missing package can be probably installed withyum install kernel-devel-2.6.32-431.el6.x86_64
Building the main Guest Additions module [FAILED](Look at /var/log/vboxadd-install.log to find out what went wrong)Doing non-kernel setup of the Guest Additions [ OK ]むーなんか失敗した。yum install kernel-devel-2.6.32-431.el6.x86_64ってやっても無理。 vagrant で共有フォルダのマウントに失敗するときの対処 Vagrant で共有フォルダが使用できなくなったので解決メモ
これか、GuestAdditions versions on your host (4.3.6) and guest (4.3.4) do not match.
$ vagrant plugin install vagrant-vbguestInstalling the 'vagrant-vbguest' plugin. This can take a few minutes...Installed the plugin 'vagrant-vbguest (0.10.0)'!$ vagrant reload[default] Attempting graceful shutdown of VM...[default] Clearing any previously set forwarded ports...[default] Clearing any previously set network interfaces...[default] Preparing network interfaces based on configuration...[default] Forwarding ports...[default] -- 22 => 2222 (adapter 1)[default] Booting VM...[default] Waiting for machine to boot. This may take a few minutes...[default] Machine booted and ready!GuestAdditions versions on your host (4.3.6) and guest (4.3.4) do not match.Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * epel: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jpSetting up Install ProcessNo package kernel-devel-2.6.32-431.el6.x86_64 available.Package gcc-4.4.7-4.el6.x86_64 already installed and latest versionPackage 1:make-3.81-20.el6.x86_64 already installed and latest versionPackage 4:perl-5.10.1-136.el6.x86_64 already installed and latest versionNothing to doCopy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.isoInstalling Virtualbox Guest Additions 4.3.6 - guest version is 4.3.4Verifying archive integrity... All good.Uncompressing VirtualBox 4.3.6 Guest Additions for Linux............VirtualBox Guest Additions installerRemoving installed version 4.3.6 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 modulesThe headers for the current running kernel were not found. If the followingmodule compilation fails then this could be the reason.The missing package can be probably installed withyum install kernel-devel-2.6.32-431.el6.x86_64
Building the main Guest Additions module[FAILED](Look at /var/log/vboxadd-install.log to find out what went wrong)Doing non-kernel setup of the Guest Additions[ OK ]Installing the Window System drivers[FAILED](Could not find the X.Org or XFree86 Window System.)An error occurred during installation of VirtualBox Guest Additions 4.3.6. Some functionality may not work as intended.In most cases it is OK that the "Window System drivers" installation failed.[default] Configuring and enabling network interfaces...[default] Mounting shared folders...[default] -- /vagrantFailed to mount folders in Linux guest. This is usually beacusethe "vboxsf" file system is not available. Please verify thatthe guest additions are properly installed in the guest andcan work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrantmount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrantまた失敗。。意味不明。
ついに発見!Vagrant BoxのGuest Additonsのアップデート方法
おお成功した!!!しかもchefまで有効になってるっぽい。ディレクトリも共有されている。 http://192.168.33.10/でブラウザでみられるし、あとは共有ディレクトリにシンボリックリンクはってみよう。
$ vagrant reload[default] Attempting graceful shutdown of VM...[default] Clearing any previously set forwarded ports...[default] Clearing any previously set network interfaces...[default] Preparing network interfaces based on configuration...[default] Forwarding ports...[default] -- 22 => 2222 (adapter 1)[default] Booting VM...[default] Waiting for machine to boot. This may take a few minutes...[default] Machine booted and ready!GuestAdditions versions on your host (4.3.6) and guest (4.3.4) do not match.Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * epel: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jpSetting up Install ProcessPackage gcc-4.4.7-4.el6.x86_64 already installed and latest versionPackage 1:make-3.81-20.el6.x86_64 already installed and latest versionPackage 4:perl-5.10.1-136.el6.x86_64 already installed and latest versionResolving Dependencies--> Running transaction check---> Package kernel-devel.x86_64 0:2.6.32-431.el6 will be installed--> Finished Dependency Resolution
Dependencies Resolved
================================================================================ Package Arch Version Repository Size================================================================================Installing: kernel-devel x86_64 2.6.32-431.el6 base 8.7 M
Transaction Summary================================================================================Install 1 Package(s)
Total download size: 8.7 MInstalled size: 24 MDownloading Packages:Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : kernel-devel-2.6.32-431.el6.x86_64 1/1 Verifying : kernel-devel-2.6.32-431.el6.x86_64 1/1
Installed: kernel-devel.x86_64 0:2.6.32-431.el6
Complete!Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.isoInstalling Virtualbox Guest Additions 4.3.6 - guest version is 4.3.4Verifying archive integrity... All good.Uncompressing VirtualBox 4.3.6 Guest Additions for Linux............VirtualBox Guest Additions installerRemoving installed version 4.3.6 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 modulesBuilding the main Guest Additions module[ OK ]Building the shared folder support module[ OK ]Building the OpenGL support module[FAILED](Look at /var/log/vboxadd-install.log to find out what went wrong)Doing non-kernel setup of the Guest Additions[ OK ]Installing the Window System drivers[FAILED](Could not find the X.Org or XFree86 Window System.)An error occurred during installation of VirtualBox Guest Additions 4.3.6. Some functionality may not work as intended.In most cases it is OK that the "Window System drivers" installation failed.[default] Configuring and enabling network interfaces...[default] Mounting shared folders...[default] -- /vagrant[default] -- /tmp/vagrant-chef-1/chef-solo-2/roles[default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks[default] -- /tmp/vagrant-chef-1/chef-solo-3/data_bags[default] Running provisioner: chef_solo...Generating chef JSON and uploading...Running chef-solo...[2014-02-26T03:03:37+00:00] INFO: Forking chef instance to converge...[2014-02-26T03:03:37+00:00] INFO: *** Chef 11.10.4 ***[2014-02-26T03:03:37+00:00] INFO: Chef-client pid: 6981[2014-02-26T03:03:37+00:00] INFO: Setting the run_list to ["recipe[lamp]"] from JSON[2014-02-26T03:03:37+00:00] INFO: Run List is [recipe[lamp]][2014-02-26T03:03:37+00:00] INFO: Run List expands to [lamp][2014-02-26T03:03:37+00:00] INFO: Starting Chef Run for vagrant-centos65[2014-02-26T03:03:37+00:00] INFO: Running start handlers[2014-02-26T03:03:37+00:00] INFO: Start handlers complete.[2014-02-26T03:03:43+00:00] INFO: package[httpd-devel] installing httpd-devel-2.2.15-29.el6.centos from base repository[2014-02-26T03:03:53+00:00] INFO: package[php-devel] installing php-devel-5.3.3-27.el6_5 from updates repository[2014-02-26T03:04:00+00:00] INFO: package[php-mbstring] installing php-mbstring-5.3.3-27.el6_5 from updates repository[2014-02-26T03:04:07+00:00] INFO: package[php-mysql] installing php-mysql-5.3.3-27.el6_5 from updates repository[2014-02-26T03:04:14+00:00] INFO: service[mysqld] enabled[2014-02-26T03:04:16+00:00] INFO: service[mysqld] started[2014-02-26T03:04:16+00:00] INFO: Chef Run complete in 38.993570955 seconds[2014-02-26T03:04:16+00:00] INFO: Running report handlers[2014-02-26T03:04:16+00:00] INFO: Report handlers complete