Hello,

When the problem happen?
When Vagrant create the box from the template, and you try to do more than
1 at the same time.

Usually goes like this

mkdir myawesomeproject
cd myawesomeproject
vagrant init -m myawesomebox

here, on first vagrant up

Vagrant will read myawesomebox and will create myawesomebox inside the
default virtualbox folder

once that happen, it will rename myawesomebox into
myawesomeproject_<some_numbers>

So, when you do concurrent vagrant up under the same folder you may hit a
collision on the default virtualbox folder.


That's why, the best is

a. use different users, each user for each run

b.
Create a virtualbox default folder for each run
Create a vagrant folder
vagrant up


Hope this helps to see what the problem is, and what the solution is trying
to avoid.

Thanks
Alvaro.


On Sun, Nov 29, 2015 at 7:18 AM, <[email protected]> wrote:

> Thanks Alvaro for your answer.
>
> I have succeeded to set a machinefolder using the following command:
> > VBoxManage setproperty machinefolder "/home/jenkins/vbox/"
>
> This modifies the .config/VirtualBox/VirtualBox.xml to contain:
> >     <SystemProperties defaultMachineFolder="/home/jenkins/vbox/"
> defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth"
> webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3"
> exclusiveHwVirt="true"/>
>
> I could run the setproperty command before each job uses "kitchen
> test" command and specify a per job directory.
>
> I am not sure to understand however how this will solve the issue I
> encounter (which I am not sure to understand by the way).
> I understand that each new box launched by kitchen will be run in a
> folder that will (hopefully) be its job directory.
> Since the setproperty seems to act at the user level, there could be a
> race conditions if a job B set the machinefolder property after job A
> sets his but before job A start the box.
> This is unlikely if jobs have only one box to launch but our kitchen
> tests usually launch several of them sequentially.
>
> My manual tests so far show that vbox can starts and destroy boxses
> even if machinefolder have changed since creation.
>
>
> Can you help to understand if it will help to solve my issue ?
>
> Thanks again for the time you spend to help me
> --
> Gregoire
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/b9306f7b-4c84-4d68-b28f-cdea9ee4ff51%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/b9306f7b-4c84-4d68-b28f-cdea9ee4ff51%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyF1KUPNtNoAjQW3QdNer0epePvbRGi2J0jbKMTkhjQMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to