0

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
Zabs
  • 13,852
  • 45
  • 173
  • 297
  • my suggestion would be to first upgrade your virtualbox and vagrant software versions. yours are a little bit old. – Radu Feb 08 '16 at 11:21
  • http://stackoverflow.com/questions/22717428/vagrant-error-failed-to-mount-folders-in-linux-guest or http://stackoverflow.com/questions/28494349/vagrant-failed-to-mount-folders-in-linux-guest-vboxsf-file-system-is-not-av seem related. – Radu Feb 08 '16 at 11:27

1 Answers1

-2

Same Question Here!

I wrote the original answer at this URL.

Failed to mount folders in Linux guest - mesg: ttyname failed: Inappropriate ioctl for device


Here is one important reason why error occurred vagrant up

If you use Virtual Box to Vagrant's provider, you have to reinstall 'Guest Additions' that everytime you create virtual machine's kernel.

vbguest plugin is a good solution for solving this issue.

( about vbguest plugin - https://github.com/dotless-de/vagrant-vbguest )

first, you have to install vbguest plugin.

$ vagrant plugin install vagrant-vbguest

and run Vagrant

$ vagrant halt

$ vagrant up

or use too

vagrant reload

Community
  • 1
  • 1
jamy
  • 405
  • 3
  • 6