LoginSignup
1
0

More than 5 years have passed since last update.

【Vagrant+VirtualBox】ubuntu1604-desktopは404 Not Foundになるので、ubuntu/xenial64かubuntu1804を使いましょう

Last updated at Posted at 2018-08-20

はじめに

ubuntu16.04を使っている開発プロジェクトの環境を、新PCで作成したら失敗したのでメモ。

発生した問題

  • 新PCセットアップ中に、初めてvagrant upするとリモートファイルのダウンロードに失敗する
    • 旧PCでは、ubuntu1604で環境が作れていたのになぜ?

環境

区分 備考
vagrant 2.1.2
virtualbox 5.2.18
boxイメージ ubuntu1604-desktop ubuntu/bionic64に変更した

発生したエラー

>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'box-cutter/ubuntu1604-desktop' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'box-cutter/ubuntu1604-desktop'
    default: URL: https://vagrantcloud.com/box-cutter/ubuntu1604-desktop
==> default: Adding box 'box-cutter/ubuntu1604-desktop' (v2.0.26) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/box-cutter/boxes/ubuntu1604-desktop/versions/2.0.26/providers/virtualbox.box
    default: Download redirected to host: cdn.boxcutter.io
    default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

The requested URL returned error: 404 Not Found

確かに、http://cdn.boxcutter.io/ubuntu/virtualbox5.1.10/ubuntu1604-desktop-2.0.26.box にアクセスするとエラーになる。

根本的な原因

2018年1月頃から、バイナリの提供をやめているとのこと。
https://github.com/boxcutter/ubuntu/issues/142

代替案1

16.04系を使うなら、ubuntu/xenial64にする。

代替案2

16.04ではなく、18.04にする。
https://vagrantcloud.com/search にて、「18.04」で検索すると、18.04のイメージが結構出てくる。

今回は、ubuntu/bionic64 を採用する。

  # config.vm.box = "box-cutter/ubuntu1604-desktop"
  config.vm.box = "ubuntu/bionic64"

おわりに

無事に仮想環境を作ることができました。この機会に、プロジェクトのOSも16.04から、18.04に上げたいと思います。

1
0
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
1
0