purazumakoiの[はてなブログ]

技術メモから最近はライフログも増えてきてます。

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

[windows環境です]

vagrant で自分でパッケージ化したやつを別でたてようと思い

C:\vagrant\centos65っていうディレクトリを新規で作成し、作ったpackage.boxを移動して

コマンドプロンプト

> cd C:\vagrant\centos65 
> vagrant box add centos65 package.box
> vagrant init centos65 
> vagrant up

ってやったら何か

[default] 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:

ってエラーが出た。
要はパッケージ化する前に、ゲストOS側で

[vagrant@localhost ~]$ sudo ln -s -f /dev/null /etc/udev/rules.d/70-persistent-net.rules

ってやってからじゃないといけないってことで、やってからpackage.box作りなおして、

一回環境破棄して、違う名前でboxをaddして初期化、起動

> cd C:\vagrant\centos65
> vagrant destroy
> vagrant box add centos652 package.box
> vagrant init centos652 
> vagrant up

って感じでやったらいけました。


参考

Vagrantでネットワークにつながらない時
http://plog.hatenablog.jp/entry/2014/04/26/112243

vagrantcentOSでprivate networkを設定するとエラーになる件
http://matsu-chara.hatenablog.com/entry/2013/10/25/231509

Vagrantのネットワークが起動しないときは
http://blog.monochromegane.com/blog/2013/04/06/vagrant-network-error/

[Chef&Vagrant] Vagrant: ドットインストールの開発環境構築レッスンをベースにWordPress環境をProvisioningしてみた
http://www.d-wood.com/blog/2013/09/26_4711.html