LoginSignup
13
10

More than 5 years have passed since last update.

Vagrant box のダウンロードが遅い時の雑な解決策

Last updated at Posted at 2018-01-01

背景

Vagrant box のダウンロードが異様に遅い時がある。

スクリーンショット 2018-01-01 9.51.19.png

3 年前くらいに issue が報告され (https://github.com/hashicorp/vagrant/issues/5319 )、vagrant は悪くねーよということでクローズされたが、根本原因は不明のままで未だに同様の問題で困っている人たちがそこそこいるようだ (自分も含め)。

雑に解決したので、メモとして残しておく。

雑な解決策

1. 対象の Box の URL を雑に取得する

例えば、centos/7 が欲しい時、% vagrant box add centos/7 というコマンドをシェルで叩くと、コンソールに Downloading: {Box の URL} のような行が表示されるので、その URL をコピペして Ctrl-C。

2. wget

1 で手に入れた URL から Box を wget などでダウンロードする。

wget ${Box の URL}

なんか速い。

3. vagrant に Box を追加

vagrant box add centos/7 ${ダウンロードした Box のパス}
13
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
10