LoginSignup
4
0

More than 3 years have passed since last update.

minishift起動時エラー(Mac OSX)

Last updated at Posted at 2019-07-08

はじめに

みなさん、minishiftご存知ですか?
ローカル環境でRedhat Openshiftが試せるツールです。すげえ!

こいつでOpenshiftの勉強しようと思ったのですが、起動時に以下のエラー:frowning2:

-- Starting Minishift VM .... FAIL E0708 14:36:40.597045   21608 start.go:494] 
Error starting the VM: Error creating new host: json: cannot unmarshal bool into Go struct field Driver.Virtio9p of type 
[]string. Retrying.
Error starting the VM: Error creating new host: json: cannot unmarshal bool into Go struct field Driver.Virtio9p of type []string

一応公式手順に従って進めてきたはずなのだが。。。

解決方法

どうやら、インストールしたxhyveのバージョンが0.4.0だと起こる問題らしい。
k8sのissueに書いてありました。
以下コマンドを実行し、xhybeの違うバージョンをインストールします。

brew unlink docker-machine-driver-xhyve
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7310c563d662ddbe094f46f9600cad30ad3551a6/Formula/docker-machine-driver-xhyve.rb

すでに導入したxhybeをunlinkし、再度installしています↑
xhyve: json: cannot unmarshal bool into Go struct field Driver.Virtio9p of type []string #4291

違うバージョンのxhybeの導入が終わったので、minishiftの起動にチャレンジします。

・・・。

Checking for setuid bit ... FAIL
   See the 'Setting Up the Virtualization Environment' topic (https://docs.okd.io/latest/minishift/getting-started/setting-up-virtualization-environment.html) for more information

xhybeを入れ直したので、再度uidをセットしないとですね!

以下のコマンドを実行してください。

$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

再々度、minishift start

OpenShift server started.

The server is accessible via web console at:
    https://192.168.64.2:8443/console

うまくいきました!
上記URLにアクセスすると、(ID/Passwordはdeveloper/developer)無事Openshiftの画面が!
image.png

まとめ

xhybeをバージョン指定せずにインストールすると、v0.4.0になってしまう場合がある。
その場合はunlink ⇒ バージョン指定でインストール ⇒ uidをセット ⇒ minishift起動!

$ brew unlink docker-machine-driver-xhyve
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7310c563d662ddbe094f46f9600cad30ad3551a6/Formula/docker-machine-driver-xhyve.rb
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ minishift start

参考文献

macOSでMinishiftを起動してサンプルアプリケーションをデプロイ

これ読むと、docker-machineと今回インストールしたdocker-machine-driver-xhyveが競合するらしく、シンボリックを上書きしたほうが良いかもらしい。

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