Running Vagrant from external disk on multiple different computers/hosts

781 views
Skip to first unread message

Marcus Renz

unread,
Oct 7, 2014, 11:00:31 AM10/7/14
to vagra...@googlegroups.com

i want to use my vagrant VBox image (Debian) on 2 ore more different Windows 7 PCs, because a lot of settings and data (e.g. DB, Vhost) are already in place. I'm using the image for different projects and just make a new vagrant-vbox-image when i need other OS, PHP etc. versions.

So i installed Vagrant and Virtualbox on both machines, changed the path of the Virtualbox-Images to my external disk via Virtualbox Manager and also changed the path of /.vagrant.d to the external disk by setting an environment variable for VAGRANT_HOME. On both machines. Now it works on one machine, but i can't start the image on the other one.

I'm using the latest VBox 4.3.15. i tried to start the image with "vagrant up", but this tries to install me a new image from the box defined and gives me this error:

Stderr: VBoxManage.exe: error: Could not rename the directory 'W:\VirtualBox VMs\boxes_default_1383360377_1408558738514_43554' to 'W:\VirtualBox VMs\dev_deb720' to save the settings file (VERR_ALREADY_EXISTS)

And adding the existing image to the VBox Manger by just clicking in the .vbox and then starting it from there just brings up an error:

Fehlercode:E_FAIL (0x80004005) Komponente:Machine Interface:IMachine {480cf695-2d8d-4256-9c7c-cce4184fa048}


Some informations still seems to be on the host computer, maybe the ids. But i can't find out why this doesn't work.

So has anyone tried to do the same and can describe how the same vagrant-vbox-image can be used on different machines? Or some hints?

FYI:
I've posted this question before at stackoverflow, but didn't get a working answer or example.
http://stackoverflow.com/questions/25412077/running-vagrant-from-external-disk-on-2-different-computers/25415642

Thanks in advance!

Alvaro Miranda Aguilera

unread,
Oct 7, 2014, 4:23:39 PM10/7/14
to vagra...@googlegroups.com
Hello, are 3 different PATHs, can you explain with of them do you want to have in the external disk

1. The Vagrant project. This is where the Vagrantfile exits. This is easy, should work from the external disk.

2. The VAGRANT_HOME, this should be a different path than the previous path.

3. Virtualbox path, you can also setup to the external drive, and use a environment variable, which is VBOX_USER_HOME, this will be the home where the xml configuration file will be created, so easy trick will be.

Set this variable.
Open the gui
Change the default path, say W:\VirtualBox VMs\
close the gui
open the gui and check is still good

Say your have W:

You could use:

W:\vagrant_home
W:\vagrant_projects
W:\vbox_home
W:\VirtualBox VMs


So each directory is different, since each folder hold different stuff on it.

Hope this helps.

Alvaro.



--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcus Renz

unread,
Oct 8, 2014, 7:20:26 AM10/8/14
to vagra...@googlegroups.com
Hi Alvaro,

thx a lot for your replay. But i've changed all 3 different paths, like described:

  1. Vagrant Project: This is on my external disk. But it includes a folder ".vagrant" that has some michine-ids in it, maybe this is the problem
  2. VAGRANT_HOME: The Path is changed to my external disc via an system variable in windows
  3. Virtual-Box-Path: I also changed this to my external drive

This all works fine when i set this up on my first host computer. But if i change all the paths (VAGRANT_HOME and Virtual-Box-Path) on my second host computer, it wants to make a new image :-(

So i think there must be something different on each host. Any further help will be appreciated.

Best
Mucky

Marcus Renz

unread,
Oct 9, 2014, 8:22:39 PM10/9/14
to vagra...@googlegroups.com
Hi,

no one has a working solution?

My colleague managed it with a external harddisk on differernt computers, but he only has the harddisk of the VM (the *.vmdk file) on the external disk.
Everything else is on the host, so he doesn't change any Paths.

This is not the optimal solution, there must be a better one to have everything possible inkl. boxes etc. on the external harddisk.

Thanks in advance
Marcus

Alvaro Miranda Aguilera

unread,
Oct 9, 2014, 8:35:07 PM10/9/14
to vagra...@googlegroups.com, marcu...@gmail.com
I did reply few days ago, let me re-send what I wrote:

Hello, are 3 different PATHs, can you explain with of them do you want to have in the external disk

1. The Vagrant project. This is where the Vagrantfile exits. This is easy, should work from the external disk.

2. The VAGRANT_HOME, this should be a different path than the previous path.

3. Virtualbox path, you can also setup to the external drive, and use a environment variable, which is VBOX_USER_HOME, this will be the home where the xml configuration file will be created, so easy trick will be.

Set this variable.
Open the gui
Change the default path, say W:\VirtualBox VMs\
close the gui
open the gui and check is still good

Say your have W:

You could use:

W:\vagrant_home
W:\vagrant_projects
W:\vbox_home
W:\VirtualBox VMs


So each directory is different, since each folder hold different stuff on it.

Hope this helps.

--

Marcus Renz

unread,
Oct 13, 2014, 9:07:21 AM10/13/14
to vagra...@googlegroups.com, marcu...@gmail.com
Hi Alvaro,

i answerd to your first post and mentioned, that your solution will not work. So i'm still searching for one.
So why did you re-post your reply? Have you really tested your described setup with an external harddsik on 2 different computers?

Best
Marcus

Alvaro Miranda Aguilera

unread,
Oct 13, 2014, 1:54:18 PM10/13/14
to vagra...@googlegroups.com, Marcus Renz
with this i did a setup for a coworker to share the vagrant and the vbox machines between windows and linux

so I assume should work between 2 different computers
Reply all
Reply to author
Forward
0 new messages