mitchellh/vagrant — pull request #2484 by andyfowler (2013-11-10 00:08:38+00:00)
Title: Virtualbox parallel box import

This PR supersedes #1627, and simply takes @smoyer's excellent work on the 4.2 driver and brings it into the 4.3 driver as well.

During `VBoxManage import`, Virtualbox always uses the same intermediate directory for the imported ovf appliance file. This means that a single `.box` cannot be imported concurrently by another `Vagrantfile`.

This patch does a dry-run: `VBoxManage import -n` to get vmdk paths and appends current milliseconds + random number to their import target path.

Note I've cherry-picked @smoyer's original commit into here. If this is merged (plz!), #1627 can be closed.

### Meta note on concurrent `vagrant up`

I've also filed PR #2482 and #2483, which address similar issues when running `vagrant up` simultaneously. Our use case is several Jenkins jobs, wherein each boots a box to run a test suite. Since they're triggered from the same GitHub project, they start simultaneously.

I assume that others have the same kind of use case, and aside from these few issues, the strategy is working great! The boxes that they boot are built by the excellent [packer](https://github.com/mitchellh/packer) (in yet another Jenkins job!) I'll document this setup soon.