I am using VirtualBox Manager (version 4.3.22) & Vagrant (version 1.7.2) and currently have the following problem when doing a 'vagrant reload'. Note i'm using Windows 7 Professional on my desktop machine. (note - I can vagrant-ssh into the box but not sure why the errors are occurring)
I've tried some of the other solutions from other posts in regards to installing additional plugins but still no joy.
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
Vagrant File :
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 2345
config.vm.network "public_network"
config.vm.provision "shell", path: "box/bootstrap.sh"
end
Bootstrap file:
#!/bin/bash
#=========================================================
echo "##Updating package manager..."
#=========================================================
sudo apt-get update
echo "##Installing packages..."
#=========================================================
sudo apt-get install -y git php5 memcached php5-cli php5-mysql php5-memcache php5-memcached apache2 php5-curl
#=========================================================
echo "##Installing mysql..."
#=========================================================
# sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password '
# sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password '
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server
# sudo apt-get install -fy
#=========================================================
echo "##Set up apache..."
#=========================================================
sudo a2enmod rewrite
sudo cp /vagrant/box/apache2.conf /etc/apache2/apache2.conf
sudo service apache2 restart
#=========================================================
echo "##Setting up databases..."
#=========================================================
echo 'create database oauth2' | sudo mysql
echo 'create database heatgenius' | sudo mysql
sudo mysql oauth2 < /vagrant/box/create_oauth2.sql
sudo mysql acme < /vagrant/box/create_acme.sql
#=========================================================
echo "##Add api.acme.co.uk to hosts to make it curlable..."
#=========================================================
sudo echo '127.0.0.1 api.acme.co.uk' | sudo tee -a /etc/hosts
#=========================================================
echo "##Link project to server root..."
#=========================================================
sudo rm -r /var/www/html
sudo ln -s /vagrant/public /var/www/html
#=========================================================
echo "##Install PHP packages..."
#=========================================================
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
cd /vagrant
composer install