2

I want to move Vagrant off my machine to an external hard drive.

Following these articles:

vagrant.d outside of the home folder

http://emptysqua.re/blog/moving-virtualbox-and-vagrant-to-an-external-drive/

which is pretty straightforward, I assumed that all subsequent vagrant boxes would look to my new path /Volumes/Vagrant/vagrant_home but this isn't the case.

Exporting VAGRANT_HOME seems to not work as per the guide; it seems in my case the environmental variable is ignored. According to shared_helpers.rb if VAGRANT_HOME is not found it will default to ~/.vagrant.d which in my case is what is happening. It's actually recreating /Users/jeitnier/.vagrant.d. Any new boxes are being created there instead of my VAGRANT_HOME path. It is defined in my .bash_profile and I also did the export from the command-line, again as the docs demonstrate.

echo $VAGRANT_HOME also shows the correct path of /Volumes/Vagrant/vagrant_home which is why I'm really stumped.

What could be happening here?

Community
  • 1
  • 1
Jared Eitnier
  • 7,012
  • 12
  • 68
  • 123
  • Jared, could you clarify what is the problem you are seeing? (And perhaps edit the question to reflect it.) – BrianC Sep 29 '14 at 04:42
  • I confirm the same problem on Ubuntu: `$ echo $VAGRANT_HOME /hdd/.vagrant.d` `$ vagrant -v Vagrant 1.6.5` `$ lsb_release -c Codename: trusty` still creates `~/.vagrant.d` – Alex Blex Sep 30 '14 at 13:43
  • @AlexBlex I was able to manually edit `/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/shared_helpers.rb` and set the path I wanted but I still ran into issues with the boxes stating they were created and running but nowhere to be found. – Jared Eitnier Sep 30 '14 at 13:52
  • @JaredEitnier: Thanks. After re-login all works. Most likely I forgot to `source` the profile or something like that. – Alex Blex Sep 30 '14 at 14:36
  • So you've got it creating new boxes where they ought to be & they show in the VirtualBox window? And it's not re-creating and reading from `.vagrant.d`? – Jared Eitnier Sep 30 '14 at 14:37

0 Answers0