• TIL: Vagrant Installs VirtualBox

    As part of my morning fighting with Windows 10 Anniversary I learned something new. If vagrant can’t communicate with VirtualBox it will try to install the version it was tested with:

    > vagrant up devel
    ==>  Provider 'virtualbox' not found. We'll automatically install it now...
         The installation process will start below. Human interaction may be
         required at some points. If you're uncomfortable with automatically
         installing this provider, you can safely Ctrl-C this process and install
         it manually.
    ==>  Downloading VirtualBox 5.0.10...
         This may not be the latest version of VirtualBox, but it is a version
         that is known to work well. Over time, we'll update the version that
         is installed.
         Progress: 100% (Rate: 590k/s, Estimated time remaining: --:--:--)
    ==>  Installing VirtualBox. This will take a few minutes...
         A couple pop-ups will occur during this installation process to
         ask for admin privileges as well as to install Oracle drivers.
         Please say yes to both. If you're uncomfortable with this, please
         install VirtualBox manually.

    In my case it didn’t work because I already had a newer version of VirtualBox installed:

    Vagrant has detected that you have a version of VirtualBox installed
    that is not supported by this version of Vagrant. Please install one of
    the supported versions listed below to use Vagrant:
    4.0, 4.1, 4.2, 4.3, 5.0
    A Vagrant update may also be available that adds support for the version
    you specified. Please check to download
    the latest version.
  • Vagrant up error with Windows 10 Anniversary

    This morning my work laptop rebooted and installed Windows 10 Anniversary. When I tried to run vagrant up I ran into some problems:

    > vagrant up devel
    Bringing machine 'devel' up with 'virtualbox' provider...
    ==> devel: Checking if box 'ubuntu/trusty64' is up to date...
    ==> devel: A newer version of the box 'ubuntu/trusty64' is available! You currently
    ==> devel: have version '20160318.0.0'. The latest is version '20160926.0.1'. Run
    ==> devel: `vagrant box update` to update.
    ==> devel: Clearing any previously set forwarded ports...
    ==> devel: Clearing any previously set network interfaces...
    ==> devel: Preparing network interfaces based on configuration...
        devel: Adapter 1: nat
        devel: Adapter 2: hostonly
    ==> devel: Forwarding ports...
        devel: 22 (guest) => 10422 (host) (adapter 1)
        devel: 80 (guest) => 10480 (host) (adapter 1)
    ==> devel: Running 'pre-boot' VM customizations...
    ==> devel: Booting VM...
    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.
    Command: ["startvm", "6e7619dd-3bbb-41d8-a4af-c10dadb4175c", "--type", "headless"]
    Stderr: VBoxManage.exe: error: The virtual machine 'devel' has terminated unexpectedly during startup with exit code -1073741819 (0xc0000005)
    VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine

    The only solution I found to this was to:

    1. Uninstall VirtualBox
    2. Install the current version of VirtualBox
    3. Update Vagrant
    4. Reboot

    Just in case someone else needs help. :-)

  • Link Post and Podcast Roundup: October 2016 Edition

  • Maximizing Your Efficiency in Sublime Text - Snippets

    As we talked about last time, Sublime Text will autocomplete specific keywords that are defined by either the Sublime Text crew or a plugins developers. What if I told you that it’s possible to create snippets to create your own keywords to speed up your development.

  • Vagrant in a Mixed Development Environment

    On some projects we have a mixture of OSX and Windows development machines. Normally, this isn’t a problem because we develop inside a VM so we don’t need to worry about inconstancies between our development environments and production. The issue is that OSX machines do much better if you’re using nfs instead of the virtualbox provider. Unfortunately, Windows doesn’t support NFS natively so we need to have some way to determine if the machine is running on an OSX host.

  • Maximizing Your Efficiency in Sublime Text - Tab to Autocomplete

    One of the great things about Sublime Text is that it’s intelligent enough to look at the file you’ve opened and provide context sensitive.

  • Fixing 'SSH Error: Host key verification failed.' error in Ansible

    The other day I rebuilt a VM that we’re managing using Ansible and when we tried to have Ansible reset it’s configuration we received the following error:

    fatal: [] => SSH Error: Host key verification failed.
        while connecting to
    It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

    Ansible doesn’t provide a good explanation of how to fix this but the issue resolves around the fact that the IP address stayed the same but when the server was rebuilt the SSH keys changed and there’s a conflict in the known_hosts file.

    If you attempt to SSH into the box as that user SSH will help you fix the problem:

    user@host:~/path$ ssh
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the ECDSA key sent by the remote host is
    Please contact your system administrator.
    Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /home/user/.ssh/known_hosts:13
      remove with: ssh-keygen -f "/home/user/.ssh/known_hosts" -R
    ECDSA host key for has changed and you have requested strict checking.
    Host key verification failed.

    Then running the ssh-keygen command removes the bad entry:

    user@host:~/path$ ssh-keygen -f "/home/user/.ssh/known_hosts" -R
    # Host found: line 13 type ECDSA
    /home/user/.ssh/known_hosts updated.
    Original contents retained as /home/user/.ssh/known_hosts.old

    And finally we can now run Ansible and it will connect!

    user@host:~/path$ ansible-playbook -v --inventory-file=ansible/inventory/production.ini -u user ansible/devel.yml
    PLAY [all] ********************************************************************
    GATHERING FACTS ***************************************************************
    The authenticity of host ' (' can't be established.
    ECDSA key fingerprint is a0:c9:23:12:f4:91:91:f0:45:0e:6c:d3:2e:ae:63:d7.
    Are you sure you want to continue connecting (yes/no)? yes
  • Link Post and Podcast Roundup: August 2016 Edition

    More links for your enjoyment.

  • Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error

    I received an interesting error a couple days ago when I tried to push to GitHub:

    remote: error: File dumpfile.sql is 118.57 MB; this exceeds GitHub's file size limit of 100 MB

    It turns out that I accidentally committed a MySQL dump file that I grabbed from our development server. GitHub only allows for 100 MB file which is totally understandable but now I'm stuck with a 118 MB file in my repo with no way to push it to GitHub. It turns out with some command line fu you can remove a file completely from a repo:

    git filter-branch --index-filter 'git rm --cached --ignore-unmatch dumpfile.sql' merge-point..HEAD

    At which point you can push the file to GitHub.

    Update 2017-07-29

    So I added a new file to a repo today and it turns out GitHub changed from 100 MB to 50 MB. I've updated the title and included this so hopefully people will find it.

    remote: warning: GH001: Large files detected. You may want to try Git Large File Storage -

    remote: warning: See for more information.

    remote: warning: File initial.sql.gz is 98.65 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB

  • Maximizing Your Efficiency in Sublime Text - User Settings

    The user settings are a powerful tool for overriding some of Sublime’s default settings with ones that make it easier for you to work.

subscribe via RSS