hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.23k stars 4.43k forks source link

The box you're attempting to add already exists: #2988

Closed davis9001 closed 10 years ago

davis9001 commented 10 years ago

I ran this: ... vagrant box add JujuQuickStart http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-juju-vagrant-disk1.box ...

After it finished I realized it should have been i386 like this: ... vagrant box add JujuQuickStart http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-i386-juju-vagrant-disk1.box ...

Vagrant downloaded the giant file, then told me this: ... The box you're attempting to add already exists:

Name: JujuQuickStart Provider: virtualbox ...

Unfortunately when I re-ran command after destroying the bad copy vagrant re-downloaded the box file again... I propose that either Vagrant give the warning before the download, or that it use the cached download file automatically.

drpebcak commented 10 years ago

With vagrant, you can have two boxes with the same name (ie for boxes from two different providers). It has no way of knowing what sort of box you're trying to add until it downloads it and can read it.

mitchellh commented 10 years ago

@drpebcak Is exactly right. This is improved in the next version of Vagrant because a single URL can reference multiple providers, so it will know beforehand.

davis9001 commented 10 years ago

Cool thanks @mitchellh and @drpebcak !