199
191

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Posted at

#トラブル
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

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

199
191
5

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
199
191

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?