Vagrant thowing the error `playbook` does not exist on the guest - ansible

I end up with the below error when I do vagrant up.
`playbook` does not exist on the guest: /vagrant/.c7/provision/playbook.yml
I removed .c7 folder when I am cleaning up vagrant and after reinstall, it looks like those folders are not created again. Hence the error.
How can I tell/do to vagrant that create everything again including those configurations. Reinstalling not helping.
Tried destroy and up again. No luck.

You are not clear on how you are provisioning the guest.
Try
vagrant up --provision
if that doesn't help, then , halt/destroy the guest, try removing the box and start all over again.
vagrant box remove NAME
vagrant up

Related

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.

My changes to Homestead.yaml are not reflected in the virtual environment after I vagrant up

I edited the shared folder mapping rules in my Homestead.yaml file (C:\Users\username\.homestead). Then, I entered "vagrant halt" command to shut down vagrant. Then, I entered "vagrant up".
However, the edits that I made to the folder mapping are not reflected in the virtual environment. It's as if my changes were not made at all in the Homestead.yaml file.
How do I make the vagrant virtual environment reflect the changes that I made to the Homestead.yaml file?
You should reload using
vagrant reload --provision
Please do not vagrant destroy, there are many things involved. If your vagrant is still running do vagrant provision, if it is not do vagrant up --provision. If things don't work as expected, check your file mappings for mistakes.
I should have used vagrant destroy instead of vagrant halt after updating my homestead.yaml file.

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

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

Can't get vagrant destroy to work

I just deleted a large directory that I no longer needed. Unfortunately, it had a number of vagrant instances that I neglected to halt and destroy first within it and I'm having trouble getting them to go away now.
If I run "vagrant global-status", I receive four results, all have the name "default", three use hyperv and one uses virtualbox (not sure why I have a virtualbox instance at all), all but the virtualbox is running, and all in directories that no longer exist.
I just opened up the hyper-v manager and none of these instances actually exist.
If I attempt to use "vagrant destroy" against any of the ids in the global-status output, I get the following error:
There are errors in the configuration of this machine. Please fix the following errors and try again:
vm:
* A box must be specified
If I look in the "vagrant box list" command, it yields a single named box, but I don't appear to be able to do anything with it as I'll get the same error as above when I attempt to remove it.
What can I do to 1) get rid of the last of the directories that wouldn't delete since vagrant appears to be using the files and 2) clear out these entries that shouldn't be here anymore from the vagrant global-status command?
Thanks!
To clean Vagrant's global status, use the --prune flag.
I'm not sure why you don't see the Hyper-V machines in your Hyper-V manager though.
I wound up uninstalling Vagrant and deleting the directories Vagrant was using. Then I re-installed and there were no more ghost Vagrant instances.
I managed to remove the vagrant VM entry from global-status using vagrant destroy <id> after I manually deleted the VM from "Oracle VM VirtualBox". VM was ubuntu 14.04, host was windows 10.

Resources