furoblog’s blog

妻と一緒にはじめました。1日1更新が目標です。

【Vagrant】GuestAdditions seems to be installed (6.0.8) correctly, but not running.

Vagran

 

エラーでVagrant upできなかったので解決までのメモ

 

正常状態の確認方法

以下のようになるはず。

$ vagrant vbguest --status
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 6.0.2
VBoxService inside the vm claims: 6.0.8
Going on, assuming VBoxService is correct...
[default] GuestAdditions 6.0.8 running --- OK.

 

NGな場合

vagrant vbguest』を実行すると

[default] GuestAdditions seems to be installed (6.0.8) correctly, but not running.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
bash: line 4: setup: command not found
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: xxxxxxxx
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 4: setup: command not found

 

のようになった。

 

Vagrant sshしてyumを最新にしてみる

特に変化なし

 

qiita.com

 

Pingで確認

そもそも自分のローカル環境へのIPが通るのかチェック。

 

Vagrantfileの

config.vm.network :private_network, ip:"xxx.xxx.xx.xx"

 

を確認し、

 

pimg xxx.xxx.xx.xx

 

と打ち、レスポンスが返って来れば成功。

返ってこない場合、

 

--- xxx.xxx.xx.xx ping statistics --- xx packets transmitted, 0 packets received, 100.0% packet loss

 

などとなる。

 

curlで確認

curl -v http://xxx.xxx.jp

 

curl: (7) Failed to connect to xxx.xxx.jp port 80: Connection refused

 

ファイアウォールを無効化する

仮想環境内なので動くかどうかチェックするために

 

vagrant ssh

sudo systemctl stop firewalld

 

これで動作が変わるかどうかチェック。