I am using Windows 10 accompanied with VirtualBox and Vagrant. Using latest version of Homestead, which is 8.0.1.
My Homestead.yaml
is as follows:
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\xampp\htdocs\company\upgrade\project2
to: /home/vagrant/code
- map: C:\xampp\htdocs\company\upgrade\phpmyadmin
to: /home/vagrant/phpmyadmin
sites:
- map: project2.test
to: /home/vagrant/code/public
- map: phpmyadmin.test
to: /home/vagrant/phpmyadmin
databases:
- homestead
- project2
features:
- mariadb: false
- ohmyzsh: false
- webdriver: false
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
As you can see, nothing special.
My scripts/homestead.rb
is slightly changed to replace:
# Configure A Private Network IP
if settings['ip'] != 'autonetwork'
config.vm.network :private_network, ip: settings['ip'] ||= '192.168.10.10'
else
config.vm.network :private_network, ip: '0.0.0.0', auto_network: true
end
Into this:
# Configure A Private Network IP
config.vm.network "public_network", ip: '192.168.10.10'
But as I will describe below, with either case, my problem persists.
So, now that I have everything ready and setup, I execute:
vagrant up
After that we get all those log messages, until this one (first stall until it's timeout):
==> homestead: Checking if box 'laravel/homestead' version '8.0.1' is up to date...
==> homestead: Clearing any previously set forwarded ports...
==> homestead: Clearing any previously set network interfaces...
==> homestead: Preparing network interfaces based on configuration...
homestead: Adapter 1: nat
homestead: Adapter 2: bridged
==> homestead: Forwarding ports...
homestead: 80 (guest) => 8000 (host) (adapter 1)
homestead: 443 (guest) => 44300 (host) (adapter 1)
homestead: 3306 (guest) => 33060 (host) (adapter 1)
homestead: 4040 (guest) => 4040 (host) (adapter 1)
homestead: 5432 (guest) => 54320 (host) (adapter 1)
homestead: 8025 (guest) => 8025 (host) (adapter 1)
homestead: 9600 (guest) => 9600 (host) (adapter 1)
homestead: 27017 (guest) => 27017 (host) (adapter 1)
homestead: 22 (guest) => 2222 (host) (adapter 1)
==> homestead: Running 'pre-boot' VM customizations...
==> homestead: Booting VM...
==> homestead: Waiting for machine to boot. This may take a few minutes...
homestead: SSH address: 127.0.0.1:2222
homestead: SSH username: vagrant
homestead: SSH auth method: private key
Here, at SSH auth method: private key
, we get a stall until timeout, after which I get a set of these log messages:
homestead: Warning: Connection reset. Retrying...
homestead: Warning: Connection aborted. Retrying...
After those two, everything continues "normally":
homestead: Vagrant insecure key detected. Vagrant will automatically replace
homestead: this with a newly generated keypair for better security.
homestead:
homestead: Inserting generated public key within guest...
homestead: Removing insecure key from the guest if it's present...
homestead: Key inserted! Disconnecting and reconnecting using new SSH key...
==> homestead: Machine booted and ready!
==> homestead: Checking for guest additions in VM...
==> homestead: Setting hostname...
==> homestead: Configuring and enabling network interfaces...
==> homestead: Mounting shared folders...
homestead: /vagrant => C:/xampp/htdocs/company/upgrade/homestead
homestead: /home/vagrant/code => C:/xampp/htdocs/company/upgrade/project2
homestead: /home/vagrant/phpmyadmin => C:/xampp/htdocs/company/upgrade/phpmyadmin
==> homestead: Running provisioner: file...
homestead: C:/xampp/htdocs/company/upgrade/homestead/aliases => /tmp/bash_aliases
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: grep: unrecognized option '---- BEGIN SSH2 PUBLIC KEY ----
homestead: Comment: "rsa-key-20190312"
homestead: AAAAB3NzaC1yc2EAAAABJQAAAQEAh8eQk5ttUOVN5me3LkpdKh8XaJYkIpvvcBhf
homestead: 1YMixNT3eGFSfGzo2VCJ2V0/Rnfn0MnQJG1pMCBsWLCQWYy7kvWnpV8c1LWWJwc5
homestead: Za29O0qW+Q8vGevysYnyK/T9IW4z/qij85RHd5/PQVxXBDbtpTClWWa8mcFbmfav
homestead: zsMhZkVS3FEl+zHYk+O/4Uc8NoLvo2BoQPlhpuIiL1pnlJeefweu7Vn19IsQ6Ur4
homestead: qR+XGZcur5u/Zy53W83Bw50zPS85lkoKc5uNWoNjQ/xue8th4/BRV3EhOjpowKom
homestead: zDmf6ShX9+3E3uY0LVMiqE7IWHcsH036kcI+5fFSX9sWL/2XMQ==
homestead: ---- END SSH2 PUBLIC KEY ----
homestead: '
homestead: Usage: grep [OPTION]... PATTERN [FILE]...
homestead: Try 'grep --help' for more information.
homestead:
homestead: ---- BEGIN SSH2 PUBLIC KEY ----
homestead: Comment: "rsa-key-20190312"
homestead: AAAAB3NzaC1yc2EAAAABJQAAAQEAh8eQk5ttUOVN5me3LkpdKh8XaJYkIpvvcBhf
homestead: 1YMixNT3eGFSfGzo2VCJ2V0/Rnfn0MnQJG1pMCBsWLCQWYy7kvWnpV8c1LWWJwc5
homestead: Za29O0qW+Q8vGevysYnyK/T9IW4z/qij85RHd5/PQVxXBDbtpTClWWa8mcFbmfav
homestead: zsMhZkVS3FEl+zHYk+O/4Uc8NoLvo2BoQPlhpuIiL1pnlJeefweu7Vn19IsQ6Ur4
homestead: qR+XGZcur5u/Zy53W83Bw50zPS85lkoKc5uNWoNjQ/xue8th4/BRV3EhOjpowKom
homestead: zDmf6ShX9+3E3uY0LVMiqE7IWHcsH036kcI+5fFSX9sWL/2XMQ==
homestead: ---- END SSH2 PUBLIC KEY ----
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: Ignoring feature: mariadb because it is set to false
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: Ignoring feature: ohmyzsh because it is set to false
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: Ignoring feature: webdriver because it is set to false
==> homestead: Running provisioner: shell...
homestead: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20190905-992-r7q2nr.sh
==> homestead: Running provisioner: shell...
homestead: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20190905-992-yscmnz.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Certificate: project2.test
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Site: project2.test
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20190905-992-c5gl1h.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Checking for old Schedule
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Certificate: phpmyadmin.test
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Site: phpmyadmin.test
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20190905-992-ddpbhl.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Checking for old Schedule
==> homestead: Running provisioner: shell...
homestead: Running: script: Clear Variables
==> homestead: Running provisioner: shell...
homestead: Running: script: Restarting Cron
==> homestead: Running provisioner: shell...
homestead: Running: script: Restarting Nginx
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating MySQL Database: homestead
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Postgres Database: homestead
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating MySQL Database: project2
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Postgres Database: project2
==> homestead: Running provisioner: shell...
homestead: Running: script: Update Composer
homestead: Updating to version 1.9.0 (stable channel).
homestead:
homestead: Use composer self-update --rollback to return to version 1.8.6
==> homestead: Running provisioner: shell...
homestead: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20190905-992-1jrdxnk.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Update motd
==> homestead: Running provisioner: shell...
homestead: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20190905-992-ziaa9c.sh
Now, on some occasions composer
would fail saying it couldn't talk to getcomposer.org
, etc. but for this example it did not, but still, the problem persists:
Now if I ping either project2.test
or phpmyadmin.test
from my host machine, I sadly get this in repetition:
C:\xampp\htdocs\company\upgrade\homestead>ping phpmyadmin.test
Pinging phpmyadmin.test [192.168.10.10] with 32 bytes of data:
General failure.
General failure.
General failure.
General failure.
Ping statistics for 192.168.10.10:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
And whatever I do: change the network type to public_network
, change the connection type from: Internal, NAT, Bridged, etc. nothing helps.
I've Googled out everything I could have think of, and I really appreciate help now.
To make things more sad and frustrating, when I run:
vagrant ssh
I get SSH'd into the box:
C:\xampp\htdocs\company\upgrade\homestead>vagrant ssh
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-55-generic x86_64)
0 packages can be updated.
0 updates are security updates.
vagrant@homestead:~$
And for the sake of the question, I think this might help too:
vagrant@homestead:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fe3b:5ada prefixlen 64 scopeid 0x20<link>
ether 08:00:27:3b:5a:da txqueuelen 1000 (Ethernet)
RX packets 5739 bytes 1661215 (1.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3646 bytes 645148 (645.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.10 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe94:98e6 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:94:98:e6 txqueuelen 1000 (Ethernet)
RX packets 60 bytes 9575 (9.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 36 bytes 4544 (4.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 324 bytes 79369 (79.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 324 bytes 79369 (79.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0