Configuring Homestead error - laravel

When I use vagrant up command I have this error message:
Bringing machine 'name' up with 'parallels' provider...
==> name: Checking if box 'laravel/homestead' is up to date...
==> name: Clearing any previously set forwarded ports...
==> name: Preparing network interfaces based on configuration...
name: Adapter 0: shared
name: Adapter 1: hostonly
==> name: Clearing any previously set network interfaces...
==> name: Forwarding ports...
name: 80 => 8000
name: 443 => 44300
name: 3306 => 33060
name: 5432 => 54320
name: 8025 => 8025
name: 27017 => 27017
==> name: Running 'pre-boot' VM customizations...
==> name: Booting VM...
==> name: Waiting for machine to boot. This may take a few minutes...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
On Parallels the VM is created and when I launch I arrive to login page.
I'm using PhpStorm on Mac and followed this tutorial: http://www.pascallandau.com/blog/laravel-with-phpunit-on-vagrant-in-phpstorm/
How can I fix the issue?

Related

Chef Kitchen Vagrant box will not start when adding additional disks

Development is happening on Mac OSX
Writing a cookbook to partition, format, mount drives dynamically based on drives that are not partitioned, mounted, or formatted, May have been taken out of single drive raid-0 configuration, or may not have been configured through raid controller yet...
While working on writing test cases for cookbook. I am having the following issues.
.kitchen.yml file:
driver:
name: vagrant
# ssh:
# insert_key: false
customize:
cableconnected1: 'on'
createhd:
- filename: /tmp/disk1.vdi
size: 128
storagectl:
- name: SATA Controller
portcount: 4
storageattach:
- storagectl: SATA Controller
port: 0
device: 0
type: hdd
medium: /tmp/disk1.vdi
privileged: true
Command: kitchen verify
Gets stuck at the following
Output:
-----> Starting Kitchen (v1.20.0)
$$$$$$ Deprecated configuration detected:
require_chef_omnibus
Run 'kitchen doctor' for details.
-----> Creating <default-centos-7>...
(erb):173: warning: constant ::Fixnum is deprecated
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-7' is up to date...
==> default: Setting the name of the VM: default-centos-
7_default_1526333511693_18382
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few
minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Will not proceed any further. The adding disk code was taken directly from the kitchen-vagrant documentation for adding a disk.
I can remove the createhd, storagectl, & storageattach sections, at which point the vagrant box works as intended.
I have verified that the /tmp/disk1.vdi file is created, I also have to delete the file between runs, after a kitchen destroy else I get the following error:
-----> Starting Kitchen (v1.20.0)
$$$$$$ Deprecated configuration detected:
require_chef_omnibus
Run 'kitchen doctor' for details.
-----> Creating <default-centos-7>...
(erb):173: warning: constant ::Fixnum is deprecated
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-7' is up to date...
==> default: Machine not provisioned because `--no-provision` is
specified.
Waiting for SSH service on 127.0.0.1:2200, retrying in 3 seconds
It will continue being stuck on retying in 3 seconds indefinitely until I escape the command.
I have tried with and without:
ssh:
insert_key: false
I have tried different formats of files that vagrant is supposed to support as a disk, including .vdi, .vmdk
I have ensured that SATA Controller is the appropriate controller available for the box.
This seems issue with vagrant and virtualbox versions. You can find a similar issue here
The reason for this is that kitchen/vagrant tries to bind the OS disk to port 0 of your controller. So the reason it doesn't boot is because there is no boot disk bound!
If you change port: 0 to port: 1 in your example it should boot as expected.

No Intel® Virtualization Technology (VT-x): Vagrant stumbles even with 32-bit images

CPU: Intel® Core™2 Quad CPU Q8200 # 2.33GHz × 4
Host OS: Ubuntu 16.04.2 64-bit
Vagrant: 1.9.7
Virtualbox: 5.1.24
I do:
$ vagrant init precise64 http://files.vagrantup.com/xenial32.box
...
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Well, I tried xenial64.box as well. And precise32.
Here is some discussion "vagrant up" it stops at SSH auth method: private key
This seems to connected somehow with Intel Virtualization Technology.
Well, this CPU doesn't support it.
I will be satisfied with a 32 bit virtual machine. But how can I organize it? Well, I'd like just to start it. With or without SSH, or something. But just start.
Could you give me a kick here?

Laravel Vagrant Up SSH Problems

I am trying to create a Laravel App with the help of homestead vagrant. I am using a Windows 7 development environment. I'm using the Per Project Installation and I'm at the point in the Laravel Documentation that I can vagrant up my project. When I do vagrant up in my project I get hung up on
SSH auth method: password
and I get the following message:
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
I am using Laravel 5.3 and Vagrant 1.9.0. I was using Vagrant 1.8.4, but once I started having trouble I installed Vagrant 1.9.0, but received the exact same error. I tried te following fix from here, and from the vb.gui I could see the following error from the launched server:
[ 0.100000] Failed to access perfctr msr (MSR c0010007 is 0)
lvmetad is not active yet, using direct activation during sysinit
lvmetad is not active yet, using direct activation during sysinit
Scanning for Btrfs filesystems
/dev/mapper/vagrant--vg-root:clean, 127066/2559088 files, 1241443/10228736 blocks
[ 10.420196] piix4_smbus 0000:00:07.0: SMBus base address uninitialized - updrade BIOS or use force_addr=0xadr
[ ] A start jon is running for Raise network interfaces (4 min 44s / 5min 5 s)
and then the server start and I can log in, but my folders and IP from my Homestead.yaml file are not set on the server.
This is my Homestead.yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: mysite
name: mysite
provider: virtualbox
authorize: C:/Users/xxx/.ssh/id_rsa.pub
keys:
- C:/Users/xxx/.ssh/id_rsa
folders:
- map: "C:/Users/xxx/www/mysite"
to: "/home/vagrant/mysite"
sites:
- map: homestead.app
to: "/home/vagrant/mysite/public"
databases:
- homestead
While the instance is running and I run:
vagrant ssh-config
I get
Host mysite
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes
when I run:
vagrant global-status
I get:
id name provider state directory
-----------------------------------------------------------------------
66eb5bf mysite virtualbox running C:/Users/xxx/www/mysite
When I try and get the degub info from vagrant by using this:
vagrant up --debug > vdebug.txt
generates a lot of messages in the command prompt but only this in the vdebug.txt file:
Bringing machine 'mysite' up with 'virtualbox' provider...
==> mysite: Importing base box 'laravel/homestead'...
[KProgress: 20%
[KProgress: 30%
[KProgress: 60%
[KProgress: 70%
[KProgress: 90%
[K==> mysite: Matching MAC address for NAT networking...
==> mysite: Checking if box 'laravel/homestead' is up to date...
==> mysite: Setting the name of the VM: mysite
==> mysite: Clearing any previously set network interfaces...
==> mysite: Preparing network interfaces based on configuration...
mysite: Adapter 1: nat
mysite: Adapter 2: hostonly
==> mysite: Forwarding ports...
mysite: 80 (guest) => 8000 (host) (adapter 1)
mysite: 443 (guest) => 44300 (host) (adapter 1)
mysite: 3306 (guest) => 33060 (host) (adapter 1)
mysite: 5432 (guest) => 54320 (host) (adapter 1)
mysite: 22 (guest) => 2222 (host) (adapter 1)
==> mysite: Running 'pre-boot' VM customizations...
==> mysite: Booting VM...
==> mysite: Waiting for machine to boot. This may take a few minutes...
mysite: SSH address: 127.0.0.1:2222
mysite: SSH username: vagrant
mysite: SSH auth method: password
If you made it to the end of this post thank you! My questions is how do I get my IP and Folders from my Homestead.yaml file to the server. Any help would be greatly appreciated. Also Let me know if I can add any more info. I will keep you updated on my status.
EDIT 1
I forgot to add that I enabled virtualization already.
EDIT 2
I changed the Homestead.yaml file in my projects folder to have the IP set to 192.168.10.20 instead of 192.168.10.10 and still no changes. I will keep updating till I have an answer.
EDIT 3
Tried to change the Vagrantfile located in my project folder to add the following in the Vagrant.configure function:
config.vm.network "public_network", ip: "192.168.10.20", :bridge => "en1: Realtek PCIe GBE Family Controller #2"
I received the same error, but I also received this:
Specific bridge 'en1: Realtek PCIe GBE Family Controller #2' not found. You may be asked to specify
which network to bridge to.
This error occurs because the Ubuntu tries to raise all your network interfaces, but your cable isn't connected, then it waits until this timeout.
It seems that this problem occurs when you export a VM, more info on https://www.virtualbox.org/ticket/15705
You can edit your Vagrantfile and add these lines in the end of Vagrant.configure loop:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
Basically add this right before the very last "end".
I did have the same error in the past it was because the virtualization in my machine wasn't enabled.
Try to enable it in your machine. To do it you need to get into the BIOS.
There are useful information at Vagrant stuck connection timeout retrying as well.
[ ] A start jon is running for Raise network interfaces (4 min 44s / 5min 5 s)
https://askubuntu.com/a/841432
That link shows how to reduce the timeout for the DHCP client from 5 minutes to 15 seconds. I logged in via VirtualBox to do it. That worked for me.

vagrant up timing out on Windows 10

I'm trying to boot up a vagrant instance but it seems to hang at the default: SSH auth method: private key part no matter what I do. I'm new to vagrant so it's entirely possible that there's something I haven't done but should have.
System info:
Windows 10 build 10586.420
Vagrant 1.8.4
VirtualBox 5.0.22 r108108
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' 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...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
I had a look around for similar issues and people have suggested making sure Hyper-V is disabled (which it is) and enabling the virtualbox GUI to see if there are any other errors that aren't being put in the command line.
When I open the virtualbox GUI, I see a username/password prompt (see below):
I've tried entering the default vagrant username/passwords and these work but the vagrant up script still hangs and eventually crashes.
Any help would be much appreciated.
Thanks.

Get time out message when trying to do vagrant up on Windows 10 - but no errors

I get this error message when I try to vagrant up in my git-bash.
$ vagrant 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...
==> default: Setting the name of the VM: homestead-7
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
The problem is that i do not get any errors and if I go into my Virtualbox GUI, the VM is running!
Anybody who have experienced the same thing a have a solution.
It is on windows 10, with the latest virtualbox and vagrant.
I have just installed it on my laptop at home and i works fine, but at work on a work domain it won't, so can't really see what is wrong here.
This happened to me when I was setting up a Windows box. So, I would check if Virtualization is enabled in BIOS. If it is disabled, enable it. Try to boot again.

Resources