Vagrant shell commands aren't being ran

21 views
Skip to first unread message

terra...@gmail.com

unread,
Dec 13, 2020, 7:43:05 PM12/13/20
to Vagrant
I'm using the following Vagrantfile:

$script = <<-SHELL
    printf zzz > /home/vagrant/aaa.txt
    sudo printf > /home/vagrant/bbb.txt
    sh -c "printf > /home/vagrant/ccc.txt"
    sudo sh -c "printf > /home/vagrant/ddd.txt"
SHELL

Vagrant.configure("2") do |config|
    config.vm.box = "laravel/homestead"
    config.vm.provision "shell", inline: $script
end

I'm running Vagrant 2.2.7 and Hyper-V with Windows 10 Version 1909.  And none of the commands are being ran.

Here's the output when I ran vagrant up --provider-hyperv:


Any ideas?

Jim McGinness

unread,
Dec 13, 2020, 10:17:08 PM12/13/20
to vagra...@googlegroups.com
It looks like you need to fix the permissions problem that is preventing the shared /vagrant folder from mounting; that failure occurs before Vagrant gets to the point where it would try to run your shell provisioner.
Reply all
Reply to author
Forward
0 new messages