trouble getting provisioning to run

32 views
Skip to first unread message

Raif Harik

unread,
Apr 27, 2015, 10:31:03 PM4/27/15
to vagra...@googlegroups.com
Hi, pretty new to vagrant. 
Running vagrant -> virtualbox on windows
I have a simple vagrantfile like this
# -*- mode: ruby -*-
# vi: set ft=ruby :


Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.synced_folder "./", "/vagrant_share", create: true

  config.vm.provision "shell" do |s|
    s.path "provision/setup.sh"
  end
end

Not sure if I need the two first lines. probably not.  But anyway,

the provision/setup.sh reads 
#!/bin/bash
 
echo "Provisioning virtual machine..."

when I vagrant up and I search the output I don't find my echo.  I know that with vagrant up provisioning only runs the first time, this is the first time plus I've run it with vagrant reload --provision.  I've tried just doing config.vm.provision "docker" and that never loads. I must be doing something wrong.
Any ideas would be greatly appreciated.
Thanks,

Alvaro Miranda Aguilera

unread,
Apr 27, 2015, 11:11:07 PM4/27/15
to vagra...@googlegroups.com
Hello

I tried your vagrantfile and I got an error.

so not sure if yours is starting?? or why mine is not working

the error is missing an = in s.path

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.synced_folder "./", "/vagrant_share", create: true
config.vm.provision "shell" do |s|
s.path = "provision/setup.sh"
end
end


So, after the shares are mount, it run the script and I can see the echo:

==> default: Mounting shared folders...
default: /vagrant => /Volumes/hd1/Dropbox/vagrant_mini/trusty64
default: /vagrant_share => /Volumes/hd1/Dropbox/vagrant_mini/trusty64
==> default: Running provisioner: shell...
default: Running:
/var/folders/_h/d14sw7c55ds3qr05nnp6ckhc0000gn/T/vagrant-shell20150428-22140-1cr0tc6.sh
==> default: stdin: is not a tty
==> default: hello
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Raif Harik

unread,
Apr 28, 2015, 9:08:38 AM4/28/15
to vagra...@googlegroups.com
First thanks for the quick reply, second sorry about the stupid typo, I was really hoping that was it but I still get the same result, I'm pasting the end part here.  There is an error occuring but I believe this happens whether I try and run a script or not.  That could still be it but thought I'd mention it.
thanks,
R

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.26. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
stdin: is not a tty
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => C:/Development/vagrant_docker

Alvaro Miranda Aguilera

unread,
Apr 28, 2015, 11:43:27 AM4/28/15
to vagra...@googlegroups.com
Thats not an error

and seems you are using vagrabt-vbguest plugin

that is updating the virtualbox driver on the guest

is not an error, is telling you that the X (graphical) driver wasn't
compiled as didn't found graphical environment running

not an error.

Alvaro.

Raif Harik

unread,
Apr 28, 2015, 11:46:45 AM4/28/15
to vagra...@googlegroups.com
OK, that's fine.  Just trying to provide information. The script is definitely not being run though.  I am running on windows, which might be part of the problem.
Thanks,
R
Reply all
Reply to author
Forward
0 new messages