Virtual Cables, Homestead SSH Timeout, and PHP7.0 Service Not Found

December 30, 2016 :: Reading time: 1 minute, 24 seconds

A while back, some people started running into bugs when going through my book while using Homestead Improved, my improved clone of the Laravel Homestead development environment. The problem was a message not unlike:

php7.0-fpm.service not found

If you are running into this as well, please just re-download the zip or re-clone the repo, and it'll work just fine - all bugs have been fixed.

So what happened? If you'd like to know, keep reading.


There were two issues.

  1. The original box (Laravel Homestead) was updated to PHP 7.1, and my own scripts on Homestead Improved still referenced 7.0. Obviously, since 7.0 was no longer installed, the above message started showing up. So all it took was replacing 7.0 with 7.1 in all files, right? Nope. After doing this and testing it, I noticed another thing - all SSH connection attempts (and thus provisioning) started to fail with the most recent versions of Homestead Improved, Vagrant, and Virtualbox. Point 2. explains why.

  2. Someone up the chain (either Virtualbox or Vagrant) decided to make a virtual, non-existent cable disconnected by default. With such a setup, the guest machine had no network access to the host, and no SSH connection could be established. I'm not kidding - there is an actual "cable connected" option in Virtualbox settings for machine interfaces:

    Cable?

    Checking this box and saving, then running vagrant reload helped and made it work, but a more permanent fix that completely removed the issue was adding a new configuration option into the Vagrant boot-up procedure:

    vb.customize ['modifyvm', :id, '--cableconnected1', 'on']

With the versions updated and the "cable" always connected, Homestead Improved once again works as intended, and is faster and more secure than ever.

Blog Comments powered by Disqus.