LoginSignup
44
44

More than 5 years have passed since last update.

Vagrantのネットワーク処理が異常に遅い場合の解決策

Last updated at Posted at 2014-09-25

問題

CentOSで立ち上げたVagrantのインスタンスでネットワーク処理(外部のAPIを叩く等)をしようとすると異常に遅い。
Vagrant以外なら0.5secくらいで終わるものが、5sec以上かかってしまう。

解決方法

調べたら以下で議論されている不具合だった
https://github.com/mitchellh/vagrant/issues/1172

解決方法としては、Vagrantfileに以下を追記して、Vagrantを再起動したら直った!

Vagrantfile

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
  end
44
44
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
44
44