NTNX>日記

個人的な趣味による Nutanix Community Edition 日記。Japanese のみですみません。

Nutanix Guest Tools を Oracle Linux 7 にインストール。

Nutanix Guest Tools(NGT)を、Oracle Linux 7 にインストールしてみました。

インストールしたゲスト OS の Oracle Linux は、UEK ではなくなんとなく Red Hat 互換カーネル(RHCK)です。

[root@ol72 ~]# cat /etc/oracle-release
Oracle Linux Server release 7.2
[root@ol72 ~]# uname -r
3.10.0-327.10.1.el7.x86_64 

NGT CD-ROM イメージの接続

最初に、Prism で NGT の ISO イメージをマウントしておきます。
インストール対象の VM を選択して、「Enable NGT」をクリックします。
f:id:gowatana:20160314233153p:plainNGT CD-ROM イメージマウント(VM への接続)の確認画面が出るので「Yes」。f:id:gowatana:20160314233248p:plain

ちなみに このあたりの UI は、2017年09月ごろで最新の Nutanix CE(ce-2017.07.20-stable)では「Manage Guest Tools」となっていて、下記のような画面になっていました。

f:id:gowatana:20170915234126p:plain

NGT のインストール

NGT をインストールしてみます。
まず、ゲスト OS でも ISO をマウントします。
[root@ol72 ~]# mount /dev/cdrom /media/
mount: /dev/sr0 is write-protected, mounting read-only
[root@ol72 ~]# ls /media/
autorun.ico  autorun.inf  config  installer  ngtcli  setup.exe
 
インストーラは Python スクリプトなので、
Oracle Linux 7 デフォルトの Python で、そのまま実行してみました。
しかし python-setuptools が必要なようです。
[root@ol72 ~]# python -V
Python 2.7.5
[root@ol72 ~]# /media/installer/linux/install_ngt.py
Using Linux Installer for oracle linux server linux distribution.
Unable to import python-setuptools that is needed by NGT Guest Agent.
Please install python-setuptools and retry installation.
 
python-setuptools をインストールしてみます。
[root@ol72 ~]# yum install -y python-setuptools
(省略)
Installed:
  python-setuptools.noarch 0:0.9.8-4.el7

Dependency Installed:
  python-backports.x86_64 0:1.0-8.el7
  python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7

Complete!
 
リトライしたところ、今度はインストール成功しました。
[root@ol72 ~]# /media/installer/linux/install_ngt.py
Using Linux Installer for oracle linux server 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.
Waiting for Nutanix Guest Agent Service to start.
Nutanix Guest Agent Service successfully started in the background.

ngt_guest_agent サービス起動

インストールしただけではサービス起動しなかったので、手動起動しました。
ちなみに、2017年09月ごろで最新の Nutanix CE(ce-2017.07.20-stable)では、サービスは自動起動していました。
[root@ol72 ~]# 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)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
手動起動してみました。
[root@ol72 ~]# systemctl start ngt_guest_agent
起動できました。

f:id:gowatana:20160314234616p:plain

 
Systemd の サービス設定はこうなっています。
[root@ol72 ~]# systemctl cat ngt_guest_agent.service
# /run/systemd/generator.late/ngt_guest_agent.service
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/ngt_guest_agent
Description=LSB: Starts, stops Nutanix Guest Agent.
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target
After=network-online.target
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/rc.d/init.d/ngt_guest_agent start
ExecStop=/etc/rc.d/init.d/ngt_guest_agent stop
以上。
©2023 gowatana
クリエイティブ・コモンズ・ライセンスこの 作品 は クリエイティブ・コモンズ 表示 4.0 国際 ライセンスの下に提供されています。