Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change the box_url after the initial vagrant up #9637

Closed
tallen1983 opened this issue Mar 29, 2018 · 3 comments
Closed

Cannot change the box_url after the initial vagrant up #9637

tallen1983 opened this issue Mar 29, 2018 · 3 comments

Comments

@tallen1983
Copy link

Vagrant version

2.0.3

Host operating system

Windows

Guest operating system

Irrelevant

Vagrantfile

    config.vm.box_url = "file://some/path/to/mybox.json"

Expected behavior

If I change the box_url later, it should begin checking the new location, not the old location the next time I vagrant up when it checks for an outdated box.

Actual behavior

No matter what you change the box_url to in Vagrantfile, it always uses the url it used to initially provision the box.

Steps to reproduce

  1. Provision a box
  2. Change where the json file exists in Vagrantfile
  3. Run vagrant box outdated --debug and see that it still uses the old URL (also happens with vagrant up)

Details

The metadata_url file in ~/.vagrant.d/boxes/< some string >/ contains the original URL used to provision the box, and is never updated based on the new contents of an updated Vagrantfile.

@chrisroberts
Copy link
Member

Hi there,

This is the expected behavior. You can update the box URL by destroying and creating the guest again.

Cheers!

@staelche
Copy link

staelche commented Feb 3, 2020

Hi there,

just for documentary reasons. I just had this issue with custom box urls, as well. I had to change the domain of the page hosting my own boxes.

The solution was not just to destroy the current Vagrant box but to remove all old box versions from the local Vagrant installation, too. After doing this Vagrant used the new box_url value of the VagrantFile.

@ghost
Copy link

ghost commented Feb 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants