Homestead up conflicts with the VM it created - laravel

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

Related

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

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

Vagrant up, file is missing

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.

Laravel "Homestead Up" doesn't boot vm after updating VirtualBox and Vagrant says it already exists

I was having a few issues with Homestead 2.x suddenly for reasons I don't understand. So I took this opportunity to updated Homestead to 2.1.8, installed the latest Vagrant and VirtualBox from a suggestion off Laravel's forum, and now it seems to want to boot, but it says:
$ homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> 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'm not sure why it is sayng laravel/homestead already exists, and I'm a bit afraid to play around with this now as I don't want to delete anything. I looked at the VirtualBox GUI and it only has one Homestead box, and a settler_default_12314848585938 box (which I don't know what that is, but it doesn't have any shared folders). So there is no other VirtualBox running.
I found these and a few others, but they are dated and unrelated in that I'm not running 2.0.x, but 2.1.x.
https://laracasts.com/discuss/channels/general-discussion/homestead-20-up-problem
https://laracasts.com/discuss/channels/general-discussion/im-unable-to-run-homestead-up?page=2
Don't know if this helps, but looking in C:/Users/mtpultz:
/.homestead
\_ .vagrant
after.sh
aliases
homestead.yaml
mtpultz - Shortcut
/.vagrant.d
\_ /boxes
\_ /laravel-VAGRANTSLASH-homestead
\_ /0.3.0
/data
/gems
/rgloader
/tmp
insecure_private_keys
setup_version
/.VirtualBox
\_ list of log files
vbox-ssl-cacertificate.crt
VirtualBox.xml
/VirtualBox VMs
\_ /homestead
\_ /logs
box-disk1.vmdk
homestead.vbox
\_ /settler_default_12344848209239843
Using vagrant box remove laravel/homestead --box-version=0.x.x I removed some older version of laravel/homestead.
What should I be doing to be able to boot up the vm so I can continue working, and not have to destroy anything?
1) Go to C:/Users/mtpultz/VirtualBox VMs and delete the folder called homestead.
2) Run homestead up from your command prompt again.
You can set a different name for your vagrant box. On top of your Homestead.yaml file you can add:
box: laravel/homestead-2x
and check if the machine boots

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

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

Resources