LoginSignup
6
4

More than 1 year has passed since last update.

vagrant upでGuestAdditions seems to be installed (6.0.14) correctly, but not running. The following SSH command responded with a non-zero exit status.

Last updated at Posted at 2019-10-30

Vagrant upしたら、共有フォルダがマウントされなくなった

先日まで、普通に使えていた仮想環境(vagrant)が突然エラーを吐いて、共有フォルダをマウントしてくれなった...

おそらくMacOSをCatalinaにしたことが原因だと思われる?

console
$ vagrant up
...
...
GuestAdditions seems to be installed (6.0.4) correctly, but not running.
...
...
(省略)
...
...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

 setup

Stdout from the command:


Stderr from the command:

bash: line 3: setup: command not found

というエラーでハマり、他にも同じハマり方してる方がいる中、ググって出てきた方法を試してもなかなか解決しなかったので、備忘録的にまとめることにしました。(祝 初投稿!!)

TL;DR

vagrant plugin list
==> vagrant: A new version of Vagrant is available: 2.2.6 (installed version: 2.2.3)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html

vagrant-vbguest (0.17.2, global)

Vagrantfileに下の3行を追加するだけで解決

if Vagrant.has_plugin?("vagrant-vbguest")
   config.vbguest.auto_update = false  
end

・サンプル

Vagrantfile
Vagrant.configure(2) do |config|

(省略)

   if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.auto_update = false  
   end
end

追加後に

$ vagrant reload --provision

この方の記事が全く同じ境遇に出会っていて、解決方法が見つかりました
こちらの記事の方が詳しいです。
vagrant Homestead でホストOSの共有フォルダが見れなくなった際の対処

さかまたさん ありがとうございました。

以下、過程

・参考記事
vagrant upでエラー 「command failed! setup」
vagrant up するとGuestAdditions エラーが発生
Vagrantで共有フォルダがマウントされない

この辺りの解決策が同じエラーに出会ってそうなので、参考にして

・yum update したり
・wget http://download.virtualbox.org/virtualbox/6.0.14/VBoxGuestAdditions_6.0.14.iso したり
・Virtual Boxを最新版に修正したり

色々試しては、snapshotで復元して他の方法を繰り返し試しました。
エラー吐いても、sshログインは出来るので、共有フォルダがマウントされていないか確認することができるので、毎回確認していましたが、自分の場合は何も改善はなかったです。

6
4
0

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
6
4