LoginSignup
2
1

More than 3 years have passed since last update.

CentOS8にNutanix Guest Tools(NGT)をインストールする手順

Posted at

まず普通にNGTインストール実行

[root@centos8 ~]# mount /dev/cdrom /media/
mount: /media: 警告: デバイスは書き込み禁止です、読み込み専用でマウントします.

[root@centos8 ~]# ls /media/
autorun.inf  config  installer  ngt_autorun.ico  rr_moved  setup.exe

[root@centos8 ~]# /media/installer/linux/install_ngt.py
/usr/bin/env: `python': そのようなファイルやディレクトリはありません
[root@centos8 ~]# python -V
-bash: python: コマンドが見つかりません
[root@centos8 ~]# yum install -y python-setuptools
CentOS-8 - AppStream                            330 kB/s | 6.0 MB     00:18
CentOS-8 - Base                                 1.5 MB/s | 4.0 MB     00:02
CentOS-8 - Extras                               1.3 kB/s | 2.1 kB     00:01
一致した引数がありません: python-setuptools
エラー: 一致するものが見つかりません

無いので怒られる。
[root@centos8 ~]# yum -y install python
メタデータの期限切れの最終確認: 0:03:44 時間前の 2020年02月01日 19時01分20秒 に 実施しました。
一致した引数がありません: python
There are following alternatives for "python": python2, python36
エラー: 一致するものが見つかりません

Pythonインストールの際は明示的にバージョンを選んであげる必要があります。
Pytho2系はこの記事執筆時点の2020/02現在でサポート切れてるので、迷わず3系を選択

[root@centos8 ~]# yum -y install python36
メタデータの期限切れの最終確認: 0:03:54 時間前の 2020年02月01日 19時01分20秒 に 実施しました。
依存関係が解決しました。
================================================================================
 パッケージ          アーキテクチャー
                            バージョン                          リポジトリ
                                                                          サイズ
================================================================================
Installing:
 python36            x86_64 3.6.8-2.module_el8.1.0+245+c39af44f AppStream  19 k
Upgrading:
 platform-python-pip noarch 9.0.3-15.el8                        BaseOS    1.8 M
 platform-python-setuptools
                     noarch 39.2.0-5.el8                        BaseOS    632 k
依存関係をインストール中:
 python3-pip         noarch 9.0.3-15.el8                        AppStream  19 k
 python3-setuptools  noarch 39.2.0-5.el8                        BaseOS    162 k
Enabling module streams:
 python36                   3.6

トランザクションの概要
================================================================================
インストール    3 パッケージ
アップグレード  2 パッケージ

ダウンロードサイズの合計: 2.6 M
パッケージのダウンロード中です:
(1/5): python3-setuptools-39.2.0-5.el8.noarch.r 6.1 MB/s | 162 kB     00:00
(2/5): platform-python-pip-9.0.3-15.el8.noarch.  23 MB/s | 1.8 MB     00:00
(3/5): platform-python-setuptools-39.2.0-5.el8.  14 MB/s | 632 kB     00:00
(4/5): python36-3.6.8-2.module_el8.1.0+245+c39a 120 kB/s |  19 kB     00:00
(5/5): python3-pip-9.0.3-15.el8.noarch.rpm      121 kB/s |  19 kB     00:00
--------------------------------------------------------------------------------
合計                                            1.3 MB/s | 2.6 MB     00:02
警告: /var/cache/dnf/AppStream-a520ed22b0a8a736/packages/python3-pip-9.0.3-15.el8.noarch.rpm: ヘッダー V3 RSA/SHA256 Signature、鍵 ID 8483c65d: NOKEY
CentOS-8 - AppStream                            1.2 MB/s | 1.6 kB     00:00
GPG 鍵 0x8483C65D をインポート中:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
鍵のインポートに成功しました
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                        1/1
  Upgrading        : platform-python-setuptools-39.2.0-5.el8.noarch         1/7
  Installing       : python3-setuptools-39.2.0-5.el8.noarch                 2/7
  Upgrading        : platform-python-pip-9.0.3-15.el8.noarch                3/7
  Installing       : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64    4/7
  scriptletの実行中: python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64    4/7
  Installing       : python3-pip-9.0.3-15.el8.noarch                        5/7
  整理             : platform-python-pip-9.0.3-13.el8.noarch                6/7
  整理             : platform-python-setuptools-39.2.0-4.el8.noarch         7/7
  scriptletの実行中: platform-python-setuptools-39.2.0-4.el8.noarch         7/7
  検証             : python3-pip-9.0.3-15.el8.noarch                        1/7
  検証             : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64    2/7
  検証             : python3-setuptools-39.2.0-5.el8.noarch                 3/7
  検証             : platform-python-pip-9.0.3-15.el8.noarch                4/7
  検証             : platform-python-pip-9.0.3-13.el8.noarch                5/7
  検証             : platform-python-setuptools-39.2.0-5.el8.noarch         6/7
  検証             : platform-python-setuptools-39.2.0-4.el8.noarch         7/7

アップグレード済み:
  platform-python-pip-9.0.3-15.el8.noarch
  platform-python-setuptools-39.2.0-5.el8.noarch

インストール済み:
  python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64
  python3-pip-9.0.3-15.el8.noarch
  python3-setuptools-39.2.0-5.el8.noarch

完了しました!

無事インストール完了!気を取り直してインストーラーを実行してみる

[root@centos8 ~]# /media/installer/linux/install_ngt.py
/usr/bin/env: `python': そのようなファイルやディレクトリはありません

またかよ!
とりあえずバージョン確認コマンドで確認

[root@centos8 ~]# python -V
-bash: python: コマンドが見つかりません

やはり見つからない。
Python3とPython2共存環境の時に明示的にバージョン指定するので、同じ要領でコマンドを実行

[root@centos8 ~]# python3
Python 3.6.8 (default, May 21 2019, 23:51:36)
[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Use exit() or Ctrl-D (i.e. EOF) to exit
>>>
KeyboardInterrupt
>>>

案の定動いた。
シンボリック張ってもいいんですが、ここはお作法にならって「Alternatives」コマンドでデフォルトのバージョンを設定してあげる

[root@centos8 ~]# alternatives --set python /usr/bin/python3

再びバージョン確認コマンドを実行

[root@centos8 ~]# python -V
Python 3.6.8

正常に動いたので、気を取り直して再度インストールを実行

[root@centos8 ~]# /media/installer/linux/install_ngt.py
Using Linux Installer for centos linux linux distribution.
Setting up Nutanix Guest Tools - VM mobility drivers.
Successfully set up Nutanix Guest Tools - VM mobility drivers.
Installing Nutanix Guest Agent Service.
Successfully installed Nutanix Guest Agent Service.
Installing Nutanix Self Service Restore Service.
Successfully installed Nutanix Self Service Restore Service.
Waiting for Nutanix Guest Agent Service to start...
Waiting for Nutanix Self Service Restore Service to start...
Nutanix Guest Agent Service successfully started in the background.
Nutanix Self Service Restore Service successfully started in the background.

無事インストールが完了したので、ステータスを確認

[root@centos8 ~]# systemctl status ngt_guest_agent
● ngt_guest_agent.service - LSB: Starts, stops Nutanix Guest Agent.
   Loaded: loaded (/etc/rc.d/init.d/ngt_guest_agent; generated)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

動いてないのでスタートして確認

[root@centos8 ~]# systemctl start ngt_guest_agent

[root@centos8 ~]# systemctl status ngt_guest_agent
● ngt_guest_agent.service - LSB: Starts, stops Nutanix Guest Agent.
   Loaded: loaded (/etc/rc.d/init.d/ngt_guest_agent; generated)
   Active: active (exited) since Sat 2020-02-01 19:13:43 JST; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 34919 ExecStart=/etc/rc.d/init.d/ngt_guest_agent start (code=exited,>

 2月 01 19:13:43 ns2.cc9.ne.jp systemd[1]: Starting LSB: Starts, stops Nutanix >
 2月 01 19:13:43 ns2.cc9.ne.jp ngt_guest_agent[34919]: Nutanix Guest Agent is a>
 2月 01 19:13:43 ns2.cc9.ne.jp systemd[1]: Started LSB: Starts, stops Nutanix G>
...skipping...
● ngt_guest_agent.service - LSB: Starts, stops Nutanix Guest Agent.
   Loaded: loaded (/etc/rc.d/init.d/ngt_guest_agent; generated)
   Active: active (exited) since Sat 2020-02-01 19:13:43 JST; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 34919 ExecStart=/etc/rc.d/init.d/ngt_guest_agent start (code=exited,>

 2月 01 19:13:43 ns2.cc9.ne.jp systemd[1]: Starting LSB: Starts, stops Nutanix >
 2月 01 19:13:43 ns2.cc9.ne.jp ngt_guest_agent[34919]: Nutanix Guest Agent is a>
 2月 01 19:13:43 ns2.cc9.ne.jp systemd[1]: Started LSB: Starts, stops Nutanix G>

無事動いたので終了

2
1
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
2
1