Vagrant ip割り振りが上手くいかない場合

Vagrant ip割り振りが上手くいかない場合

Vagrant環境でip割り振りが上手くいかない場合がありました。

 

先ず以下をやってみました。

systemctl restart httpd.service
systemctl restart network.service

これだけでは駄目でした。

 

原因はNICの自動設定がされる為でしたので、VagrantfileのIPを書く箇所にauto_config:falseと書きfalseにしたところうまく動きました。

config.vm.network "private_network", ip: "192.168.33.10", auto_config:false

 

Comments

No comments yet. Why don’t you start the discussion?

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です