vagrant+virtualboxでCentOS 7構築(windows)

vagrantvirtualboxのインストール

qiita.com

ここを参考にしました。

ただし、以下は、vagrant-vbguestとvagrant-hostmanagerのみ実施。

> vagrant plugin install vagrant-omnibus 

  →エラーが出たため、アンインストールした。

  vagrant plugin uninstall vagrant-omnibus
> vagrant plugin install vagrant-vbguest
> vagrant plugin install vagrant-hostmanager

 

ここも分かりやすいので、両方参考にしました。

taustation.com

あと、アンインストールに関しては、以下を参考にしました。

pentan.info

■Vagrantfileの修正

追加した内容は以下です。

  if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.auto_update = false
  end
  
  config.vm.box_check_update = false
  
  config.vm.network "forwarded_port", guest: 80, host: 8080
  
  config.vm.synced_folder "C:/vagrant/centos77/share", "/vagrant_data"

  config.vm.box_url = "https://app.vagrantup.com/bento/boxes/centos-7.7

vm.box_urlについて)

>vagrant up

したときに、以下のエラーが出たため、追記しました。

    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Box 'bento/cenos-7.7' could not be found. Attempting to find and in
    stall...
        default: Box Provider: virtualbox
        default: Box Version: >= 0
    The box 'bento/cenos-7.7' could not be found or
    could not be accessed in the remote catalog. If this is a private
    box on HashiCorp's Vagrant Cloud, please verify you're logged in via
    `vagrant login`. Also, please double-check the name. The expanded
    URL and error message are shown below:

    URL: ["https://vagrantcloud.com/bento/cenos-7.7"]
    Error: The requested URL returned error: 404 Not Found

エラーについては、以下を参考にしました。

qiita.com