Vagrant up, file is missing - vagrant

I try to config my virtual machine with vagrant and this error log come up after i run "vagrant up".
I try to search but no hope somewhere. Can someone show me where is the "The host path of the shared folder is missing: ../batch" ?
Bringing machine 'devapi' up with 'virtualbox' provider...
Bringing machine 'devdb' up with 'virtualbox' provider...
Bringing machine 'devbatch' up with 'virtualbox' provider...
Bringing machine 'devjenkins' up with 'virtualbox' provider...
==> devapi: Using hostname "devapi" as node name for Chef...
==> devapi: Machine already provisioned. Run `vagrant provision` or
use the `--provision`
==> devapi: flag to force provisioning. Provisioners marked to run
always will still run.
==> devdb: Using hostname "devdb" as node name for Chef...
==> devdb: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> devdb: flag to force provisioning. Provisioners marked to run
always will still run.
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: ../batch

This issue sometimes occurs when being in the wrong directory when running vagrant up. If you are in fact in the correct directory, have you tried creating that directory that is in the error? For example mkdir {the path that is missing} and then running vagrant reload. Also, these errors can be a little vague so I recommend checking out the logs with vagrant up --debug or if you would like to save it to a file vagrant up --debug &> vagrant.log.

Related

Issues w vagrant ssh: terminating, 1 bad configuration options

first off I'm very new to programming and web development. I'm currently working through a Udacity course on SQL.
I'm trying to install VM and Vagrant and have run into this issue. Vagrant installed fine, and I'm able to run vagrant up, but when I run vagrant ssh I'm getting this message:
.ssh/config: terminating, 1 bad configuration options
I'll attach a screen here.
I'm on a Mac. Big Sur 11.5.2
Vagrant version 2.2.18
Any help provided would be greatly appreciated! Thanks in advance![enter image description here][1]
bash-3.2$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-16.04-i386' version '2.3.5' is up to date...
==> default: Machine already provisioned. Run vagrant provision or use the --provision
==> default: flag to force provisioning. Provisioners marked to run always will still run.
bash-3.2$ vagrant ssh
/Users/scott27/.ssh/config: terminating, 1 bad configuration options
bash-3.2$
Consider moving your config file to a backup and trying again.
mv /Users/scott27/.ssh/config /Users/scott27/.ssh/config.bak
Then try vagrant up again and if it works then the issue is in your config file, troubleshoot that separately.
Instead of moving the existing ssh config file it is better to instead let vagrant point to its own config file using the config.ssh.config in vagrantfile
I am on Windows but I assume it is similar on mac. I updated my Vagrantfile like so:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.config = File.expand_path(File.dirname(__FILE__) + '/ssh_config')
As you can see I point to a ssh_config file that I created, since an empty string resulted in an error.

Is there a bug with Vagrant? How exactly does one successfully use Vagrant on Mac OSX?

I have pored through pages of Stack Overflow and find tons of answers that do not solve my inability to get "vagrant up" successfully...well, up on my Mac. Here is what happens:
ldco2016#DCortes-MBP-3 ~ $ vagrant init hashicorp/precise32 [ruby-2.3.0]
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
ldco2016#DCortes-MBP-3 ~ $ vagrant up [ruby-2.3.0]
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.
Vagrant works properly on Mac OS X. The problem you described does seem to be a bug in Vagrant, nor your mistake.
Vagrant does not really perform complicated tasks related to virtual machines itself, but sets the options and runs other programs.
In this case Vagrant ordered VirtualBox to create and start a new virtual machine and then periodically checked that machine's status to connect when it got into a "running" state. Instead Vagrant was informed that the machine had been powered off:
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state.
This indicates a problem with your VirtualBox (installation, settings, resources) and you should look there.
First run the Oracle VM VirtualBox Manager, right-click on the machine entry and choose "Show log..."; check if you can start the machine yourself; check the memory and CPU settings in VirtualBox.
Side note: Sometimes a tweak in Vagrantfile for OS X is required (mainly for disk sharing between the guest and host), but this is not the case with hashicorp/precise32. Using the two commands you ran, the machine started properly on El Capitan, Vagrant 1.8.4, VirtualBox 5.0.16.
hashicorp/* are pretty old boxes (generally older than 2 years).
You would want to use ubuntu/precise32 in your case, which are the official boxed maintained by folks from hashicorp

Homestead up conflicts with the VM it created

I am progressively updating files to get rid of errors to get laravel setup.
I am now running into this error when i run homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
←[K==> default: Matching MAC address for NAT networking...
==> 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.
I opened Virtualbox but couldnt find any VM's so after some research I ran vagrant golbal-status and destroyed any VM's with vagrant destroy <VM id>
This didnt seem to work so I manually deleted the .vagrant folder from the Homestead directory and retried.
After the error, when I run vagrant global-status again it shows the VM that is created, so its as if homestead creates the machine and then tried to recreate it? hence the conflict. This is the second day of trying to get laravel going, im on windows 8.1 T^T
i had the same issue.The following fixed it for me.
from the terminal run the command
$vagrant global-status
the output was
id name provider state directory
74c92a7 default virtualbox poweroff /home/maiko/.composer/vendor/laravel/homestead
e73c724 default virtualbox poweroff /home/maiko/Desktop/code/Homestead
what i did was delete the hometead instance of 74c92a7
$vagrant destroy 74c92a7
once i ran vagrant up again everything went smooth.
hope that helps

Could not open file error with Vagrant Up command

Would anyone know what I can do to solve this? I'm a noob with Vagrant.
Crystal:~ Adam$
Crystal:~ Adam$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
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 /Users/Adam/base
Crystal:~ Adam$
It looks like you have the same situation as described in this SO question: Error when trying vagrant up. My answer repeated here:
You may have created a Vagrant project with just vagrant init. That will create your Vagrantfile, but it won't have a box defined.
Instead, you could try vagrant init hashicorp/precise32 which uses a standard Ubuntu image. The Vagrant website has a Getting Started which gives some good examples.

Vagrant, error when running vagrant up --provider=docker

I'm trying to test the new docker support in vagrant 1.6. I'm on windows and I've setup my vagrant file but when I run "vagrant up --provider=docker" I get the following:
Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
default: Vagrant will now create or start a local VM to act as the Docker
default: host. You'll see the output of the `vagrant up` for this VM below.
default:
default: Box 'mitchellh/boot2docker' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
default: Loading metadata for box 'mitchellh/boot2docker'
default: URL: https://vagrantcloud.com/mitchellh/boot2docker
default: Adding box 'mitchellh/boot2docker' (v0.8.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/mitchellh/boot2docker/version/1/provider/virtualbox.box
default: Progress: 100% (Rate: 2999k/s, Estimated time remaining: --:--:--)
The executable 'bsdtar' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
Uninstall Vagrant completely, remove C:\HashiCorp.
Reinstall Vagrant.
This will fix everything.
Go to Programs and Features
Find Vagrant and Repair
No need to reinstall :)
a fast solution is to attach the path of the mingw binary location to the system's Path variable, e.g.:
C:\HashiCorp\Vagrant\embedded\mingw\bin
Remember to separate path entries with a ;.
Download & Install package follow instruction here http://gnuwin32.sourceforge.net/packages/libarchive.htm
then update your Path environment variable to include the installed path of bsd executable, usually C:\Program Files (x86)\GnuWin32\bin

Resources