Laravel Homestead Windows Not Mapping Folders Properties - windows

I'm unable to map my local project directory to Laravel's Homestead project directory. Inside of my homestead.yaml file I have:
folders:
- map: C:\Users\mdgre\Code
to: /home/vagrant/Code
When I run vagrant up I see the incorrect mapping taking place:
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/mdgre/.homestead
In addition when I ssh into the vagrant box no Code folder has been created at home/vagrant/Code.

Which version of homestead are you running? As of 5.0.0 there is no more ~/.homestead directory and shared folders are mounted using the Homestead.yaml config in the same directory as the Vagrantfile.

It doesn't work in the VirtualBox 5.1.16 version. You can update to the 5.1.18 version. It works in this version

Related

error when trying to use NFS with laravel homestead and virtualbox

Laravel/homestead version: 9.3.0
VirtualBox version: 6.0
Vagrant version: 2.2.6
i'm trying to use NFS with laravel/homestead per project setup. i used to have all projects within same homestead environment, but changed it to per projects yesterday.
All sites is working fine when NOT using nfs. (except from being really slow)
I've installed Vagrant WinNFSd.
the error is:
==> bpa: Exporting NFS shared folders...
==> bpa: Preparing to edit nfs mounting file.
[NFS] Status: halted
[NFS] Start: started
==> bpa: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp,actimeo=1,nolock 192.168.10.1:/D/SynologyDrive/Prosjekter/Privat/bpa /home/vagrant/code
Stdout from the command:
Stderr from the command:
mount.nfs: an incorrect mount option was specified
i've searched google and tried everything without luck.
the setup:
folders:
-
map: 'path\to\project'
to: /home/vagrant/code
type: "nfs"

Laravel Homestead installation shared folder issue

I'm trying to install the last laravel homestead.
After cloning the repo into ~/Homestead and launch vagrant up.
I have this error :
==> homestead-7: Mounting shared folders...
    homestead-7: /vagrant => C:/Users/fboland/Homestead
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
The error output from the command was:
: No such file or directory
But the folder realy exists !
Any idea ?
Thanks
If you are using VirtualBox 5.1.16 (the latest at the time of writing this), you will have to downgrade to VirtualBox 5.1.14 as there is an issue with the version of Guest Additions in this release.
More information in this issue on GitHub: https://github.com/laravel/homestead/issues/510
Installing the vbguest plugin worked in my case with VirtualBox 5.2.6 and Vagrant 2.0.2:
vagrant plugin install vagrant-vbguest

vagrant is not read my homestead.yaml

I guess vagrant is not read my homestead.yaml file.
$ vagrant reload --provision
==> default: Mounting shared folders...
default: /vagrant => /Users/ugurgungezerler/web/Homestead
my Homestead.yaml file folders configuration is:
folders:
- map: /Users/ugurgungezerler/web/sites
to: /home/vagrant/sites
i also tried vagrant destroy and up
OS = OSX El Capitan
Virtualbox 5.0.20

Unable to run vagrant up or homestead up Virtualbox with the name homestead exists?

A VirtualBox machine with the name 'homestead' already exists. Please
use another name or delete the machine with the existing name, and try
again.
I've tried removing the machine from virtual box (deleting the files as well)
I've tried running vagrant destroy and homestead destroy as well.
I cant see to run homestead up or vagrant up. I keep getting the error i've stated above.
My VirtualBox\ VMs are empty.
➜ homestead homestead up Bringing machine 'default' up with
'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date... A VirtualBox machine with the name 'homestead' already exists. Please
use another name or delete the machine with the existing name, and try
again. ➜ homestead
Running vagrant global-status brings this:
5cd65e5 default virtualbox poweroff /Users/username/.composer/vendor/laravel/homestead
Im not sure how to fix this. Any help is greatly appreaciated.
You can manually delete the homestead in VirtualBox Gui. Open your VirtualBox Gui select homestead, click machines select poweroff.You can now delete homestead by selecting remove, and delete all related files, or go to Users\username\VirtualBox VMs and delete homestead folder as suggested by #Digitlimit.In your homestead directory, run
vagrant up
again

Chef Vagrant, Can't Find Folder

Chef is really confusing me. Can you help me understand why it's not working?
Cliff Notes
I'm using Chef-Solo (not Berkshelf or anything else)
Everything works when I set it up from scratch, I can vagrant provision
But if I reboot the HOST (My main operating system) it breaks!
It appears to be looking inside a .chef folder which I did not specify in my vagrant configuration.
I have to do a vmboxmanage box destroy ubuntu/trusty64 and redownload everything and redo vagrant up if I reboot.
Vagrant Version 1.7.2
Virtual Box Version 4.3.20r96996
Inside Vagrant SSH Error:
Note: The files are not pointing to the .chef folder, but they are here?
[2015-01-30T16:23:44+00:00] WARN: Did not find config file:
/etc/chef/solo.rb, using command line options.
[2015-01-30T16:23:50+00:00] FATAL: None of the cookbook paths set in
Chef::Config[:cookbook_path],
["/vagrant/.chef/cookbooks", "/vagrant/.chef/site-cookbooks"],
contain any cookbooks
$vagrant up and $ vagrant provision error:
==> default: Mounting shared folders...
default: /vagrant => /home/jesse/if/indieflix/vagrant
default: /home/vagrant/chef-recipes => /home/jesse/projects/if/vagrant/chef-recipes
default: /home/vagrant/chef-resources => /home/jesse/projects/if/vagrant/chef-resources
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Shared folders that Chef requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.
And, vagrant reload does nothing.
Vagrantfile
# ...
config.vm.synced_folder "chef-recipes", "/vagrant/chef-recipes"
config.vm.synced_folder "chef-resources", "/vagrant/chef-resources"
# ...
config.vm.provision "chef_solo" do |chef|
# Relevant to the Vagrantfile path
chef.cookbooks_path = ["chef-recipes"]
# This is just required by Chef, so it's minimal
chef.environments_path = "chef-resources/environments"
# This is the internal flag.
chef.environment = "development"
# This defines the cookbooks to run
chef.roles_path = "chef-resources/roles"
chef.add_role("development")
end
Folder Structure
chef-recipes/ (Git Submodule)
----python/
--------recipes/
------------default.rb
------------pip.rb
chef-resouces/ (Git Submodule)
----environments/
--------development.json
----roles/
--------development.json
Vagranfile
Anthony suggested in a comment I answer my question since it was answered in comments. Here it is!
Instead of using curl to install, I used omnibus which adds another step before provisioning:
$ vagrant plugin install vagrant-omnibus
Second, Chef-Solo/Vagrant has an issue with mounting files from the Host. The only workaround I have found is:
$ rm .vagrant/machines/default/virtualbox/synced_folders vagrant reload --provision
Optional: I created a bash script to make the above a little quicker:
reprovision.sh
#/bin/bash
rm .vagrant/machines/default/virtualbox/synced_folders
vagrant reload --provision
And of course chmod +x reprovision.sh and to run ./reprovision.sh

Resources