Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
192
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

Organization

macで作られたvagrant boxをもらったときに出るネットワークエラーの対処法

トラブル

macで開発をしている人からvagrantのboxをもらって、それをvagrant upすると、ip addressをふる設定がエラーになる。

vagrantfileに下記のように書いておいて、vagrant upをすると、eth1がどうのとかのエラーが出る。

  config.vm.define :drive do |drive|
    drive.vm.box = "drive"
    drive.vm.network :private_network, ip: "192.168.131.131"
  end
[drive] Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

ARPCHECK=no /sbin/ifup eth1 2> /dev/null

Stdout from the command:

Device eth1 does not seem to be present, delaying initialization.


Stderr from the command:

こんな感じのエラーがでて、ifconfigをしてみても、指定したipがふられていない。

解決法

一回、sshでvagrantのinstanceにloginする。そして下記を打つ。

sudo ln -s -f /dev/null /etc/udev/rules.d/70-persistent-net.rules

その後、

vagrant reload

これで割り振られるようになる。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
192
Help us understand the problem. What are the problem?