eTechtips

Tech Tips and Insights

Vagrant: editing metadata_url file causes illegal character issue

/

I was editing the ~/.vagrant.d/boxes//metadata_url file in a box I was testing and when I ran “vagrant box update” I received the following:

$ vagrant box update
==> default: Checking for updates to 'edev-developer'
    default: Latest installed version: 2.0.5
    default: Version constraints: 
    default: Provider: virtualbox
There was an error while downloading the metadata for this box.
The error message is shown below:

Illegal characters found in URL


The illegal character happens to be an EOL char added automatically by your editor, mine was vi, and that is causing the error. I used the following commands to remove the eol character from the file.

perl -pe 'chomp if eof' .vagrant.d/boxes//metadata_url > .vagrant.d/boxes//metadata_url2
mv ~/.vagrant.d/boxes//metadata_url2 ~/.vagrant.d/boxes//metadata_url

Loading

3 Comments

3 responses to “Vagrant: editing metadata_url file causes illegal character issue”

  1. Nunu Avatar
    Nunu

    Thanks, that was a life saver!

  2. ecdown Avatar
    ecdown

    Glad it helped!

  3. Al Avatar
    Al

    This is exactly the solution I was looking for. Thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.