Vagrant = Bugs
Fixing bugs, version by version. A list of bugs that had to be solved in the past, for Vagrant to work as expected. Here are the Vagrant’s patches & fixes…
Make SSH work (fixed in later versions)
Vagrant still has a bugs, specially for Windows. So sometimes we need to
patch some files to help him work. This patch is very important because
I really like vagrant ssh
command, and by default, it doesn’t work in
Windows.
Find the location of a ssh.rb
file:
for /f "tokens=*" %f in ('where /R "c:\vagrant" "ssh.rb" ^| grep "embedded\\\gems\\\gems\\\vagrant.*\\\lib\\\vagrant\\\ssh.rb"') do @(set _TMP=%f)
<!--
For older Vagrant, it was:
for /f "tokens=*" %f in ('where /R "c:\vagrant" "ssh.rb" ^| grep "embedded\\\lib\\\ruby\\\gems\\\.*\\\gems\\\vagrant.*\\\lib\\\vagrant\\\ssh.rb"') do @(set _TMP=%f)
-->
Patch that ssh.rb
file
(
echo/57a58
echo/^> =begin
echo/65a67,71
(echo/^> )
echo/^> =end
(echo/^> )
echo/^> which = Util::Platform.windows? ? "where ssh >NUL 2>&1" : "which ssh >/dev/null 2>&1"
echo/^> raise Errors::SSHUnavailable if !Kernel.system^(which^)
) >vagrant-ssh-windows-patch.diff
patch -i vagrant-ssh-windows-patch.diff "%_TMP%"
And remove leftovers
del vagrant-ssh-windows-patch.diff
SSH in Vagrant will now work as supposed to:
vagrant ssh
Bugs in vagrant.bat (fixed in later versions)
Fix some Vagrant problems:
wget https://raw.github.com/hashicorp/puppet-modules/ef99331858602f569f40528103c7828a4f6ea7f4/modules/vagrant_installer/templates/windows_vagrant.bat.erb
Fixing v1.1.2 bugs (fixed in later versions)
- Error when: Downloading with Vagrant::Downloaders::HTTP… Example command: vagrant box add “ubuntu-12.10-quantal64-firstbeatmedia” “https://dl.dropbox.com/u/191471/FirstBeatMedia/ubuntu-12.10.box" Fix: wget –no-check-certificate -N “https://raw.github.com/mitchellh/vagrant/7e125db669a4434515d4b5cead9161d576d4aac1/lib/vagrant/box_collection.rb" -O “c:\Tools\Vagrant\vagrant\embedded\gems\gems\vagrant-1.1.2\lib\vagrant\box_collection.rb”
Linux GLIBC_2.1 error
In Linux, Vagrant version 1.0.6 sometimes won’t work (GLIBC_2.1 error) Bug: https://github.com/mitchellh/vagrant/issues/1335 The solution was to use older 1.0.5. I believe it is fixed in later versions.