error when trying to use NFS with laravel homestead and virtualbox - laravel

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"

Related

Installing Virtual box for kong Vagrant set up

I am trying to set up vagrant for kong. I have installed VirtualBox and vagrant. But when i run 'vgrant up' i encounter the below issue:
Bringing machine 'default' up with 'virtualbox' provider...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["list", "hostonlyifs"]
Stderr: VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
I have searched for this error with no much luck.
I am using centos 7.4 and the kernel version is 3.10.0-693.21.1.el7.x86_64.
I have downloaded the relevant gcc, devel and dkms. In short followed the link https://tecadmin.net/install-oracle-virtualbox-on-centos-redhat-and-fedora/
Any tip is appreciated.
Thanks
Dinah
This is most likely a problem with your VirtualBox install, not Vagrant. To confirm this, you should receive the same error when running: VBoxManage list vms
A common reason for this error are when /tmp is full or has the incorrect permissions.
To check if /tmp is full try df -h
To fix permissions on /tmp if they're incorrect, try sudo chmod ug-s /tmp && sudo rm -rf /tmp/.vbox*
Apparently we were trying this on a VM. And Vagrant tries to spin up another VM. So having a VM spun within a VM is causing the issue.

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

Laravel Homestead Windows Not Mapping Folders Properties

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

How start a local VM built by packer?

I am new to packer.
For a start I tried to build: https://github.com/shiguredo/packer-templates/tree/develop/ubuntu-14.04 which worked fine. But when I want to sin it up via vagrant up I get the following error:
Vagrant environment or target machine is required to run this
command. Run `vagrant init` to create a new Vagrant environment. Or,
get an ID of a target machine from `vagrant global-status` to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.
After calling vagrant init a config file which looks like a default config file is created. But still there are errors:
Bringing machine 'default' up with 'parallels' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: parallels
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: parallels
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Downloads/packer-templates-develop/ubuntu-14.04/base
How can I start my packer-generated VM locally?
Is the only solution to keep track of the Vagrantfile manually?
Edit:
if I call vagrant init myNewlyCreatedBox.box
Then vagrant will try too boot the VM but
Failed to mount folders in Linux guest. This is usually because
the "prl_fs" file system is not available. Please verify that
Parallels Tools are properly installed in the guest and
can work properly. If so, the VM reboot can solve a problem.
The command attempted was:
mount -t prl_fs -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t prl_fs -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant
Those templates will generate a Vagrant box for you. If the process completes successfully you should have ubuntu-14-04-x64-virtualbox.box and ubuntu-14-04-x64-vmware.box file as specified by template.json file. To use those newly created boxes in Vagrant you'll need to add the one corresponding to your specific hypervisor to the list of boxes that Vagrant knows about by the following:
vagrant box add <nameToReferToBox> <pathToBoxYouJustCreated>
for example
vagrant box add ubuntu-14-04-x64 ubuntu-14-04-x64-virtualbox.box
Then to create an instance of that box (a VM) you can simply create a Vagrant file targeting the new box you just imported:
vagrant init ubuntu-14-04-x64
and then spin up a VM based on the base box:
vagrant up

Vaprobash: Create new VM failed

I'm trying to install a new VM with VAPROBASH (https://github.com/fideloper/Vaprobash)
but the installation fails when mounting NFS shared folders
I'm using Mac OsX 10.9.2, Vagrant 1.6.2, VirtualBox 4.2.20
=> default: 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 'nolock,vers=3,udp,noatime' 192.168.22.1:'/Users/user/Sites/myfolder' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported
Any help would be appreciated! Thanks! I need to start a project!
I´ve found the solution:
adding the line 127.0.0.1 localhost to the /etc/hosts file worked for me as well
I'm with vagrant 1.6.2 and vbox 4.3.10
https://github.com/mitchellh/vagrant/issues/1941#issuecomment-43098597

Resources