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

Log in to Qiita Team
OrganizationAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Vagrant: assumes that this means the command failed!

More than 3 years have passed since last update.

vagrant1.9.3でbox addして、vagrant initして、vagrant upすると以下の問題が起きました。


  • Mac Book Pro / OS X EL Capitan(10.11.6)
  • vagrant 1.9.1 → 1.9.3 update
  • VirtualBox 5.1.14(たぶん) → 5.1.18 update
  • 作ったBoxは、vagrant 1.9.1で作ったもの
  • 作ったBoxは、CentOS6.6 / Apache2.2.15 / PHP5.6 / MySQL5.6...etcが積んであるBox

 ※ 20170403時点でvagrantの最新




vagran up した時のログ

すでに作ってあるBoxをaddしてからvagran init、vagrant upを行いました。

MB-PRO:centos-6_6-x86_php_5_6 t_i$ vagrant up
Bringing machine 'web' up with 'virtualbox' provider...
==> web: Importing base box 'centos-6_6-x64_php_5_6'...
==> web: Matching MAC address for NAT networking...
==> web: Setting the name of the VM: centos-6_6-x86_php_5_6_web_1491395549702_65364
==> web: Fixed port collision for 22 => 2222. Now on port 2200.
==> web: Clearing any previously set network interfaces...
==> web: Preparing network interfaces based on configuration...
    web: Adapter 1: nat
    web: Adapter 2: hostonly
==> web: Forwarding ports...
    web: 22 (guest) => 2200 (host) (adapter 1)
==> web: Running 'pre-boot' VM customizations...
==> web: Booting VM...
==> web: Waiting for machine to boot. This may take a few minutes...
    web: SSH address:
    web: SSH username: vagrant
    web: SSH auth method: private key
    web: Warning: Remote connection disconnect. Retrying...
    web: Vagrant insecure key detected. Vagrant will automatically replace
    web: this with a newly generated keypair for better security.
    web: Inserting generated public key within guest...
    web: Removing insecure key from the guest if it's present...
    web: Key inserted! Disconnecting and reconnecting using new SSH key...
==> web: Machine booted and ready!
==> web: Checking for guest additions in VM...
    web: The guest additions on this VM do not match the installed version of
    web: VirtualBox! In most cases this is fine, but in rare cases it can
    web: prevent things such as shared folders from working properly. If you see
    web: shared folder errors, please make sure the guest additions within the
    web: virtual machine match the version of VirtualBox you have installed on
    web: your host and reload your VM.
    web: Guest Additions Version: 4.3.16
    web: VirtualBox Version: 5.1
==> web: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

# Down the interface before munging the config file. This might
# fail if the interface is not actually set up yet so ignore
# errors.
/sbin/ifdown 'eth3'
# Move new config into place
mv -f '/tmp/vagrant-network-entry-eth3-1491395574-0' '/etc/sysconfig/network-scripts/ifcfg-eth3'
# attempt to force network manager to reload configurations
nmcli c reload || true

# Restart network
service network restart

Stdout from the command:

Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  
Determining IP information for eth0... done.
[  OK  ]
Bringing up interface eth1:  Device eth1 does not seem to be present, delaying initialization.
Bringing up interface eth3:  Determining if ip address is already in use for device eth3...
[  OK  ]

Stderr from the command:

usage: ifdown <device name>
bash: line 11: nmcli: command not found




[VirtualBox 4.3] 複製したゲストOS (CentOS) がネットワークに繋がらない: Device eth0 does not seem to be present, delaying initialization が表示された際の対応

複製したvagrant boxでNICエラーになりssh接続できない



  1. vagrant haltで停止させる。
  2. VirtualBoxで問題になっているVMを選択し、右クリックから「設定」の「ネットワーク」内の以下の設定をして「OK」ボタンを押す

    ・アダプター1: 「高度」のMACアドレスを更新して、メモしておく
    ・アダプター2: 「ネットワークアダプターを有効化」を無効にする(※結局有効になるみたい...)
3. vagrant up
4. vagrant sshでは入れないため、VirtualBoxの「表示」から「localhost login: vagrant」「Password: vagrant」でログイン
5. /etc/sysconfig/network-scripts配下に存在する、ifcfg-eth0だけを残して、
 あと他のifcfg-eth1~*のファイルはsudo rm -frで削除
6. sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0で、

    ・例) HWADDR="08:00:27:03:9a:f5"
7. sudo vi /etc/udev/rules.d/70-persistent-net.rulesでNAME="eth0"以外は、ddで削除していく
8. VirtualBoxのコンソールから出て、Mac側のvagrant upしたターミナルでvagrant reload


@colorrabbit さん
@J_Sugar__ さん


Freelance Engineer: Unity / Android / Xamarin / CodeIgniter / FuelPHP / CakePHP / WordPress / Rails / AWS / MySQL / SQLite / Jenkins / Docker / Firebase / LINE Bot ...etc
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