Vagrant - The host path of the shared folder is missing: ../keys - vagrant

When I try to run vagrant up or vagrant provision I get this error:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The host path of the shared folder is missing: ../../../../keys
I already tried vagrant destroy but I get the same error.
Does anybody have suggestions on what to check?
I'm on ubuntu 15.10

I've had this once before and there's plenty of possible solutions on the web.
What worked for me is to simply create the folder that's apparently missing. Do the following (easiest on command line):
cd /path/to/wherever/it/is/supposed/to/be/
mkdir keys
You should then be able to vagrant up fine.

Related

Vagrant was unable to mount VirtualBox shared folders. ERROR: INVALID ARGUMENT

I know that other people during the years had met similar problems (like this ) however in my case the guest addition is installed (0.30.0 version) and I tried to reinstall it a lot of times.
I work on Windows10 and those are the version of VirtualBox and Virtual Machine.
Virtualbox on your host claims: 5.2.8
VBoxService inside the vm claims: 6.1.22
This is the code of the problem:
default: /vagrant => C:/Users/XXXX XXXX/Documents/src
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,_netdev vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument
I never found the error Invalid argument in similar cases so my question is if this need a particular procedure.
Thank you very much
Just had a similar problem after an update - was getting the same:
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument
What I found in virtualbox startup was the message:
VirtualBox Guest Additions: Kernel headers not found for target kernel
5.4.0-81-generic. Please install them and execute
/sbin/rcvboxadd setup
Used "vagrant ssh" to access the virtualbox command line and ran:
sudo apt-get install linux-headers-$(uname -r)
After that restarted vagrant:
vagrant halt
vagrant up
Then it actually built the VirtualBox Guest Additions properly and mounted my shared folders.
Had the same exact error as you after making my second vagrant project - specifically after changing my public_network setting.
mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument
At I also tried several solutions from people's answers like the one mentioned here and updated my VirtualBox.
I'm not really sure how mine works but here's what I did:
I logged into the VM (vagrant ssh) and installed the guest additions manually
cd /opt
sudo wget -c
http://download.virtualbox.org/virtualbox/6.1.26/VBoxGuestAdditions_6.1.26.iso O VBoxGuestAdditions_6.1.26.iso
And then tried:
sudo mount VBoxGuestAdditions_5.1.28.iso -o loop /mnt
sudo sh /mnt/VBoxLinuxAdditions.run
But I got an error saying something like permission denied or no directory.
So I reload vagrant (vagrant reload), but the error still occurred. However, I still continued trying something else, so I thought maybe I should install the vbguest plugin and did this:
vagrant plugin install vagrant-vbguest
That removed the error for me after reload but when I logged into vagrant again, I still can't see my shared folders so I halted my vb and run provision:
vagrant up --provision
Then I got a message which said that there was an error while executing VBoxManage so on and so forth. So I paused all running machine in my VB, closed all running VB apps in my desktop, and run the command:
vagrant destroy
After recreating vagrant vagrant up, everything miraculously worked! I can now navigate to my shared folders' directory.
I'm still in the process of learning vagrant so I can't really explain what actually happened in my machine but I hope this can somehow be of help to you or to someone who have the same issue.
Step 1: open virtual box then right click on installation machine then ->close->power off.
Step 2: then run below command
vagrant halt
vagrant up
Finally got it working the following way (this related answer was of great help along with Paul_Z's answer in this same question).
Step 1:
Make sure VirtualBox Guest Additions Software is installed.
If this solved your Issue, then great! If not, continue on to step 2.
Step 2:
Read the VirtualBox Guest Additions installation output carefully.
(If no longer possible, you can rerun the setup by using cd to go to
/opt/VBoxGuestAdditions-*your-version-number-here*/init/
and then run:
sudo ./vboxadd setup)
Step 3:
Install the needed dependencies with the distribution's package manager that the error message shows. (In my particular case, it mentioned that the system couldn't perform kernel module builds because gcc make and perl were not present in the system).
Step 4:
Rerun the VirtualBox Guest Additions setup by going to
/opt/VBoxGuestAdditions-*your-version-number-here*/init/
and then run:
sudo ./vboxadd setup
(If more dependencies are requested, go back to step 3)
Step 5: Reboot
Step 6 (Optional):
Add user to vboxsf group so that it is able to access the shared folder if needed. (As explained in this answer).
sudo usermod -G vboxsf -a your_user_name
I have the issue i Ubuntu 20.04 and simply download a more recent version of VirtualBox, then extract the GuestAditions ISO and installed it
I ran just
vagrant plugin install vagrant-vbguest
and after this the box came up.

Vagrant command doesn't work without Sudo

I have installed homestead with Vagrant in my MacOS. I have installed all with Virtual Box, but when i try to use vagrant command in my terminal for running Virtual Machine appear this error:
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.
I try with sudo vagrant up and it work but is not the best choice.
Anyone can help me?
There's a screenshot of the terminal Error:
Terminal Error with command vagrant up and vagrant ssh.
Try deleting .vagrant directory
rm -r .vagrant
I suspect you copied or moved project folder from one place to another.
Alternatively you need to update the creator_uid file in .vagrant/. Check out this blog post.

The 'host_compress_magento_code' provisioner could not be found

So I'm trying to install a second vagrant VM, specifically configured for Magento 2. Which I found here: https://github.com/paliarush/magento2-vagrant-for-developers
on windows 10.
I couldn't clone the repository, because I got "Access denied", so instead I just downloaded the rar and extracted it into a folder.
Afterwards I launched my GitBash and did "vagrant up" into the folder.
After about an hour of downloading I get this error:
"There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The 'host_compress_magento_code' provisioner could not be found."
Additionally it had a problem with hosts manager as well, but I quickly found out I can do "vagrant plugin install vagrant-hostmanager" and it solved that error, but the missing "host_compress_magento_code" continues to not let me up the vagrant.
In "Vagrantfile" I found the following line:
config.vm.provision "host_compress_magento_code", type: "host_shell", inline: "tar -cf scripts/host/magento2ce.tar magento2ce"
Quick search about the command lead me to believe that it needs "magento2ce" file in the vagrant root dir in order to create that "magento2ce.tar" archive.
But I have no clue what that file should be.
Can anyone point me in the right direction? Google searches just lead to threads where "vagrant plugin install vagrant-hostmanager" has been the solution.
Thanks in advance!
After cloning of Vagrant Box for Magento 2 Developers you should (simplified version):
Copy etc/composer/auth.json.dist to etc/composer/auth.json.
Add the Magento Marketplace keys for Marketplace authorization to the repo.magento.com section.
Run init_project.sh
Please, read more carefully Installation steps section. It contains more details of how you can configure and work with this vagrant box.
init_project.sh install all needed vagrant plugins and after that run vagrant up. After you init of project you can work as ordinary vagrant suspend, vagrant resume and etc

Vagrant - Bash: Command not found

Looking for some assistance with Vagrant, for what I believe is a Server Variable issue.
I have been trying all weekend to get any kind of Vagrant install up and running. I have followed:
Laravel Homestead installation guide, and
Sitepoint Homestead Vagrant VM guide.
I am using the default folders for install. Whatever I do, after installing Vagrant, I am unable to run 'vagrant up' or vagrant init' because the command 'vagrant' cannot be found (bash: vagrant: command not found). I am trying to execute from the folder with Vagrantfile in it, as suggested by Sitepoint.
I found this Stack Overflow article: Vagrant Command Stopped Working: Command not Found on Windows, but with the current version doesn't work as that bin folder is empty (note that the 'embedded' folder beside it is full, with several 'bin' folders down within the subfolder structure).
I am not familiar enough with Vagrant to know to which folder I should set the server variable, if indeed that is the right answer. It has to be simple, as no sites address this particular issue anywhere. Any assistance will be greatly appreciated.
Win 7, Vagrant 2.1.2, Virtualbox 5.2.14
At the time of writing, Vagrant v2.1.2 is missing vagrant.exe in the i686.msi file.
There are two parts to this answer.
In GitBash, run commands with .\ preceeding the filename(ie .\vagrant up). See earlier comments for the credit for this answer.
Missing executable has been raised as an issue on Github. Without the executable, it, of course, was throwing a command not found error. https://github.com/hashicorp/vagrant/issues/10026?_pjax=%23js-repo-pjax-container
Thanks for your support Rohit.

Chef Vagrant Couldn't resolve host 'www.getchef.com'

When I'm running:
:$ vagrant provision
or
:$ vagrant up
I'm getting this error:
nisevi#localhost processor (master):$ vagrant provision
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 resolve host 'www.getchef.com'
if anyone knows to what is related this error, I'm gonna be very grateful.
###################################EDIT
A colleague gave me this thread:
https://serverfault.com/questions/453185/vagrant-virtualbox-dns-10-0-2-3-not-working
as reference where I was able to find some interesting information about mi issue. But now I'm dealing with other problem: bit.ly/1BxehY0
Likely your VM doesn't have any network access due to an incorrect config and an incorrectly installed VirtualBox. Try commenting out the Chef provisioner and then log in to the VM using vagrant ssh. See if you can reach the internet from inside and if not, fix that before progressing. If you include the content of the Vagrantfile we might be able to help more.
For me following worked:
Did vagrant ssh (It threw error to do vagrant up).
Again did vagrant up.
That's all.

Resources