Quantcast
Channel: OSAKANA TAROのメモ帳
Viewing all 1101 articles
Browse latest View live

CentOS 7 / Oracle Linux 7でWordPressサーバを建てる

$
0
0

この間、Oracle Linux 7ベースのOracle Autonomouse Linux 環境にWordPressサーバを建てる手順を書いたけど、そういえばベースとなるCent OS 7(Oracle Linux 7)環境でWordpressサーバを建てる手順を書いたことなかったな、と書いてみる。

前準備

CentOS7として基本的な設定を行っていく。

準備1:パッケージのアップデート

インストール済みのパッケージを最新にするため「yum update」を実行する

$ sudo yum update -y

準備2:日本時間にする

日本に住んでいる場合、日本時間表記の方が使いやすいので、OSも日本時間表示に設定する。

$ sudo timedatectl set-timezone Japan

変更されたことを確認するには「timedatectl」を実行する。

$ timedatectl
      Local time: Tue 2020-07-07 10:04:40 JST
  Universal time: Tue 2020-07-07 01:04:40 UTC
        RTC time: Tue 2020-07-07 01:04:38
       Time zone: Japan (JST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
$

準備3:パッケージの自動アップデート設定をする

方針にもよりますが、最近は死ぬパッケージが配布されることは少ないので、自動アップデートしてしまえ、と、yum-cronによる自動アップデート設定を入れています。

まず、yum-cron パッケージをインストールします。

$ sudo yum install yum-cron

次に /etc/yum/yum-cron.conf を編集して自動アップデートを有効にします。

$ sudo vi /etc/yum/yum-cron.conf

ファイル内にある「apply_updates = no」を「apply_updates = yes」に変更します。

変更後の該当部分は以下の様になります。

# Whether updates should be applied when they are available.  Note
# that download_updates must also be yes for the update to be applied.
apply_updates = yes

準備4:EPELレポジトリの追加

EPELレポジトリが必要になるので追加します。

$ sudo yum install epel-release

注:RHEL 7の場合は epelパッケージをダウンロードしてインストールします。

インターネット公開用準備

インターネット公開にあたりやっておいた方が良いことです。

fail2ban導入

公開サーバには各種アタックが頻繁にやってきます。管理用sshポートにも行われ無駄にCPU資源とトラフィックを食われます。

多少なりとも低減した方がいいので、fail2banというEPELレポジトリに含まれるソフトウェアを導入します。

fail2banは、ログイン失敗ログなどを監視し、一定数を超えたら該当するIPアドレスからのアクセスを一定期間受け付けなくする仕組みです。

$  sudo yum install fail2ban

fail2banの設定は /etc/fail2ban/ にあり、fail2ban.confやjail.confなどがあります。

しかし、ユーザ側で設定を追加修正したい場合はこれらのファイルを直接編集するのではなく、 /etc/fail2ban/jail.local というファイルを作成してそこに行っていきます。

$ sudo vi /etc/fail2ban/jail.local

/etc/fail2ban/jail.localには下記の様な内容を記載します。

[DEFAULT]
# 86400秒=24時間以内に5回不審なアクセスがあったら24時間BAN
bantime  = 86400
findtime  = 86400
maxretry = 5
# 259200秒=3日以内に5回不審なアクセスがあったら3日間BAN
#bantime  = 259200
#findtime  = 259200
#maxretry = 5

# 除外IP
ignoreip = 127.0.0.1 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 <既知>の固定IPがあれば追加>

[sshd]
enabled = true
banaction = firewallcmd-ipset

bantime/findtimeは2種類書いてありますが、まずは24時間で設定して、管理アクセス等に問題がないことを確認したら3日に変更するなどしてください。

設定が終わったらfail2banサービスを起動するための設定を入れていきます。

まず、初期状態は起動しない設定であるためenableに変更します。

$ systemctl list-unit-files|grep fail
fail2ban.service                              disabled
$ sudo systemctl enable fail2ban.service
Created symlink from /etc/systemd/system/multi-user.target.wants/fail2ban.service to /usr/lib/systemd/system/fail2ban.service.
$ systemctl list-unit-files|grep fail
fail2ban.service                              enabled
$

次にfail2banを起動します。

$ systemctl status fail2ban.service
● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:fail2ban(1)
$ sudo systemctl start fail2ban.service
$ systemctl status fail2ban.service
● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-07-07 10:23:36 JST; 2s ago
     Docs: man:fail2ban(1)
  Process: 2099 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
 Main PID: 2100 (f2b/server)
   CGroup: /system.slice/fail2ban.service
           mq2100 /usr/bin/python -s /usr/bin/fail2ban-server -xf start

Jul 07 10:23:36 phoenix-websa-jp systemd[1]: Starting Fail2Ban Service...
Jul 07 10:23:36 phoenix-websa-jp systemd[1]: Started Fail2Ban Service.
Jul 07 10:23:37 phoenix-websa-jp fail2ban-server[2100]: Server ready

動作確認を行います。

わざとパスワードを間違えるなどして /var/log/fail2ban.log にログが出力されることを確認します。

Webサーバ用ポート公開設定

標準ではdhcpv6-clientとsshのポートしか公開されていないため、Webサーバを建てても外部からアクセスできません。

http(ポート80)とhttps(ポート443)を公開する設定を行います。

まず現状を確認します。

$ sudo firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens3
  sources:
  services: dhcpv6-client ssh
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
$ 

httpとhttpsの公開設定を入れます。

$ sudo firewall-cmd --permanent --zone=public --add-service=http
success
$ sudo firewall-cmd --permanent --zone=public --add-service=https
success
$

reloadを行って設定を反映します。

$ sudo firewall-cmd --reload
success
$ sudo firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens3
  sources:
  services: dhcpv6-client http https ssh
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
$

php 7.4追加編

Oralce Linux 7だと簡単に追加できたりするPHP Packages for Oracle Linuxを利用する。

/etc/yum.repos.d/oracle-php.repo というファイルを作って下記を記載する。(sudo vi /etc/yum.repos.d/oracle-php.repo )

[ol7_developer_php74]
name=Oracle Linux $releasever PHP 7.4 Packages for Development and test ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/developer/php74/$basearch/
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=0
enabled=1

phpをインストールします。あとでWordpressから要求されるパッケージもあるのでいろいろインストールします。(php-pecl-imagick と php-mbstring はパッケージの依存の問題でインストール不可だった )

$ sudo yum install php php-json php-bcmath php-pear-Net-Curl php-gd
<略>
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch   Version               Repository           Size
================================================================================
Installing:
 php                     x86_64 7.4.7-1.0.1.el7       ol7_developer_php74 3.4 M
 php-bcmath              x86_64 7.4.7-1.0.1.el7       ol7_developer_php74  56 k
 php-gd                  x86_64 7.4.7-1.0.1.el7       ol7_developer_php74  72 k
 php-json                x86_64 7.4.7-1.0.1.el7       ol7_developer_php74  58 k
 php-pear-Net-Curl       noarch 1.2.5-10.el7          epel                 13 k
Installing for dependencies:
 apr                     x86_64 1.4.8-5.el7           base                103 k
 apr-util                x86_64 1.5.2-6.el7           base                 92 k
 dejavu-fonts-common     noarch 2.33-6.el7            base                 64 k
 dejavu-sans-fonts       noarch 2.33-6.el7            base                1.4 M
 fontconfig              x86_64 2.13.0-4.3.el7        base                254 k
 fontpackages-filesystem noarch 1.44-8.el7            base                9.9 k
 gd-last                 x86_64 2.1.1-2.el7           ol7_developer_php74 140 k
 httpd                   x86_64 2.4.6-93.el7.centos   base                2.7 M
 httpd-tools             x86_64 2.4.6-93.el7.centos   base                 92 k
 jbigkit-libs            x86_64 2.0-11.el7            base                 46 k
 libX11                  x86_64 1.6.7-2.el7           base                607 k
 libX11-common           noarch 1.6.7-2.el7           base                164 k
 libXau                  x86_64 1.0.8-2.1.el7         base                 29 k
 libXpm                  x86_64 3.5.12-1.el7          base                 55 k
 libjpeg-turbo           x86_64 1.2.90-8.el7          base                135 k
 libtiff                 x86_64 4.0.3-32.el7          base                171 k
 libvpx                  x86_64 1.3.0-5.el7_0         base                498 k
 libxcb                  x86_64 1.13-1.el7            base                214 k
 libxslt                 x86_64 1.1.28-5.el7          base                242 k
 mailcap                 noarch 2.1.41-2.el7          base                 31 k
 php-cli                 x86_64 7.4.7-1.0.1.el7       ol7_developer_php74 5.1 M
 php-common              x86_64 7.4.7-1.0.1.el7       ol7_developer_php74 1.1 M
 php-pear                noarch 1:1.9.4-21.el7        base                357 k
 php-process             x86_64 7.4.7-1.0.1.el7       ol7_developer_php74  76 k
 php-xml                 x86_64 7.4.7-1.0.1.el7       ol7_developer_php74 185 k

Transaction Summary
================================================================================
Install  5 Packages (+25 Dependent packages)

Total download size: 17 M
Installed size: 68 M
Is this ok [y/d/N]: y
<略>
$

この操作によりWebサーバもインストールされている。

MariaDB設定編

CentOS7ではmariadb 5.5.65が用意されている。しかし、このバージョンはWordPress推奨ではないため、最新版のMariaDBをMariaDB Foundationから入手しインストールする。

「/etc/yum.repos.d/mariadb.repo」というファイルを作り、以下の内容を入力。(sudo vi /etc/yum.repos.d/mariadb.repo)

# MariaDB 10.5 CentOS repository list - created 2020-07-07 02:24 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

そして、mariadb-serverをインストールします。

$ sudo yum install MariaDB-server MariaDB-client
<略>
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                    Arch      Version                  Repository  Size
================================================================================
Installing:
 MariaDB-client             x86_64    10.5.4-1.el7.centos      mariadb     13 M
 MariaDB-compat             x86_64    10.5.4-1.el7.centos      mariadb    2.2 M
     replacing  mariadb-libs.x86_64 1:5.5.65-1.el7
 MariaDB-server             x86_64    10.5.4-1.el7.centos      mariadb     26 M
Installing for dependencies:
 MariaDB-common             x86_64    10.5.4-1.el7.centos      mariadb     81 k
 boost-program-options      x86_64    1.53.0-28.el7            base       156 k
 galera-4                   x86_64    26.4.5-1.el7.centos      mariadb    9.5 M
 pcre2                      x86_64    10.23-2.el7              base       201 k
 perl-Compress-Raw-Bzip2    x86_64    2.061-3.el7              base        32 k
 perl-Compress-Raw-Zlib     x86_64    1:2.061-4.el7            base        57 k
 perl-DBI                   x86_64    1.627-4.el7              base       802 k
 perl-Data-Dumper           x86_64    2.145-3.el7              base        47 k
 perl-IO-Compress           noarch    2.061-2.el7              base       260 k
 perl-Net-Daemon            noarch    0.48-5.el7               base        51 k
 perl-PlRPC                 noarch    0.2020-14.el7            base        36 k
 socat                      x86_64    1.7.3.2-2.el7            base       290 k

Transaction Summary
================================================================================
Install  3 Packages (+12 Dependent packages)

Total download size: 52 M
Is this ok [y/d/N]: y
<略>
$

MariaDBサーバの自動起動を設定します。

$ systemctl list-unit-files|grep mariadb
mariadb.service                               disabled
mariadb@.service                              disabled
$ sudo systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
$ systemctl list-unit-files|grep mariadb
mariadb.service                               enabled
mariadb@.service                              disabled
$

MariaDBを起動します。

$ systemctl status mariadb.service
● mariadb.service - MariaDB 10.5.4 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           mqmigrated-from-my.cnf-settings.conf
   Active: inactive (dead)
     Docs: man:mariadbd(8)
           https://mariadb.com/kb/en/library/systemd/
$ sudo systemctl start mariadb.service
$ systemctl status mariadb.service
● mariadb.service - MariaDB 10.5.4 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           mqmigrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2020-07-07 11:30:10 JST; 1s ago
     Docs: man:mariadbd(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 32580 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 32554 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 32552 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 32565 (mariadbd)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           mq32565 /usr/sbin/mariadbd

Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: 2020-07-07 11:30:10 0 [Note...
Jul 07 11:30:10 phoenix-websa-jp mariadbd[32565]: Version: '10.5.4-MariaDB'  ...
Jul 07 11:30:10 phoenix-websa-jp systemd[1]: Started MariaDB 10.5.4 database....
Hint: Some lines were ellipsized, use -l to show in full.
$

最後にWordpress用データベースを作成します。

$ sudo mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.5.4-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database DB名 character set utf8;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all on DB名.* to wordpress@localhost identified by 'パスワード';
Query OK, 0 rows affected (0.002 sec)

MariaDB [(none)]> quit
Bye
$

Webサーバ SSL設定編

昨今のWebサーバはSSL化が必須です。

Let’s Encriptを利用したSSL化が使用しやすいですが、certbotだと仕組みが大がかりになってしまうので小回りが利くshellベースのdehydratedを使用します。

EPELレポジトリに含まれているため導入は簡単です。

$ sudo yum install dehydrated
<略>--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch            Version                Repository     Size
================================================================================
Installing:
 dehydrated          noarch          0.6.5-1.el7            epel           85 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 85 k
Installed size: 164 k
Is this ok [y/d/N]: y
<略>
$

dehydratedによるSSL証明書取得処理には /var/www/dehydrated が使用されるためディレクトリを作成します。

$ sudo mkdir  /var/www/dehydrated

http://~/.well-known/acme-challenge でアクセスした時に上記ディレクトリが開くようApacheの設定を /etc/httpd/conf.d/dehydrated.conf として作成します。(sudo vi /etc/httpd/conf.d/dehydrated.conf )

Alias /.well-known/acme-challenge /var/www/dehydrated
<Directory /var/www/dehydrated/>
</Directory>

Webサーバが自動起動するように設定します。

$ systemctl list-unit-files |grep http
httpd.service                                 disabled
$ sudo systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
$ systemctl list-unit-files |grep http
httpd.service                                 enabled
$

続いてWebサーバを起動します。

$ systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:httpd(8)
           man:apachectl(8)
$ sudo systemctl start httpd.service
$ systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-07-07 10:55:23 JST; 14s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 30854 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           tq30854 /usr/sbin/httpd -DFOREGROUND
           tq30855 /usr/sbin/httpd -DFOREGROUND
           tq30856 /usr/sbin/httpd -DFOREGROUND
           tq30857 /usr/sbin/httpd -DFOREGROUND
           tq30858 /usr/sbin/httpd -DFOREGROUND
           mq30859 /usr/sbin/httpd -DFOREGROUND

Jul 07 10:55:22 phoenix-websa-jp systemd[1]: Starting The Apache HTTP Server...
Jul 07 10:55:23 phoenix-websa-jp systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
$

SSL証明書を発行するホスト名を /etc/dehydrated/domains.txt に記載する。(sudo vi /etc/dehydrated/domains.txt)

1行に複数のホスト名を記載するとaliasになります。

登録作業を開始します。

$ sudo dehydrated --register
# INFO: Using main config file /etc/dehydrated/config
# INFO: Using additional config file /etc/dehydrated/conf.d/local.sh

To use dehydrated with this certificate authority you have to agree to their terms of service which you can find here: https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf

To accept these terms of service run `/bin/dehydrated --register --accept-terms`.
$
$ sudo dehydrated --register --accept-terms
# INFO: Using main config file /etc/dehydrated/config
# INFO: Using additional config file /etc/dehydrated/conf.d/local.sh
+ Generating account key...
+ Registering account key with ACME server...
+ Fetching account ID...
+ Done!
$

初回のSSL証明書発行処理を実行します。

$ sudo dehydrated --cron
# INFO: Using main config file /etc/dehydrated/config
# INFO: Using additional config file /etc/dehydrated/conf.d/local.sh
 + Creating chain cache directory /etc/dehydrated/chains
Processing phoenix.websa.jp
 + Creating new directory /etc/dehydrated/certs/phoenix.websa.jp ...
 + Signing domains...
 + Generating private key...
 + Generating signing request...
 + Requesting new certificate order from CA...
 + Received 1 authorizations URLs from the CA
 + Handling authorization for phoenix.websa.jp
 + 1 pending challenge(s)
 + Deploying challenge tokens...
 + Responding to challenge for phoenix.websa.jp authorization...
 + Challenge is valid!
 + Cleaning challenge tokens...
 + Requesting certificate...
 + Checking certificate...
 + Done!
 + Creating fullchain.pem...
 + Done!
$

/etc/dehydrated/certs/ にdomais.txtの各行の一番最初に書いたホスト名のディレクトリが作られており、その中に証明書が配置されています。

$ sudo ls -l /etc/dehydrated/certs/
total 0
drwx------. 2 root root 239 Jul  7 11:04 phoenix.websa.jp
$ sudo ls -l /etc/dehydrated/certs/phoenix.websa.jp/
total 20
-rw-------. 1 root root 1655 Jul  7 11:04 cert-1594087457.csr
-rw-------. 1 root root 2256 Jul  7 11:04 cert-1594087457.pem
lrwxrwxrwx. 1 root root   19 Jul  7 11:04 cert.csr -> cert-1594087457.csr
lrwxrwxrwx. 1 root root   19 Jul  7 11:04 cert.pem -> cert-1594087457.pem
-rw-------. 1 root root 1648 Jul  7 11:04 chain-1594087457.pem
lrwxrwxrwx. 1 root root   20 Jul  7 11:04 chain.pem -> chain-1594087457.pem
-rw-------. 1 root root 3904 Jul  7 11:04 fullchain-1594087457.pem
lrwxrwxrwx. 1 root root   24 Jul  7 11:04 fullchain.pem -> fullchain-1594087457.pem
-rw-------. 1 root root 3243 Jul  7 11:04 privkey-1594087457.pem
lrwxrwxrwx. 1 root root   22 Jul  7 11:04 privkey.pem -> privkey-1594087457.pem
$

なお、Let’s EncryptのSSL証明書は有効期限90日ですが、 /etc/cron.d/dehydrated に更新処理が設定されています。

Apacheに対する設定変更

phpインストール時に導入されたのはhttpのみで、httpsアクセスに関連するモジュール(mod_ssl)はインストールされていません。

$ sudo yum install mod_ssl
<略>
$

mod_sslによりSSL設定ファイルが /etc/httpd/conf.d/ssl.conf に配置されます。

しかし今どきじゃないようなので、ApacheのSSL対応設定をMozilla SSL Configuration Generatorベースの設定をssl-mozilla.confとして記載します。

$ sudo vi /etc/httpd/conf.d/ssl-mozilla.conf 

記載する内容は下記の様になる。

# generated 2020-07-07, Mozilla Guideline v5.4, Apache 2.4.6, OpenSSL 1.0.2k, intermediate configuration, no OCSP
# https://ssl-config.mozilla.org/#server=apache&amp;version=2.4.6&amp;config=intermediate&amp;openssl=1.0.2k&amp;ocsp=false&amp;guideline=5.4

# this configuration requires mod_ssl, mod_rewrite, and mod_headers
<VirtualHost *:80>
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile      /etc/dehydrated/certs/<ホスト名>/cert.pem
    SSLCertificateChainFile /etc/dehydrated/certs/<ホスト名>/chain.pem
    SSLCertificateKeyFile   /etc/dehydrated/certs/<ホスト名>/privkey.pem

    # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
    Header always set Strict-Transport-Security "max-age=63072000"
</VirtualHost>

# intermediate configuration
SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder     off

変更後、Webサービスを再起動する。

$ sudo systemctl restart httpd
$

WordPress導入

EPELレポジトリにWordPressパッケージがありますがバージョンが5.1.6と古く、また、WordPress管理画面からのアップデートとのバッティング問題がありますので、パッケージは使用しません。

/var/www/htmlにwordpressのtar.gzを展開します。

$ cd /var/www/html
$ sudo wget https://wordpress.org/latest.tar.gz
$ ls
latest.tar.gz
$ sudo tar xfz latest.tar.gz
$ ls
latest.tar.gz  wordpress
$ sudo rm latest.tar.gz
$ ls -l
total 4
drwxr-xr-x. 5 nobody nfsnobody 4096 Jun 11 06:48 wordpress
$

WordPressディレクトリの所有者をWebサービスのユーザである「apache」に変更します。

$ ps -ef|grep http
root     32093     1  0 11:17 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32094 32093  0 11:17 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32095 32093  0 11:17 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32096 32093  0 11:17 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32097 32093  0 11:17 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32098 32093  0 11:17 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32103 32093  0 11:18 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   32113 32093  0 11:19 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
opc      32700  1911  0 11:38 pts/0    00:00:00 grep --color=auto http
$ sudo chown -R apache:apache wordpress
$ ls -l
total 4
drwxr-xr-x. 5 apache apache 4096 Jun 11 06:48 wordpress
$

/var/www/html/wordpress をDocumentRootとするように ssl-mozilla.conf に追加する。

# generated 2020-07-07, Mozilla Guideline v5.4, Apache 2.4.6, OpenSSL 1.0.2k, intermediate configuration, no OCSP
# https://ssl-config.mozilla.org/#server=apache&amp;version=2.4.6&amp;config=intermediate&amp;openssl=1.0.2k&amp;ocsp=false&amp;guideline=5.4

# this configuration requires mod_ssl, mod_rewrite, and mod_headers
<VirtualHost *:80>
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/wordpress
    SSLEngine on
    SSLCertificateFile      /etc/dehydrated/certs/<ホスト名>/cert.pem
    SSLCertificateChainFile /etc/dehydrated/certs/<ホスト名>/chain.pem
    SSLCertificateKeyFile   /etc/dehydrated/certs/<ホスト名>/privkey.pem

    # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
    Header always set Strict-Transport-Security "max-age=63072000"
</VirtualHost>

# intermediate configuration
SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder     off

設定後、Webサーバを再起動する

$ systemctl restart httpd
$

https://~/ にアクセスしてみると・・・

phpからmariadbにアクセスするためのパッケージが抜けていました。

$ sudo yum install php-mysql
<略>
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch       Version               Repository               Size
================================================================================
Installing:
 php-mysqlnd     x86_64     7.4.7-1.0.1.el7       ol7_developer_php74     228 k
Installing for dependencies:
 php-pdo         x86_64     7.4.7-1.0.1.el7       ol7_developer_php74     121 k

Transaction Summary
================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 349 k
Installed size: 1.2 M
Is this ok [y/d/N]: y
<略>
$

php関連のパッケージを変更した場合は、httpdを再起動します。

$ sudo systemctl restart httpd
$

無事にWordpress初期画面が確認出来ました。

途中、wp-config.php に書き込めないと出ますので、「sudo vi /var/www/html/wordpress/wp-config.php」を実行し、指定された内容を記載します。

$ sudo vi /var/www/html/wordpress/wp-config.php

以上で完了です。


VCSAへのパッチ適用

$
0
0

vSphereのvCenter仮想マシン(VCSA)へのパッチ適用方法について、よく忘れるのでメモ

公式ドキュメント
 vSphere 6.7「アプライアンス管理インターフェイスを使用した vCenter Server Appliance へのパッチ適用
 vSphere 7.0「vCenter Server 管理インターフェイスを使用した vCenter Server へのパッチ適用

どちらもほぼ同じ

(1) VCSAのパッチをmy vmwareから入手
(2) VCSA仮想マシンの仮想CD-ROMに、VCSAパッチのISOをマウント
(2) Webブラウザで https://<VCSA>:5480」にアクセス
(3) rootでログイン
(4) [更新]タブを開き、[更新の確認]-[CD ROMの確認]を選択

vSphere ESXiでNetApp ONTAP9のNFS4.1を使う

$
0
0

NetApp ONTAP 9.7環境にてNFS4.1を有効にして、vSphere ESXi 6.7のNFSデータストアにしてみた。

NetApp ONTAP9側

NFS 4.1有効化

ONTAP 9.7管理画面でNFSを有効にした場合、NFS v3.0のみが有効化されている。

プロトコルの「NFS」から編集を選ぶと以下の様に設定変更ができる。

とりあえず「バージョン4のサポートを有効にする」と「バージョン4.1のサポートを有効にする」にチェックを入れると下記のようになる。

「pNFS」にもチェックが入っている状態になるが、このまま設定する。

設定後のプロトコル表示は下記の様になる。

通常のNFSと同じくエクスポートルールの設定などはちゃんと行うこと。

ONTAPでNFS経由のVAAIを許可するエクスポート ポリシーの設定

NFS vStorage Support有効化

NetAppのStorage VM(SVM)に対してNFS vStorage Support(VAAI連携)を有効化する。

現在値の確認は「vserver nfs show -ins」で「NFS vStorage Support」の値を確認する。

ontap-select-cluster::> vserver nfs show -ins

                                        Vserver: svm0
                             General NFS Access: true
                                         NFS v3: enabled
                                       NFS v4.0: enabled
                                   UDP Protocol: enabled
                                   TCP Protocol: enabled
                           Default Windows User: -
                            NFSv4.0 ACL Support: disabled
                NFSv4.0 Read Delegation Support: disabled
               NFSv4.0 Write Delegation Support: disabled
                        NFSv4 ID Mapping Domain: defaultv4iddomain.com
            NFSv4 Grace Timeout Value (in secs): 45
Preserves and Modifies NFSv4 ACL (and NTFS File Permissions in Unified Security Style): enabled
                  NFSv4.1 Minor Version Support: enabled
                                  Rquota Enable: disabled
                   NFSv4.1 Parallel NFS Support: enabled
                            NFSv4.1 ACL Support: disabled
                           NFS vStorage Support: disabled
            NFSv4 Support for Numeric Owner IDs: enabled
                          Default Windows Group: -
                NFSv4.1 Read Delegation Support: disabled
               NFSv4.1 Write Delegation Support: disabled
                            NFS Mount Root Only: enabled
                                  NFS Root Only: disabled
            Permitted Kerberos Encryption Types: des, des3, aes-128, aes-256
                              Showmount Enabled: enabled
Set the Protocol Used for Name Services Lookups for Exports: udp
                    NFSv3 MS-DOS Client Support: disabled
     Idle Connection Timeout Value (in seconds): 360
             Are Idle NFS Connections Supported: disabled
Hide Snapshot Directory under NFSv3 Mount Point: disabled
           Provide Root Path as Showmount State: disabled

ontap-select-cluster::> 

vStorage Supportの項目だけ確認する場合は「vserver nfs show -fields vstorage」でも良い。

ontap-select-cluster::> vserver nfs show -fields vstorage
vserver vstorage
------- --------
svm0    disabled

ontap-select-cluster::>

有効にする場合は「vserver nfs modify -vserver SVM名 -vstorage enabled」を実行する。

ontap-select-cluster::> vserver nfs modify -vserver svm0 -vstorage enabled

ontap-select-cluster::> vserver nfs show

変更後は以下のような出力結果となる。

ontap-select-cluster::> vserver nfs show -ins

                                        Vserver: svm0
                             General NFS Access: true
                                         NFS v3: enabled
                                       NFS v4.0: enabled
                                   UDP Protocol: enabled
                                   TCP Protocol: enabled
                           Default Windows User: -
                            NFSv4.0 ACL Support: disabled
                NFSv4.0 Read Delegation Support: disabled
               NFSv4.0 Write Delegation Support: disabled
                        NFSv4 ID Mapping Domain: defaultv4iddomain.com
            NFSv4 Grace Timeout Value (in secs): 45
Preserves and Modifies NFSv4 ACL (and NTFS File Permissions in Unified Security Style): enabled
                  NFSv4.1 Minor Version Support: enabled
                                  Rquota Enable: disabled
                   NFSv4.1 Parallel NFS Support: enabled
                            NFSv4.1 ACL Support: disabled
                           NFS vStorage Support: enabled
            NFSv4 Support for Numeric Owner IDs: enabled
                          Default Windows Group: -
                NFSv4.1 Read Delegation Support: disabled
               NFSv4.1 Write Delegation Support: disabled
                            NFS Mount Root Only: enabled
                                  NFS Root Only: disabled
            Permitted Kerberos Encryption Types: des, des3, aes-128, aes-256
                              Showmount Enabled: enabled
Set the Protocol Used for Name Services Lookups for Exports: udp
                    NFSv3 MS-DOS Client Support: disabled
     Idle Connection Timeout Value (in seconds): 360
             Are Idle NFS Connections Supported: disabled
Hide Snapshot Directory under NFSv3 Mount Point: disabled
           Provide Root Path as Showmount State: disabled

ontap-select-cluster::> vserver nfs show -fields vstorage
vserver vstorage
------- --------
svm0    enabled

ontap-select-cluster::>

vSphere側

データストアの追加から「NFS」の「NFS 4.1」を追加する

VAAIプラグインを追加

ESXiに「NetApp NFS Plug-in for VMware VAAI」をインストールすることで、VAAI機能が有効になる。

すでにNFSマウントされているデータストアがVAAIでアクセスされているか確認するにはESXi shellでコマンドを実行する。

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol        true     true      false  AUTH_SYS  false  Not Supported
[root@esxiserver:~]

「Hardware Acceleration」が「Not Supported」となっている場合、VAAIが有効な状態ではない。

また「vmkfstools -Ph /vmfs/volumes/<データストア名>」を実行した結果内の「NAS VAAI Supported」でも確認できる。

[root@esxiserver:~] vmkfstools -Ph /vmfs/volumes/nfsv4test
NFS41-4.01 (Raw Major Version: 0) file system spanning 1 partitions.
File system label (if any): nfsv4test
Mode: public
Capacity 50 GB, 48.0 GB available, file block size 4 KB, max supported file size 16.0 TB
Disk Block Size: 512/512/0
UUID: a135f63e-34806068-0000-000000000000
Partitions spanned (on "notDCS"):
        NFS41:a135f63e-34806068-0000-000000000000
NAS VAAI Supported: NO
Is Native Snapshot Capable: NO
[root@esxiserver:~]

ESXi shellからVAAIプラグインをインストールする。

[root@esxiserver:~] esxcli software vib install -d /vmfs/volumes/software/netapp
/nfs_plugin_VAAI/1.1.2/NetAppNasPlugin.v23.zip
Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: NetApp_bootbank_NetAppNasPlugin_1.1.2-3
   VIBs Removed:
   VIBs Skipped:
[root@esxiserver:~]

「Reboot Required: true」と再起動が要求されたので、ESXiを再起動します。

再起動後、「esxcli storage nfs41 list」で確認すると「Hardware Acceleration Supported」。

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol        true     true      false  AUTH_SYS  false  Supported
[root@esxiserver:~]

「vmkfstools -Ph /vmfs/volumes/<データストア名>」は「NAS VAAI Supported: YES」に変わります。

[root@esxiserver:~] vmkfstools -Ph /vmfs/volumes/nfsv4test
NFS41-4.01 (Raw Major Version: 0) file system spanning 1 partitions.
File system label (if any): nfsv4test
Mode: public
Capacity 50 GB, 48.0 GB available, file block size 4 KB, max supported file size 16.0 TB
Disk Block Size: 512/512/0
UUID: a135f63e-34806068-0000-000000000000
Partitions spanned (on "notDCS"):
        NFS41:a135f63e-34806068-0000-000000000000
NAS VAAI Supported: YES
Is Native Snapshot Capable: YES
[root@esxiserver:~]

vSphere ESXiで切断されたNFSに再接続する

$
0
0

NFSサーバが起動する前にESXiが起動してしまった場合、NFSが切断状態となる。

FCやiSCSIであれば勝手に再接続とかしてくれるが、NFSだと切れたままになる。

VMware KB「切断された NFS データストアの ESXi/ESX コマンド ラインからの再マウント (1005057)

一度NFSマウントの設定を削除して再設定する必要がある、とのこと。

VMware KBには「esxcli storage nfs list」といったコマンドが書かれているが、これはNFS v3.0向けのコマンドで、NFS v4.1については「esxcli storage nfs41 list」というようにコマンドを実行する必要があった。(以下、esxcli nfs41として記載しているが、NFS v3の場合はesxcli nfsで実行する)

まず、現在の設定を確認するため「esxcli storage nfs41 list」を実行

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol       false    false      false  AUTH_SYS  false  Unknown
[root@esxiserver:~] 

エントリを削除するため「esxcli storage nfs41 remove –volume-name=nfsv4test」を実行

[root@esxiserver:~] esxcli storage nfs41 remove --volume-name=nfsv4test
[root@esxiserver:~] esxcli storage nfs41 list
[root@esxiserver:~] 

listで表示された内容をベースに「esxcli storage nfs41 add –volume-name=~ –hosts=~ –share=~ –sec=~」というように登録コマンドを実行する。

[root@esxiserver:~] esxcli storage nfs41 add --volume-name=nfsv4test --hosts=172
.17.44.108 --share=/testvol --sec=AUTH_SYS
[root@esxiserver:~] 

登録されたことを確認

[root@esxiserver:~] esxcli storage nfs41 list
Volume Name  Host(s)        Share     Accessible  Mounted  Read-Only  Security   isPE  Hardware Acceleration
-----------  -------------  --------  ----------  -------  ---------  --------  -----  ---------------------
nfsv4test    172.17.44.108  /testvol        true     true      false  AUTH_SYS  false  Supported
[root@esxiserver:~]

NetVault 用firewall設定 for RHEL/Windows

$
0
0

NetVaultサーバをRHEL上にたてて、クライアントにNetAppとRHELとWindows Serverがいる場合のファイアウォール設定サンプル。

必要なポートについては「NetVault 12.0管理ガイド ファイアウォールの設定の例」より流用。

NetVaultサーバ/クライアント間の基本的な通信はネットワークマネージャによりポート20031のTCP/UDPで行われる。
またクライアント上でコミュニケーションマネージャがポート20032 TCPを使用する。

また、NDMPバックアップの場合、NetVaultサーバ側でポート10000 TCPと40000 TCPを使用する。

設定はOS側のfirewall設定と、NetVault側のファイアウォール設定の2つを行う。

NetVault側ファイアウォール設定

NetVaultサーバ側は以下のように設定する。設定したあとはサービス再起動が必須。

デバイス待ち受けポート50100-50199
デバイス接続ポート50200-50299
メッセージ チャンネルの待ち受けポート50300-50399
メッセージ チャンネルの接続ポート50400-50499
NDMPコントロール チャンネルの接続ポート10000
NetVault NDMPデータ チャンネルの待ち受けポート40000
NetVaultマシン間の内部的な通信に使用するポート50500-50599

クライアント側はNDMP関連設定がなくでも良い。設定したあとはサービス再起動が必須。

デバイス待ち受けポート50100-50199
デバイス接続ポート50200-50299
メッセージ チャンネルの待ち受けポート50300-50399
メッセージ チャンネルの接続ポート50400-50499
NDMPコントロール チャンネルの接続ポート
NetVault NDMPデータ チャンネルの待ち受けポート
NetVaultマシン間の内部的な通信に使用するポート50500-50599

クライアント側のfirewallが動いている場合、NetVaultサーバからの設定変更を受け付けることができない。この場合は、NetVaultクライアント側で「txtconfig」コマンドを実行して設定を変更する。

実行すると以下のような画面が表示される。

「p」と入力すると、2枚目のメニューが表示される。この中の「19. ファイアウォール」を変更するため「19」と入力する。

上から順に設定を変更していく。

最後は「s」を入力し、変更を保存して終了する。(qだと設定を反映しない)

OS側firewall設定

サーバ側として以下を開ける
 ・8443 TCP (管理画面)
 ・10000 TCP (NDMP)
 ・40000 TCP (NDP)
 ・20031-20032 TCP
 ・20031 UDP
 ・50100-50599 TCP

クライアント側は管理画面用の8443と、NDMP用の10000と40000の設定を抜く。

CentOS7の場合以下とした

# firewall-cmd --permanent --zone=public --add-port=8443/tcp
# firewall-cmd --permanent --zone=public --add-port=10000/tcp
# firewall-cmd --permanent --zone=public --add-port=40000/tcp
# firewall-cmd --permanent --zone=public --add-port=20031-20032/tcp
# firewall-cmd --permanent --zone=public --add-port=20031/udp
# firewall-cmd --permanent --zone=public --add-port=50100-50599/tcp
# firewall-cmd --reload

Windowsクライアントの場合以下とした。

netsh advfirewall firewall add rule name=”NVBU TCP in ports” dir=in protocol=tcp localport=20031-20032 action=allow
netsh advfirewall firewall add rule name=”NVBU TCP in ports” dir=in protocol=tcp localport=50100-50599 action=allow

netsh advfirewall firewall add rule name=”NVBU TCP out ports” dir=out protocol=tcp localport=20031-20032 action=allow
netsh advfirewall firewall add rule name=”NVBU TCP out ports” dir=out protocol=tcp localport=50100-50599 action=allow

netsh advfirewall firewall add rule name=”NVBU UDP in ports” dir=in protocol=udp localport=20031 action=allow
netsh advfirewall firewall add rule name=”NVBU UDP out ports” dir=out protocol=udp localport=20031 action=allow

HPE 5700 スイッチのコマンド

$
0
0

以前にHPE5700スイッチの設定をした際、「HPE 5700 スイッチの日付設定」という記事を書いた。

今回はもっといくつか設定が必要になったので、いろいろメモ書きとして残しておく。

参考にしたもの
HPEスイッチ(旧H3C)シリーズ 設定別コマンド早見表
HPEスイッチ 基本コマンド&初期設定例 ~VLAN/リンクアグリゲーション(LACP), ssh, snmp, ntp, syslog等の管理設定,debug~

基本

・特権モードに入る

「system」「system-view」(“sys”でもOK)

・設定の確認

現在の設定確認「display current-configuration」
保存されている設定確認「display saved-configuration」

なお、「display」はCisco風に「show」でも動く

・設定確認とかの際に「More」を表示させない

「screen-length disable」を非特権モードで実行する。

・設定したものを保存

「save」

・設定を入れたものを消すとき

「undo 各コマンド」(Ciscoの”no 各コマンド”に相当)

ポートの状態確認

「display interface brief」

「display link-aggregation summary」
「display link-aggregation port」
「display link-aggregation member-port」

スイッチの個体設定

・スイッチのホスト名設定

「sysname ホスト名」

・現在時刻表示

「show clock」

・タイムゾーン設定

「clock timezone Tokyo add 09:00:00」

・手動で時刻を設定する場合

まず特権モードで「clock protocol none」
次に非特権モードで「clock datetime 21:09:00 2020/07/26」

・NTP設定をする場合

「clock protocol ntp」でNTPプロトコルを指定したあと
「ntp-service unicast-server xxx.xxx.xx.xx」

NTPサーバが複数ある場合は、サーバ毎に「ntp-service unicast-server ~」を実行する。

また、NTP通信に使用するインタフェースを指定する場合は「ntp-service source M-GigabitEthernet 0/0/0」とか「ntp-service source Vlan-interface1」という形で指定する

NTPの動作状況は「show ntp-service sessions」と「show ntp-service status」

・管理用IPアドレス

HPE5710背面にある管理用(MGMT)インタフェース(MGE0/0/0)に管理用IPアドレスを割り当てる場合

interface M-GigabitEthernet0/0/0
ip address 172.17.44.227 255.255.0.0
no dhcp client identifier
<interface Vlanから抜けたあと>
ip route-static 0.0.0.0 0.0.0.0 172.17.0.1

Vlan-interface1に管理用IPアドレスを割り当てる場合

interface Vlan-interface1
ip address 172.17.44.1 255.255.0.0
<interface Vlanから抜けたあと>
ip route-static 0.0.0.0 0.0.0.0 172.17.0.1

・管理用ユーザ作成

「admin」というユーザをパスワード「password」で作成する場合

local-user admin
password simple password
authorization-attribute user-role network-admin
service-type ssh https

作成したローカルユーザの確認「display local-user」

・リモートログインへの権限割り当て

vtyの0~4にsshでログインする権限を与える。
なお、下記はuser-roleとしてnetwork-adminとnetwork-operatorの2つが書かれているが実際は「user-role network-admin」を追加するだけで、自動的にnetwork-operatorも追加された。

line vty 0 4
authentication-mode scheme
user-role network-admin
user-role network-operator
protocol inbound ssh
idle-timeout 30 5

・リモートログインの許可

ssh有効設定「ssh server enable」
状態確認「display ssh server status」

・Web管理画面有効化

httpsを有効にする場合「ip https enable」
現在の設定状況確認「display ip https」

VLAN関連

「display vlan brief」

Link-aggregation設定

Link-aggregation/Trunk/トランク/LACP/IEE 802.3ad設定について

VMware KB「ESXi/ESX および Cisco/HP スイッチによる EtherChannel/リンク集約コントロール プロトコル (LACP) のサンプル構成 (1004048)

HuaweiのCentOS派生 Euler OSとopenEuler

$
0
0

Huaweiの作ったIoT向けOS LiteOS (github)、Android代替OSのHarmonyOS(鴻蒙OS)について調べていたらHuaweiがx86_64/ARMサーバ向けにEuler OSというのを出していることを知った。

公式: EulerOS

EulerOS Introductionによれば「ARM64完全対応」「セキュリティ強化」「キャリアで採用されるレベルの安定性」「Linuxコンテナ推し」らしい

DownloadリンクHuawei Mirrorsリンクを見るとインストール用ISOが入手可能となっている。

で、このEuler OSのベースは何かな、と調べて見るとopenEulerが出てくる。ちゃんとHuaweiが日本での商標を確保しているようだ。

openEuler自体はCentOSをベースとしており、このopenEulerからさらに派生しているOSがあると

中国科学院软件研究所 EulixOS
まだ生きていた TurboLinux
普华软件 isoft-linux
HopeEDGE

さて、openEule自体は3月から、2年ごとのLTSバージョンと半年リリースバージョンの2種類で出るようになったらしい(openEuler community release rule and life cycle management)

いま出ているopenEuler 20.03 LTSは長期サポートバージョンということになる。

このバージョンはCentOS8をベースとしているが、CentOS8 20.04よりパッケージバージョンがちょっと古い、という構成になっていた。

そして、CentOS8と比べるとパッケージがいくつか存在していなかったりした。例えば、open-vm-toolsとかが入っていない。

デスクトップ系の利用は考慮されていないようで、パッケージグループのインストールを行おうとすると、パッケージがない、というエラーになるものが結構ある。(パッケージリストの精査が行われておらず、CentOSにはあるがopenEulerには存在しないパッケージを指定している)

インストールしてみよう

openEuler 20.03 LTSのISOで仮想マシンを起動してみる

画像

CentOS8の時とほぼ同じ感じです

画像

言語選択が「English」と「中文」しかない、というのが大きな違いですかね

画像

ソフトウェアの選択も大きく違いますね。

標準選択が「Minimal Install」となっていて、「Server」と「Virtualization Host」が選べるという形です。(ただ、インストール後、dnf groups install Serverを実行するとエラーになるという…)

CentOS8だと簡単なパスワードでも設定できたのですが、openEulerだと断固として拒否してきました。

起動するとkernel 4.19.90-2003.4.0.0036.oe1で動作していました。

また、驚くべき事に、何もレポジトリが登録されておらず、アップデートも何もできない状態だという…

画像

openEulerのマニュアル「Using the DNF to Manage Software Packages」に/etc/yum.repos.d/openEuler_aarch64.repo のサンプルがあったのでそれをマネしてx86_64用に書いてみる。「Installing the OS Release Package」にupdateレポジトリも載っていたので下記の様に書いてみた。

[root@openeuler ~]# cat /etc/yum.repos.d/openEuler_x86_64.repo
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
#generic-repos is licensed under the Mulan PSL v1.
#You can use this software according to the terms and conditions of the Mulan PSL v1.
#You may obtain a copy of Mulan PSL v1 at:
#    http://license.coscl.org.cn/MulanPSL
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v1 for more details.
[osrepo]
name=osrepo
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/RPM-GPG-KEY-openEuler

[update]
name=update
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/update/x86_64/
enabled=1
gpgcheck=0
[EPOL]
name=EPOL
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/EPOL/x86_64/
enabled=1
gpgcheck=0
[root@openeuler ~]#

これを設定することで「yum update -y」でパッケージアップデートが完了した。

なお、アップデート後はレポジトリファイルがちゃんと設定されて、以下のようになった。

[root@openeuler ~]# cat /etc/yum.repos.d/openEuler.repo
#generic-repos is licensed under the Mulan PSL v2.
#You can use this software according to the terms and conditions of the Mulan PSL v2.
#You may obtain a copy of Mulan PSL v2 at:
#    http://license.coscl.org.cn/MulanPSL2
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v2 for more details.

[OS]
name=OS
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler

[everything]
name=everything
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/everything/$basearch/RPM-GPG-KEY-openEuler

[EPOL]
name=EPOL
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/EPOL/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler

[debuginfo]
name=debuginfo
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/debuginfo/$basearch/RPM-GPG-KEY-openEuler


name=source
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/source/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/source/RPM-GPG-KEY-openEuler

[update]
name=update
baseurl=http://repo.openeuler.org/openEuler-20.03-LTS/update/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
[root@openeuler ~]#

上記のレポジトリファイル、注意が必要な点として「updateレポジトリが有効になっていない」というものがある。

「dnf config-manager –enable update」を実行して有効にする必要がある。

[root@openeuler ~]# dnf repolist --all
repo id                             repo name                           status
EPOL                                EPOL                                enabled
OS                                  OS                                  enabled
debuginfo                           debuginfo                           enabled
everything                          everything                          enabled
source                              source                              enabled
update                              update                              disabled
[root@openeuler ~]# dnf config-manager --enable update
[root@openeuler ~]# dnf repolist --all
repo id                             repo name                            status
EPOL                                EPOL                                 enabled
OS                                  OS                                   enabled
debuginfo                           debuginfo                            enabled
everything                          everything                           enabled
source                              source                               enabled
update                              update                               enabled
[root@openeuler ~]#

よく分からないのが「dnf group list」で表示されるグループを指定してインストールするとエラーになるという事象…(updateレポジトリを有効にしても発生)

画像

インストール時に「Server」を選択していた場合はちゃんとインストールできている。

どちらもレポジトリファイル自体は同じなのでよく分からない…それどころか、Serverでインストールされている環境で「dnf group install Server」を実行しても、同じパッケージが無い、と言われ、またインストールもされていない。という状態

現状、Minimal Install以外の選択肢は正常に動作していない恐れが…

とりあえず、ひとしきり見てみた感じではCentOS8でパッケージ構成がちょっと違うバージョンという雰囲気だった。

デスクトップ(X-Window)の利用はあまり考えられていないようで、パッケージがぼろぼろと足らないので注意。

Euler OS 2.0 SP5の場合

ソフトウェアの選択肢が異なっており、「Base System」「Developer Mode」「Cloud Server」「Server with GUI」となっていた。標準選択はBase System

パスワードの複雑性要求はopenEuler 20.03LTSと同じレベルでした。

再起動するとkernel 3.10.0-862.14.1.0.h209.eulerosv2r7で起動してきた。レポジトリの登録は無し

Euler OS公式のMirror Listを見ていくと「/mirrors_os2/euler/2.5/os/x86_64/」というのがあり、そこにはupdatesディレクトリとアップデートされたらしきパッケージもあるので、ここをレポジトリとして指定してみる。

# cat /etc/yum.repos.d/euleros.repo
[OS]
name=OS
baseurl=https://mirrors.huaweicloud.com/euler/2.5/os/$basearch/
enabled=1
gpgcheck=0

updateレポジトリ相当の内容は上記レポジトリに含まれている模様。

アップデート後のkernelは3.10.0-862.14.1.5.h442.eulerosv2r7 になった。

なお、何故かEuler OS 2.0 SP5の初期状態ではsshからのrootユーザログインが”パスワードが違う”というエラーでログインできなかった。アップデート後は正常にsshログインが可能となった。

[root@euleros ~]# df
Filesystem               1K-blocks    Used Available Use% Mounted on
/dev/mapper/euleros-root  36357632 1492596  32988456   5% /
devtmpfs                   3983580       0   3983580   0% /dev
tmpfs                      3996440       0   3996440   0% /dev/shm
tmpfs                      3996440    9048   3987392   1% /run
tmpfs                      3996440       0   3996440   0% /sys/fs/cgroup
/dev/sda2                   999320  157676    772832  17% /boot
/dev/sda1                   204580    8596    195984   5% /boot/efi
/dev/mapper/euleros-home  17745188   45080  16775644   1% /home
tmpfs                       799288       0    799288   0% /run/user/0
[root@euleros ~]# uname -a
Linux euleros 3.10.0-862.14.1.5.h442.eulerosv2r7.x86_64 #1 SMP Fri May 15 22:01:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@euleros ~]# yum grouplist
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
Available Environment Groups:
   Base System
   Developer Mode
   Cloud Server
   Server with GUI
Available Groups:
   Compatibility Libraries
   Development Tools
   Security Tools
   Smart Card Support
Done
[root@euleros ~]#

とりあえず「yum groupinstall “Server with GUI”」でパッケージを追加して再起動。

「1」を選んで

「2」を選んで

「c」と「c」で進めると普通のログイン画面に到達

rootでログインしたあと「init 5」して起動する画面はCentOSと変わりは無い

ログイン完了すると、EulerOSの壁紙デスクトップに到着。

「systemctl set-default graphical.target」でログイン画面自体をGUIにした場合は下記の様になる。

また、EulerOS2.0だとopen-vm-toolsがあった。

NFSv4でマウントするとrootがnobodyになる

$
0
0

NetApp ONTAP 9.7ファイルサーバを作る時にNFS v3.0/v4.0/v4.1を有効にして、CentOS7からNFSマウントしてみた。

[root@centos7 ~]# mount 172.17.44.108:/ /mnt
[root@centos7 ~]# ls -l /mnt
合計 4
drwxr-xr-x. 11 nobody nobody 4096  8月 31 16:07 testvol
[root@centos7 ~]# ls -l /mnt/testvol/
合計 36
drwxrwxrwx. 2 nobody nobody 4096  8月 31 16:07 ntfs-test1
drwxrwxrwx. 4 nobody nobody 4096  7月 17 14:08 test
drwxr-xr-x. 3 nobody nobody 4096  8月 28 15:59 test1
drwxr-xr-x. 2 nobody nobody 4096  7月 17 14:08 test2
drwxr-xr-x. 2 nobody nobody 4096  8月 28 15:16 test3
drwxr-xr-x. 2 nobody nobody 4096  8月 28 15:16 test4
drwxr-xr-x. 2 nobody nobody 4096  8月 28 15:16 test5
drwxr-xr-x. 2 nobody nobody 4096  8月 28 15:08 testtere
drwxr-xr-x. 2 nobody nobody 4096  7月 31 17:46 testvm
[root@centos7 ~]# cat /proc/mounts |grep mnt
172.17.44.108:/ /mnt nfs4 rw,relatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.17.44.103,local_lock=none,addr=172.17.44.108 0 0
172.17.44.108:/testvol /mnt/testvol nfs4 rw,relatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.17.44.103,local_lock=none,addr=172.17.44.108 0 0
[root@centos7 ~]#

rootユーザで作成したはずの所有者が「nobody / nobody」で表示されている。

この時、/var/log/messages には以下のログが出ていた。

Aug 31 17:13:54 centos7 kernel: FS-Cache: Loaded
Aug 31 17:13:54 centos7 kernel: FS-Cache: Netfs 'nfs' registered for caching
Aug 31 17:13:54 centos7 kernel: Key type dns_resolver registered
Aug 31 17:13:55 centos7 kernel: NFS: Registering the id_resolver key type
Aug 31 17:13:55 centos7 kernel: Key type id_resolver registered
Aug 31 17:13:55 centos7 kernel: Key type id_legacy registered
Aug 31 17:13:55 centos7 nfsidmap[1748]: nss_getpwnam: name 'root@defaultv4iddomain.com' does not map into domain 'adosakana.local'
Aug 31 17:13:55 centos7 nfsidmap[1750]: nss_name_to_gid: name 'root@defaultv4iddomain.com' does not map into domain 'adosakana.local'
Aug 31 17:13:55 centos7 kernel: nfs4filelayout_init: NFSv4 File Layout Driver Registering...

関連する用語は「idmapd」

RedHat NFSv4 マウントで、すべてのファイルの所有者が nobody:nobody と誤って表示される
SUSE NFS4 mount shows all ownership as “nobody” or 4294967294

上記資料だとNFSサーバとして動作させる話も入っている。

CentOS7でNFSクライアントとして使う場合に気にする必要があるのは、/etc/idmapd.conf の「[General]」セクションに「Domain = NFS V4 IDドメイン」の設定を行う、ということのみ。

rpcidmapd.service / nfs-idmapd.service / nfs-idmap.service の起動状態について気にする必要は無く、ただたんに/etc/idmapd.conf を編集してからマウントすればOKだった。

ただし、試した限りでは、一度NFS v4でマウントし、nobodyとして認識されてしまうとキャッシュか何かが残っているようで、OS再起動する必要があった。

今回は、NetAppのデフォルトNFS V4 IDドメイン「defaultv4iddomain.com」を使用しているので、/etc/idmapd.conf には「Domain = defaultv4iddomain.com」と設定した

この状態でマウントしてみると下記の様になり、期待通りにrootユーザが認識された。

[root@centos7 ~]# mount 172.17.44.108:/ /mnt
[root@centos7 ~]# ls -l /mnt/
合計 4
drwxr-xr-x. 11 root root 4096  8月 31 16:07 testvol
[root@centos7 ~]# ls -l /mnt/testvol/
合計 36
drwxrwxrwx. 2 root root 4096  8月 31 16:07 ntfs-test1
drwxrwxrwx. 4 root root 4096  7月 17 14:08 test
drwxr-xr-x. 3 root root 4096  8月 28 15:59 test1
drwxr-xr-x. 2 root root 4096  7月 17 14:08 test2
drwxr-xr-x. 2 root root 4096  8月 28 15:16 test3
drwxr-xr-x. 2 root root 4096  8月 28 15:16 test4
drwxr-xr-x. 2 root root 4096  8月 28 15:16 test5
drwxr-xr-x. 2 root root 4096  8月 28 15:08 testtere
drwxr-xr-x. 2 root root 4096  7月 31 17:46 testvm
[root@centos7 ~]# tail /var/log/messages
Aug 31 17:19:06 centos7 systemd: Created slice User Slice of root.
Aug 31 17:19:06 centos7 systemd-logind: New session 1 of user root.
Aug 31 17:19:06 centos7 systemd: Started Session 1 of user root.
Aug 31 17:19:12 centos7 kernel: FS-Cache: Loaded
Aug 31 17:19:12 centos7 kernel: FS-Cache: Netfs 'nfs' registered for caching
Aug 31 17:19:12 centos7 kernel: Key type dns_resolver registered
Aug 31 17:19:12 centos7 kernel: NFS: Registering the id_resolver key type
Aug 31 17:19:12 centos7 kernel: Key type id_resolver registered
Aug 31 17:19:12 centos7 kernel: Key type id_legacy registered
Aug 31 17:19:12 centos7 kernel: nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[root@centos7 ~]#
[root@centos7 ~]# cat /proc/mounts |grep mnt
172.17.44.108:/ /mnt nfs4 rw,relatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.17.44.103,local_lock=none,addr=172.17.44.108 0 0
172.17.44.108:/testvol /mnt/testvol nfs4 rw,relatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.17.44.103,local_lock=none,addr=172.17.44.108 0 0
[root@centos7 ~]#


NetApp ONTAP simulator 9.7がROOT VOLUME NOT WORKING PROPERLY: RECOVERY REQUIREDで起動する

$
0
0

NetApp ONTAP simulator 9.7をESXi上で動かしていたのだが、瞬電で死んだ。

再起動してみると、起動はするのだが「ROOT VOLUME NOT WORKING PROPERLY: RECOVERY REQUIRED」というメッセージでサービスが動作しない状態となっていた。

調べるとNetAppフォーラムに「Root volume is damaged」というのを発見。

ここでは、BOOTLOADERの環境変数で「bootarg.init.boot_recovery」が設定されているから、それを削除すれば大丈夫、とある。

しかし、確認してみると、そんな環境変数は設定されていない。

うーん、と同じ記事の次のページを開いてみると環境変数「bootarg.rdb_corrupt」を削除、という話が出てきた。

この環境変数ならあった。

「unsetenv bootarg.rdb_corrupt」を実行して、再起動することで正常に動作するようになった。

ONTAP 9.7シミュレータをアップデートする手法

$
0
0

いままでONTAP シミュレータってアップデートできないものだ、と思っていたのですが、ぐぐってみたらアップデートできる、という手法を発見。実践してみた。

ネタ元「NetApp ONTAP 9.7 Simulator Upgrade How To

ポイント

・アップデートにあたりvol0に約6GBの容量が必要
・ONTAP シミュレータ標準のroot aggregate構成では6GBを確保できないので、ディスク追加必須
・アップデートは 97P6_q_image.tgz などの通常のNetApp FAS用ファイルがそのまま使える

手順

その1 アップデートファイルの入手

NetAppサイトよりONTAPのアップデートファイルを入手。

2020/09/03時点だと 97P6_q_image.tgz が最新。

その2 httpサーバの設置

NetAppからアクセスできる場所に httpサーバを立てて、アップデートファイルをダウンロードできるようにする。

Windows上でhttpサーバを建てる場合、「簡単WEBサーバー」というものを使用したところHTTP HEADを実装していないようでファイル容量の検出ができず、正常に動作しませんでした。

ネタ元のサイトでは「HFS ~ Http File Server」というものを使用していました。

わたしはLinux上のApacheを使用しました。

その3ONTAPシミュレータへのログイン

ログインします。

その4 root aggregateへのディスク追加

現状のaggregate構成の確認するため「storage aggregate show」を実行

nas01c::> storage aggregate show


Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_nas01c_01
             855MB   42.13MB   95% online       1 nas01c-01        raid_dp,
                                                                   normal

nas01c::>

得られたaggregate名を使って「storage disk show -aggregate aggr0_nas01c_01」を実行し、ディスク構成を確認。

nas01c::> storage disk show -aggregate aggr0_nas01c_01
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.15             1020MB     -  16 FCAL    aggregate   aggr0_nas01c_01
NET-1.16             1020MB     -  17 FCAL    aggregate   aggr0_nas01c_01
NET-1.17             1020MB     -  18 FCAL    aggregate   aggr0_nas01c_01
3 entries were displayed.

nas01c::>

現状はディスク3本で855MBであることがわかる。

追加するディスクは現状スペアディスク認識となっているものを使用するため、現状のスペアディスクを「storage disk show -container-type spare」で確認する。

nas01c::> storage disk show -container-type spare
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.18             1020MB     -  19 FCAL    spare       Pool0     nas01c-01
NET-1.19             1020MB     -  20 FCAL    spare       Pool0     nas01c-01
NET-1.20             1020MB     -  21 FCAL    spare       Pool0     nas01c-01
NET-1.21             1020MB     -  22 FCAL    spare       Pool0     nas01c-01
NET-1.22             1020MB     -  24 FCAL    spare       Pool0     nas01c-01
NET-1.23             1020MB     -  25 FCAL    spare       Pool0     nas01c-01
NET-1.24             1020MB     -  26 FCAL    spare       Pool0     nas01c-01
NET-1.25             1020MB     -  27 FCAL    spare       Pool0     nas01c-01
NET-1.26             1020MB     -  28 FCAL    spare       Pool0     nas01c-01
NET-1.27             1020MB     -  29 FCAL    spare       Pool0     nas01c-01
NET-1.28             1020MB     -  32 FCAL    spare       Pool0     nas01c-01
11 entries were displayed.

nas01c::>

ディスクを7本追加するため「storage aggregate add-disks -aggregate aggr0_nas01c_01 -diskcount 7」と実行します。

nas01c::> storage aggregate add-disks -aggregate aggr0_nas01c_01 -diskcount 7

Warning: Aggregate "aggr0_nas01c_01" is a root aggregate. Adding disks to the root aggregate is not recommended. Once added, disks cannot be removed without
         reinitializing the node.
Do you want to continue? {y|n}: y

Info: Disks would be added to aggregate "aggr0_nas01c_01" on node "nas01c-01" in the following manner:

      First Plex

        RAID Group rg0, 9 disks (block checksum, raid_dp)
                                                            Usable Physical
          Position   Disk                      Type           Size     Size
          ---------- ------------------------- ---------- -------- --------
          data       NET-1.18                  FCAL         1000MB   1.00GB
          data       NET-1.19                  FCAL         1000MB   1.00GB
          data       NET-1.20                  FCAL         1000MB   1.00GB
          data       NET-1.21                  FCAL         1000MB   1.00GB
          data       NET-1.22                  FCAL         1000MB   1.00GB
          data       NET-1.23                  FCAL         1000MB   1.00GB
          data       NET-1.24                  FCAL         1000MB   1.00GB

      Aggregate capacity available for volume use would be increased by 5.27GB.

Do you want to continue? {y|n}: y

nas01c::>

ディスクを7本追加し、10本構成としたところ、root aggregateのサイズは6.68GBとなりました。

nas01c::> storage aggregate show


Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_nas01c_01
            6.68GB    5.88GB   12% online       1 nas01c-01        raid_dp,
                                                                   normal

nas01c::> storage disk show -aggregate aggr0_nas01c_01
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.15             1020MB     -  16 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.16             1020MB     -  17 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.17             1020MB     -  18 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.18             1020MB     -  19 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.19             1020MB     -  20 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.20             1020MB     -  21 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.21             1020MB     -  22 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.22             1020MB     -  24 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.23             1020MB     -  25 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.24             1020MB     -  26 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
10 entries were displayed.

nas01c::>

その5 vol0のディスク容量増加

アップデートに関する作業はvol0ボリュームを使用するため、vol0のサイズを6Gにします。

現状を確認するため「volume show」を実行します

nas01c::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
nas01c-01 vol0         aggr0_nas01c_01
                                    online     RW      807.3MB    426.8MB   44%

nas01c::>

現状のvol0サイズを確認するため「volume size -vserver ノード名 -volume vol0」を実行します。

nas01c::> volume size -vserver nas01c-01 -volume vol0
vol size: Volume "nas01c-01:vol0" has size 807.3m.

nas01c::>

vol0のサイズを6gにするため「volume size -vserver ノード名 -volume vol0 -new-size 6g」を実行します。

nas01c::> volume size -vserver nas01c-01 -volume vol0 -new-size 6g
vol size: Volume "nas01c-01:vol0" size set to 6g.

nas01c::>

容量が増加したことを「volume size -vserver ノード名 -volume vol0」と「volume show」を実行して確認します。

nas01c::> volume size -vserver nas01c-01 -volume vol0
vol size: Volume "nas01c-01:vol0" has size 6g.

nas01c::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
nas01c-01 vol0         aggr0_nas01c_01
                                    online     RW          6GB     5.36GB    5%

nas01c::>

その6 advanceモードへの切り替え

アップデート関連のコマンドはadvanceモードもしくはdiagモードでの実行となるため、切り替えます。

nas01c::> set adv

Warning: These advanced commands are potentially dangerous; use them only when
         directed to do so by NetApp personnel.
Do you want to continue? {y|n}: y

nas01c::*>

その7 現状確認

「system image show」と「system image package show」を実行して、現在のシステムイメージの状態を確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  true    true    9.7                       -
nas01c-02
         image1  true    true    9.7                       -
2 entries were displayed.

nas01c::*> system image package show

nas01c::*>

現状、両ノードとも9.7が標準で起動する設定(Is Default:true)で、現状の起動も9.7(Is Currect:true)であることがわかります。

また「version -node *」を実行してOSバージョンを確認します。

nas01c::*> version -node *

nas01c-01  :
NetApp Release 9.7: Thu Jan 09 11:10:19 UTC 2020


nas01c-02  :
NetApp Release 9.7: Thu Jan 09 11:10:19 UTC 2020

2 entries were displayed.

nas01c::*>

その8 アップデートをimage2へ書き込む

「system image update -node ノード名 -package http://HTTPサーバ/97P6_q_image.tgz -replace image2」という形で、image2に対してダウンロードしたファイルを書き込みます。

nas01c::*> system image update -node nas01c-01 -package http://172.17.44.103/97P6_q_image.tgz -replace image2

Software update started on node nas01c-02. Updating image2 with package http://.../97P6_q_image.tgz.
Downloading package. This may take up to 20 minutes.
99% downloaded
Download complete.
Listing package contents.
Decompressing package contents.
Verifying package signature.
Invoking script (install phase). This may take up to 60 minutes.
Mode of operation is UPDATE
Current image is image1
Alternate image is image2
Versions are compatible
Available space on boot device is 1452 MB
Required  space on boot device is 740 MB
Kernel binary matches install machine type
external keymanager check script has run successfully.
Getting ready to install image
Directory /cfcard/x86_64/freebsd/image2 created
Syncing device...
Extracting to /cfcard/x86_64/freebsd/image2...
x netboot/VERSION
x netboot/COMPAT.TXT
x netboot/BUILD
x netboot/kernel.sig
x netboot/key_fingerprint.csfc.sig
x netboot/key_fingerprint.sig
x netboot/platform.ko.sig
x netboot/platfs.img.sig
x netboot/rootfs.img.sig
x netboot/kernel.csfc.sig
x netboot/platform.ko.csfc.sig
x netboot/platfs.img.csfc.sig
x netboot/rootfs.img.csfc.sig
x netboot/CHECKSUM
x netboot/metadata.xml
x netboot/nvdimm.ko
x netboot/pvscsi.ko
x netboot/INSTALL
x netboot/if_vmx.ko
x netboot/bsdboot.tgz
x netboot/cap.xml
x netboot/mpt.ko
x netboot/platform.ko
x netboot/platfs.img
x netboot/kernel
x netboot/fw.tgz
x netboot/pmroot_late.tgz
x netboot/rootfs.img
Installed MD5 checksums pass
Installing diagnostic and firmware files
Firmware MD5 checksums pass
Updating FreeBSD boot partition
Successfully updated FreeBSD boot partition
Installation complete. image2 updated on node nas01c-01.
nas01c::*>

正常に書き込まれたかは「system image show」と「system image package show」を実行して確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
3 entries were displayed.

nas01c::*> system image package show
             Package
Node         Repository     Package File Name
------------ -------------- -----------------
nas01c-01
             mroot
                            97P6_q_image.tgz
1 entries were displayed.

nas01c::*>

問題がないようであれば、もう片方のノードにもアップロードします。

nas01c::*> system image update -node nas01c-02 -package http://172.17.44.103/97P6_q_image.tgz -replace image2

Software update started on node nas01c-02. Updating image2 with package http://.../97P6_q_image.tgz.
Downloading package. This may take up to 20 minutes.
99% downloaded
Download complete.
Listing package contents.
Decompressing package contents.
Verifying package signature.
Invoking script (install phase). This may take up to 60 minutes.
Mode of operation is UPDATE
Current image is image1
Alternate image is image2
Versions are compatible
Available space on boot device is 1452 MB
Required  space on boot device is 740 MB
Kernel binary matches install machine type
external keymanager check script has run successfully.
Getting ready to install image
Directory /cfcard/x86_64/freebsd/image2 created
Syncing device...
Extracting to /cfcard/x86_64/freebsd/image2...
x netboot/VERSION
x netboot/COMPAT.TXT
x netboot/BUILD
x netboot/kernel.sig
x netboot/key_fingerprint.csfc.sig
x netboot/key_fingerprint.sig
x netboot/platform.ko.sig
x netboot/platfs.img.sig
x netboot/rootfs.img.sig
x netboot/kernel.csfc.sig
x netboot/platform.ko.csfc.sig
x netboot/platfs.img.csfc.sig
x netboot/rootfs.img.csfc.sig
x netboot/CHECKSUM
x netboot/metadata.xml
x netboot/nvdimm.ko
x netboot/pvscsi.ko
x netboot/INSTALL
x netboot/if_vmx.ko
x netboot/bsdboot.tgz
x netboot/cap.xml
x netboot/mpt.ko
x netboot/platform.ko
x netboot/platfs.img
x netboot/kernel
x netboot/fw.tgz
x netboot/pmroot_late.tgz
x netboot/rootfs.img
Installed MD5 checksums pass
Installing diagnostic and firmware files
Firmware MD5 checksums pass
Updating FreeBSD boot partition
Successfully updated FreeBSD boot partition
Installation complete. image2 updated on node nas01c-02.
nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 16:37:32
4 entries were displayed.

nas01c::*> system image package show
             Package
Node         Repository     Package File Name
------------ -------------- -----------------
nas01c-01
             mroot
                            97P6_q_image.tgz
nas01c-02
             mroot
                            97P6_q_image.tgz
2 entries were displayed.

nas01c::*>

その9 image2からの再起動

現在はimage1から起動する設定となっているので、それをimage2から起動するように変更します。

「system image modify -node ノード名 -image image2 -isdefault true」と実行します。

nas01c::*> system image modify -node nas01c-01 -image image2 -isdefault true
After a clean shutdown, image2 will be set as the default boot image on node
nas01c-01.


nas01c::*> 

Is Default設定が変更されているかを「system image show」で確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  false   true    9.7                       -
         image2  true    false   9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 16:37:32
4 entries were displayed.

nas01c::*>

変更したノードを「reboot -node ノード名」で再起動します。

nas01c::*> reboot -node nas01c-01
  (system node reboot)

Warning: This operation will cause node "nas01c-01" to be marked as unhealthy. Unhealthy nodes do not participate in quorum voting. If the node
         goes out of service and one more node goes out of service there will be a data serving failure for the entire cluster. This will cause a
         client disruption. Use "cluster show" to verify cluster state. If possible bring other nodes online to improve the resiliency of this
         cluster.
Do you want to continue? {y|n}: y

nas01c::*>

再起動中、下記の様な形で「Running the upgrade system」という表示があったりします。

再起動が完了したら、「system image show」でIs DefaultとIs Currectが変更されていることを確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  false   false   9.7                       -
         image2  true    true    9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 16:37:32
4 entries were displayed.

nas01c::*>

また「version -node *」を実行してOSバージョンが変更されていることを確認します。

nas01c::*> version -node *

nas01c-01  :
NetApp Release 9.7P6: Tue Jul 28 04:06:27 UTC 2020


nas01c-02  :
NetApp Release 9.7: Thu Jan 09 11:10:19 UTC 2020

2 entries were displayed.

nas01c::*>

その10 もう片側も同様に再起動

もう片側のノードにも同じ事を実行します。

途中は省略。

「system image show」を実行して、Is Default, Is Currectが両方とも変更されたことを確認。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  false   false   9.7                       -
         image2  true    true    9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  false   false   9.7                       -
         image2  true    true    9.7P6                     9/2/2020 16:37:32
4 entries were displayed.

nas01c::*>

「version -node *」を実行して、両ノードのOSバージョンが変更されたことを確認。

nas01c::*> version -node *

nas01c-01  :
NetApp Release 9.7P6: Tue Jul 28 04:06:27 UTC 2020


nas01c-02  :
NetApp Release 9.7P6: Tue Jul 28 04:06:27 UTC 2020

2 entries were displayed.

nas01c::*>


トラブル事例

いきなり下記の様なメッセージが出力されて動かなくなりました。

nas01c::*>
The management gateway server restarted. Waiting to see if the connection can be reestablished.

The connection with the management gateway server has been reestablished.
If the root cause of the interruption was a process core, you can see the core file details by issuing the following command:
        system node coredump show -node local -type application -corename mgwd.* -instance

***********************
**  SYSTEM MESSAGES  **
***********************

CRITICAL: This node is not healthy because the root volume is low on space
(<10MB). The node can still serve data, but it cannot participate in cluster
operations until this situation is rectified. Free space using the nodeshell or
contact technical support for assistance.


nas01c::>

メッセージにある「system node coredump show」を実行してもなにもないなー

nas01c::> system node coredump show
This table is currently empty.

nas01c::>  system node coredump show -node local -type application -corename mgwd.* -instance
There are no entries matching your query.

nas01c::>

じゃぁ、ディスク容量はどうだ?

nas01c::> system node run -node nas01c-02 df
Filesystem              kbytes       used      avail capacity  Mounted on
/vol/vol0/             5976884    5974408       2476     100%  /vol/vol0/
/vol/vol0/.snapshot     314572    3254436          0     1035%  /vol/vol0/.snapshot

nas01c::>

snapshotが領域を超え、通常ボリュームに進出して使用量が100%となっていました。

snapshotを削除します。

現状のsnapshotを確認

nas01c::> system node run -node nas01c-02 snap list
Volume vol0
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
 50% (50%)   48% (48%)  Sep 02 16:02  hourly.0
 52% ( 6%)   52% ( 3%)  Sep 02 15:45  hourly.1

nas01c::>

snapshotを削除

nas01c::> system node run -node nas01c-02 snap delete vol0 hourly.0

nas01c::> system node run -node nas01c-02 snap delete vol0 hourly.1

nas01c::> 

ディスク容量が空きました。

nas01c::> system node run -node nas01c-02 df
Filesystem              kbytes       used      avail capacity  Mounted on
/vol/vol0/             5976884    3029024    2947860      51%  /vol/vol0/
/vol/vol0/.snapshot     314572          0     314572       0%  /vol/vol0/.snapshot

nas01c::>

上記は「system node run -node ノード名 snap ~」で実行していましたが、「snap show ~」「snap delete ~」でも大丈夫でした。

こちらの場合、snap deleteコマンドの際にアスタリスクが使用できるので、全削除が簡単です。

下記はその実行例

nas01c::*> snap show
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
nas01c-01
         vol0
                  hourly.5                                1.37MB     0%    0%
                  hourly.4                               374.7MB     6%   10%
                  hourly.3                               316.9MB     5%    9%
                  hourly.2                               192.8MB     3%    5%
                  hourly.1                               245.9MB     4%    7%
                  hourly.0                               181.7MB     3%    5%
                  nightly.1                              276.1MB     4%    8%
                  nightly.0                              185.5MB     3%    5%
nas01c-02
         vol0
                  hourly.2                               107.8MB     2%    3%
                  hourly.1                               286.0MB     5%    8%
                  nightly.0                              252.2MB     4%    7%
                  hourly.0                               228.9MB     4%    6%
svm0     svm0_root
                  daily.2020-09-03_0010                    336KB     2%   39%
                  hourly.2020-09-03_0405                   128KB     1%   19%
                  hourly.2020-09-03_0505                   128KB     1%   19%

                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
svm0     svm0_root
                  hourly.2020-09-03_0605                   364KB     2%   40%
                  hourly.2020-09-03_0854                   128KB     1%   19%
                  hourly.2020-09-03_0905                   128KB     1%   19%
                  hourly.2020-09-03_1005                   120KB     1%   18%
         testvol
                  daily.2020-09-03_0010                    152KB     0%    8%
                  hourly.2020-09-03_0505                   144KB     0%    8%
                  hourly.2020-09-03_0605                   152KB     0%    8%
                  hourly.2020-09-03_0705                   152KB     0%    8%
                  hourly.2020-09-03_0805                   164KB     0%    9%
                  hourly.2020-09-03_0905                   152KB     0%    8%
                  hourly.2020-09-03_1005                   144KB     0%    8%
26 entries were displayed.

nas01c::*> snap delete -vserver
    nas01c-01 nas01c-02 svm0
nas01c::*> snap delete -vserver nas01c-01 -volume vol0 -snapshot
    hourly.5  hourly.4  hourly.3  hourly.2  hourly.1  hourly.0  nightly.1
    nightly.0
nas01c::*> snap delete -vserver nas01c-01 -volume vol0 -snapshot *

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.5" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.4" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.3" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.2" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.1" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.0" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "nightly.1" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "nightly.0" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
8 entries were acted on.

nas01c::*> snap delete -vserver nas01c-02 -volume vol0 -snapshot *

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.2" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.1" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "nightly.0" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y

Warning: Deleting a Snapshot copy permanently removes any data that is stored
         only in that Snapshot copy. Are you sure you want to delete Snapshot
         copy "hourly.0" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y
4 entries were acted on.

nas01c::*> snap show
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
svm0     svm0_root
                  daily.2020-09-03_0010                    336KB     2%   39%
                  hourly.2020-09-03_0405                   128KB     1%   19%
                  hourly.2020-09-03_0505                   128KB     1%   19%
                  hourly.2020-09-03_0605                   364KB     2%   40%
                  hourly.2020-09-03_0854                   128KB     1%   19%
                  hourly.2020-09-03_0905                   128KB     1%   19%
                  hourly.2020-09-03_1005                   120KB     1%   18%
         testvol
                  daily.2020-09-03_0010                    152KB     0%    8%
                  hourly.2020-09-03_0505                   144KB     0%    8%
                  hourly.2020-09-03_0605                   152KB     0%    8%
                  hourly.2020-09-03_0705                   152KB     0%    8%
                  hourly.2020-09-03_0805                   164KB     0%    9%
                  hourly.2020-09-03_0905                   152KB     0%    8%
                  hourly.2020-09-03_1005                   144KB     0%    8%
14 entries were displayed.

nas01c::*>

Solaris 11をNISクライアントにする

$
0
0

Solaris 環境からのNFS v4アクセスを確認するため、VMware上にSolaris 11をインストールした。

NISによるユーザIDの共通化も検証するため、NISクライアントの設定を行った。

NISクライアントにする設定は「domainname NISドメイン名」でNISのドメイン名を設定したあと「ypinit -c」で終わり。

つぎは/etc/nsswitch.confを編集して…と思ってvi /etc/nsswitch.confで開いてみると、手動で編集するな、という記載が…

マニュアルを探すと「Oracle Solaris 11.1 でのネームサービスおよびディレクトリサービスの作業」の「ネームサービススイッチの管理」があった。

「データベースのソースを切り替える方法」にある「svccfg -s system/name-service/switch」で入ったあと「listprop config」で現在の設定値を確認できる。

nsswitch.conf にあるいろんなエントリのうち、hostsとprinterしかない。

じゃぁ、手動で設定すればいいのかと「setprop config/passwd=”files nis”」と実行してみるとエラー。

じゃぁ、と「setprop config/password=”files nis”」に変えてみると設定成功

「setprop config/group=”files nis”」も実行。

「quit」で抜けて、「svcadm refresh name-service/switch」を実行するとシステムに反映されて、ls -l でみた場合の結果に反映された。

また、値が反映されると/etc/nsswitch.confの内容も書き換わる。

ONTAP 9でCIFS/NFS共有へのアクセス確認

$
0
0

NetApp ONTAP9でCIFS/NFS共有を作った時に、指定ディレクトリに対してアクセスできるかどうかをNetApp側で確認する手法

export policy上でクライアントIPからのアクセス状況確認

export policy上で、該当IPアドレスからのアクセスを受け付ける設定になっているかを確認

「vserver export-policy check-access」を使用する。

CIFSアクセスの確認

ontap-select-cluster::> vserver export-policy check-access -vserver svm0 -volume testvol -qtree ntfs-test1 -client-ip  172.17.44.50 -authentication-method ntlm -protocol cifs -access-type read-write
                                         Policy    Policy       Rule
Path                          Policy     Owner     Owner Type  Index Access
----------------------------- ---------- --------- ---------- ------ ----------
/                             default    svm0_root volume          1 read
/testvol                      testvol    testvol   volume          8 read
/testvol/ntfs-test1           testvol    ntfs-test1
                                                   qtree           8 read-write
3 entries were displayed.

ontap-select-cluster::>

NFSアクセスの確認

ontap-select-cluster::> vserver export-policy check-access -vserver svm0 -volume testvol -qtree ntfs-test1 -client-ip  172.17.44.50 -authentication-method sys -protocol nfs4 -access-type read-write
                                         Policy    Policy       Rule
Path                          Policy     Owner     Owner Type  Index Access
----------------------------- ---------- --------- ---------- ------ ----------
/                             default    svm0_root volume          1 read
/testvol                      testvol    testvol   volume          8 read
/testvol/ntfs-test1           testvol    ntfs-test1
                                                   qtree           8 read-write
3 entries were displayed.

ontap-select-cluster::>

該当ディレクトリ/ファイルの権限確認

NetApp上のパスを指定して、そこに与えられている権限がどのようになっているかを確認する。

「vserver security file-directory show」コマンドを使う。

NTFS/mixedの場合

ontap-select-cluster::> vserver security file-directory show -vserver svm0 -path /testvol/ntfs-test1

                Vserver: svm0
              File Path: /testvol/ntfs-test1
      File Inode Number: 966
         Security Style: mixed
        Effective Style: ntfs
         DOS Attributes: 10
 DOS Attributes in Text: ----D---
Expanded Dos Attributes: -
           UNIX User Id: 0
          UNIX Group Id: 0
         UNIX Mode Bits: 777
 UNIX Mode Bits in Text: rwxrwxrwx
                   ACLs: NTFS Security Descriptor
                         Control:0x8004
                         Owner:BUILTIN\Administrators
                         Group:BUILTIN\Administrators
                         DACL - ACEs
                           ALLOW-Everyone-0x1f01ff
                           ALLOW-Everyone-0x10000000-OI|CI|IO

ontap-select-cluster::>

NFSの場合

ontap-select-cluster::> vserver security file-directory show -vserver svm0 -path /testvol/test

                Vserver: svm0
              File Path: /testvol/test
      File Inode Number: 96
         Security Style: unix
        Effective Style: unix
         DOS Attributes: 10
 DOS Attributes in Text: ----D---
Expanded Dos Attributes: -
           UNIX User Id: 0
          UNIX Group Id: 0
         UNIX Mode Bits: 777
 UNIX Mode Bits in Text: rwxrwxrwx
                   ACLs: -

ontap-select-cluster::>

ユーザ名の変換について

UNIX上のユーザ名とWindows上のユーザ名の変換状況を確認しつつ、該当ディレクトリ/ファイルにアクセスできるかを確認するには「vserver security file-directory show-effective-permissions」を使用する。

NTFS/mixedの場合

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/ntfs-test1 -unix-user-name root

              Vserver: svm0
    Windows User Name: ADOSAKANA\Administrator
       Unix User Name: root
            File Path: /testvol/ntfs-test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x1f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/ntfs-test1 -win-user-name administrator

              Vserver: svm0
    Windows User Name: administrator
       Unix User Name: root
            File Path: /testvol/ntfs-test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x1f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize

ontap-select-cluster::>

NFSの場合

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/test1 -unix-user-name root

              Vserver: svm0
    Windows User Name: ADOSAKANA\Administrator
       Unix User Name: root
            File Path: /testvol/test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x11f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize
                        System Security

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/test1 -win-user-name ADOSAKANA\administrator

              Vserver: svm0
    Windows User Name: ADOSAKANA\administrator
       Unix User Name: root
            File Path: /testvol/test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x11f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize
                        System Security

ontap-select-cluster::>

Windowsで簡易的にWebサーバをたてるソフト HFS

$
0
0

むかしはネットワーク機器のfirmware versionアップにtftpやftpなどを使うことが多かった。

最近はhttp経由という例が増えている。

Windows標準のIISだと大がかりすぎるのでもっと簡単にできるものを探して「簡単WEBサーバー」というものを試したのだが、これはGETしか実装していないという中途半端なものだった。

GETしか実装されていないと何が問題になるかと言うと、ファイルダウンロード前にHEADでファイルサイズを確認し、保存できる領域があるかを確認する、という動作をする機器の場合、HEADが実装されていないため容量確認ができず、ダウンロードが実施できない、ということになる。

で、探したところ「HFS ~ Http File Server」というものを発見。

これは2MBのバイナリでインストール不要というもの。

hfs.exeを実行すると下記の様にウィンドウが立ち上がり、Webサーバとして動作しだす。

ファイルの登録は簡単で、登録したいファイルの右クリックメニューから「Add to HFS」を選択するだけ、となっている。

追加すると下記の様に/直下に配置される。ファイルを選択するとダウンロードに使用するURLが表示されるという点も便利

ダウンロードが開始されるとLogウインドウにどういうリクエストがあったのかが表示される。

起動したWindowsに複数のIPアドレスがある場合、どのIPアドレスで公開するかは選択できる。

ポート番号は80以外にも設定することはできる(httpsは未対応)

サービスとして動作させることはできないが、Windows起動時にHFSを実行する、という設定もある

NetApp ONTAPシミュレータのディスク構成を変更する

$
0
0

NetApp ONTAPシミュレータの初期構成は1024MB HDDが28本接続されている、という構成になっている。

使いにくいので、9GB HDD構成に変更して使用することにする。

ONTAPシミュレータのデータディスクのありか

vSphere上で vsim-netapp-DOT9.7-cm_nodar.ova をデプロイした場合、下記の様な構成になっている。

このとき、ハードディスク4の230GBの中にファイルとして1024MBディスクのイメージファイルが作成されている。

もし、200GB以上のデータを書き込みたい場合は、初回起動前にハードディスク4の容量を増やす必要がある。初回起動時はUFSファイルシステムを作成してくれるので対応できるのだが、シミュレータ内にはファイルシステム拡張用のコマンドが用意されていないので初回起動時以外に拡張しようとすると、FreeBSD 12のDVDで起動してgrowfsコマンドで拡張する、といった操作が必要になる。

ハードディスク4のサイズを「1TB」に変更した場合はこんな感じです。(ついでにCPUとメモリを増量している)

ディスク削除

ONTAPシミュレータ仮想マシンの電源を入れ、下記の「Press Ctrl-C for Boot Menu」が出たらCtrlキーとCキーを同時押しする。

しばらく待つと下記の様なメニューが表示されるので「4」のClean Configuration and initialize all disks」を選択する。

初期化確認は「yes」で答える。

しばらく待つと再起動して、下記の様な初期セットアップが始まる。

これはyesと入力しないで、Ctrl+Cで強制中断すると下記の様にログインプロンプトが現れるので「admin」ユーザでログインする。(パスワードは聞かれない)

「set diag」を実行すると「systemshellコマンド」が利用できるようになる。これはONTAP OS上でUNIXコマンドを実行できるようになるものです。(“system node systemshell”が正式コマンド名なのですが、ONTAP 9.7ではsystemshellでも実行できます)

「systemshell localhost “df -h /sim/dev”」と実行すると、UNIXで「df -h /sim/dev」を実行する、というような動作になります。

なお、日本語配列キーボードを使う場合、「”」は「Shift+8」で入力します。

::> set diag

Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

::*> system node systemshell local "df -h /sim/dev"
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/ad3      223G     11G    194G     5%    /sim
::*>

ONTAPシミュレータ上で認識するディスクのイメージファイルは「/sim/dev/,disks」というディレクトリにあります(「,」は誤字ではない)

現状あるファイルを確認するには「systemshell localhost “ls -l /sim/dev/,disks”」と実行します。

(画像はないです)

::*> systemshell local "ls -l /sim/dev/,disks"
total 11024296
-rwxr-xr-x  1 root  wheel         912 Sep  2 13:56 ,reservations
-rw-r--r--  1 root  wheel        1372 Sep  2 13:56 Shelf:DiskShelf14
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.16:NETAPP__:VD-1000MB-FZ-520:14001600:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.17:NETAPP__:VD-1000MB-FZ-520:14001601:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.18:NETAPP__:VD-1000MB-FZ-520:14001602:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.19:NETAPP__:VD-1000MB-FZ-520:14001603:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.20:NETAPP__:VD-1000MB-FZ-520:14001604:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.21:NETAPP__:VD-1000MB-FZ-520:14001605:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:10 v0.22:NETAPP__:VD-1000MB-FZ-520:14001606:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.24:NETAPP__:VD-1000MB-FZ-520:14001607:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.25:NETAPP__:VD-1000MB-FZ-520:14001608:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.26:NETAPP__:VD-1000MB-FZ-520:14001709:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.27:NETAPP__:VD-1000MB-FZ-520:14001710:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.28:NETAPP__:VD-1000MB-FZ-520:14001711:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.29:NETAPP__:VD-1000MB-FZ-520:14001712:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.32:NETAPP__:VD-1000MB-FZ-520:14001713:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.16:NETAPP__:VD-1000MB-FZ-520:16391700:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.17:NETAPP__:VD-1000MB-FZ-520:16391701:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.18:NETAPP__:VD-1000MB-FZ-520:16391702:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.19:NETAPP__:VD-1000MB-FZ-520:16391703:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.20:NETAPP__:VD-1000MB-FZ-520:16391704:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.21:NETAPP__:VD-1000MB-FZ-520:16391705:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.22:NETAPP__:VD-1000MB-FZ-520:16391706:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.24:NETAPP__:VD-1000MB-FZ-520:16391707:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.25:NETAPP__:VD-1000MB-FZ-520:16391708:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.26:NETAPP__:VD-1000MB-FZ-520:16391709:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.27:NETAPP__:VD-1000MB-FZ-520:16391710:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.28:NETAPP__:VD-1000MB-FZ-520:16391711:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 11:50 v1.29:NETAPP__:VD-1000MB-FZ-520:16391712:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 11:50 v1.32:NETAPP__:VD-1000MB-FZ-520:16391713:2104448
::*>

いまある仮想ディスクを削除する場合は「systemshell localhost “sudo rm /sim/dev/,disks/*”」と実行します。

削除した後の、ディスク再作成はvsim_makedisksというコマンドで実行します。

いろいろオプションがあるのでまずは「systemshell local “vsim_makedisks -h”」と実行して確認します。

::*> systemshell local "vsim_makedisks -h"
Usage: /usr/sbin/vsim_makedisks [ -n <additional number of disks to create> ]
          [ -t <disk type ID> ]
          [ -e <additional sectors> ]
          [ -a <adapter on which to start populating disks ]
          [ -h ]

By default 5 disks will be added. The <disk type ID> can be one
of the following: (NOTE, 0 is the default)
                                                               Fast
Type Vendor ID Product ID       Usable Size[B] Actual Size[B]  Zero  BPS   RPM
  0  NETAPP__  VD-16MB_________     16,777,216     38,273,024   No   512  10000
  1  NETAPP__  VD-35MB_________     35,913,728     57,409,536   No   512  10000
  2  NETAPP__  VD-50MB_________     52,428,800     73,924,608   No   512  10000
  3  NETAPP__  VD-100MB________    104,857,600    126,353,408   No   512  10000
  4  NETAPP__  VD-500MB________    524,288,000    545,783,808   No   512  10000
  5  NETAPP__  VD-1000MB_______  1,048,576,000  1,070,071,808   No   512  10000
  6  NETAPP__  VD-16MB-FZ______     16,777,216     38,273,024   Yes  512  15000
  7  NETAPP__  VD-35MB-FZ______     35,913,728     57,409,536   Yes  512  15000
  8  NETAPP__  VD-50MB-FZ______     52,428,800     73,924,608   Yes  512  15000
  9  NETAPP__  VD-100MB-FZ_____    104,857,600    126,353,408   Yes  512  15000
 10  NETAPP__  VD-500MB-FZ_____    524,288,000    545,783,808   Yes  512  15000
 11  NETAPP__  VD-1000MB-FZ____  1,048,576,000  1,070,071,808   Yes  512  15000
 12  NETAPP__  VD-16MB-520_____     16,777,216     38,273,024   No   520  10000
 13  NETAPP__  VD-35MB-520_____     35,913,728     57,409,536   No   520  10000
 14  NETAPP__  VD-50MB-520_____     52,428,800     73,924,608   No   520  10000
 15  NETAPP__  VD-100MB-520____    104,857,600    126,353,408   No   520  10000
 16  NETAPP__  VD-500MB-520____    524,288,000    545,783,808   No   520  10000
 17  NETAPP__  VD-1000MB-520___  1,048,576,000  1,070,071,808   No   520  10000
 18  NETAPP__  VD-16MB-FZ-520__     16,777,216     38,273,024   Yes  520  15000
 19  NETAPP__  VD-35MB-FZ-520__     35,913,728     57,409,536   Yes  520  15000
 20  NETAPP__  VD-50MB-FZ-520__     52,428,800     73,924,608   Yes  520  15000
 21  NETAPP__  VD-100MB-FZ-520_    104,857,600    126,353,408   Yes  520  15000
 22  NETAPP__  VD-500MB-FZ-520_    524,288,000    545,783,808   Yes  520  15000
 23  NETAPP__  VD-1000MB-FZ-520  1,048,576,000  1,070,071,808   Yes  520  15000
 24  NETAPP__  VD-16MB-FZ-ATA__     16,777,216     51,388,416   Yes  512   7200
 25  NETAPP__  VD-35MB-FZ-ATA__     36,700,160     73,801,728   Yes  512   7200
 26  NETAPP__  VD-50MB-FZ-ATA__     52,428,800     91,496,448   Yes  512   7200
 27  NETAPP__  VD-100MB-FZ-ATA_    104,857,600    150,478,848   Yes  512   7200
 28  NETAPP__  VD-500MB-FZ-ATA_    524,288,000    622,338,048   Yes  512   7200
 29  NETAPP__  VD-1000MB-FZ-ATA  1,048,576,000  1,212,162,048   Yes  512   7200
 30  NETAPP__  VD-2000MB-FZ-520  2,097,512,000  2,119,007,808   Yes  520  15000
 31  NETAPP__  VD-4000MB-FZ-520  4,194,304,000  4,215,799,808   Yes  520  15000
 32  NETAPP__  VD-2000MB-FZ-ATA  2,097,512,000  2,391,810,048   Yes  512   7200
 33  NETAPP__  VD-4000MB-FZ-ATA  4,194,304,000  4,751,106,048   Yes  512   7200
 34  NETAPP__  VD-100MB-SS-512_    104,857,600    126,353,408   Yes  512  15000
 35  NETAPP__  VD-500MB-SS-520_    524,288,000    545,783,808   Yes  520  15000
 36  NETAPP__  VD-9000MB-FZ-520  9,437,184,000  9,458,679,808   Yes  520  15000
 37  NETAPP__  VD-9000MB-FZ-ATA  9,437,184,000 10,649,346,048   Yes  512   7200

::*>

いろんなディスクタイプが選択できますが、BPSが520になっているものを優先して選びます。

その中で一番容量が大きいのは36番なので、「-t 36」というオプションを使います。

今回は60本を増設してみます(なお、あとで分かりますが、56本までしか認識してくれませんでした)

アダプタ0配下に20本追加するコマンド「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 0″」を実行します。

アダプタ1配下に20本追加するコマンド「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 1″」を実行します。

アダプタ2配下に20本追加するコマンド「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 2″」を実行します。

作成したら「halt local」で停止をして、再起動します。

これで起動すればOKです。

ESXi上のNutanix CE AHVをアップデートした

$
0
0

ESXi上にNutanix CE AHVをインストールした」でインストールしたNutanix CE環境をアップデートしてみた。

トラブルポイントのまとめ

・AHVのrootパーテーション容量が足らない
・AHV内の標準仮想マシン設定にあるPC Typeが初期値に戻るので既存の仮想マシンが起動しない
・AHV内のCVM仮想マシン設定にあるPC Typeがpc-i440fx-rhel7.3.0になり起動しない

参考になったページ「Nutanix CE: Cannot Start VM」「Guest VM Running in Nested Nutanix CE on VMware vSphere Won’t Boot

手順1 アップデータ入手

Download Nutanix CE, Docs, and Guides」から下記3ファイルをダウンロード。

・「Metadata for AOS, AHV upgrades and PC deployment」のce-2019.11.22-metadata.zipを展開してjsonファイルを取りだしておく
・「AOS Upgrade」(ce-2019.11.22-upgrade.tar.gzのまま)
・「AHV Upgrade」(host-bundle-el7.nutanix.20191030.415.tar.gzのまま)

手順2 CVM仮想マシンの自動起動を止める

この後、何回かNutanix CE仮想マシンを再起動する。その際にCVM仮想マシンの起動が完了するのを待っていると時間がかかるので、自動起動を止める。

「virsh list –all」でCVM仮想マシンのIDを確認して、「virsh autostart <ID> –disable」と実行すると自動起動が止まる。

手順3 Nutanix CE仮想マシンのディスク拡大

AHVのrootパーテーションの空き容量が足らない為アップデートが失敗する。

このため、vSphere側でNutanix CE仮想マシンのディスクサイズを拡大する。

標準の「ハードディスク1」が約7GBとなっている。

これを、12GBに増やす。

変更後、Nutanix CE仮想マシンを再起動する。

再起動後、vSphereのコンソールを開き「root」ユーザでログインする。デフォルトパスワードは「nutanix/4u」

ログイン後、現在のディスク使用状況と、システムディスクである/dev/sdaのパーテーション構成を確認する。

「df -h」と「fdisk -l /dev/sda」を実行する。

パーテーション変更は「fdisk /dev/sda」を実行して行う。

既存のパーテーションを「d」で消して、新しいパーテーションを作成しなおす、という形になる。

bootフラグのセットも忘れずに

最後は「w」で書き込みを実行する。

再起動しないと新しいパーテーションで認識してくれないので、再度Nutanix CE仮想マシンを再起動する。

再起動後、再度「fdisk -l /dev/sda」と「df -h」を実行してみると、fdiskの方は新しいディスクサイズで認識しているが、rootパーテーションはまだ古い容量のままとなっている。

「resize2fs /dev/sda1」を実行してファイルシステムの拡張を行い、新しいディスク容量が反映される。

手順4 CVM仮想マシンの自動起動を戻す

AHV内のCVM仮想マシンの自動起動設定を戻し、自動起動するようにする。

「virsh list –all」でCVM仮想マシンのNameを確認して、「virsh autostart <Name>」を実行する。(起動していない場合はIdが割り当てられていないので、Nameで指定する必要がある)

「virsh start <Name>」でCVM仮想マシンを起動するか、rebootでNutanix CE仮想マシンを再起動する。

手順5 AOSアップデート

Nutanixにログインして「設定」の「ソフトウェアアップグレード」にある「AOS」を開く。

「AOS base softwareバイナリをアップロード」のリンクをクリック

AOS BASE SOFTWAREメタデータファイルは「ce-2019.11.22-upgrade-metadata.json」
AOS BASE SOFTWAREバイナリファイルは「ce-2019.11.22-upgrade.tar.gz」
を指定する。

「今すぐアップロード」をクリックする。

上記の様になったらアップロード成功。

「Upgrade Now」を選択してアップデートを開始する。

アップグレードが進んでいきます。

ちなみに「Nothing To Do?」は下記の2048ゲームが表示されます。

途中、CVM仮想マシンの再起動などがあり、完了します。

手順6 Hypervisorのアップデート

Nutanixの「設定」の「ソフトウェアアップグレード」にある「Hypervisor」を選択。

「upload a Hypervisor Binary」をクリックし、下記の選択をして「今すぐアップロード」する。

HYPERVISOR メタデータファイル「host-bundle-el7.nutanix.20191030.415-metadata.json」
HYPERVISOR バイナリファイル「host-bundle-el7.nutanix.20191030.415.tar.gz」

続いて、「Upgrade Now」を実施する。

で、アップグレードが進んでいきます。

たぶん、下記の様な「71%」から30分以上待っても進まないと思います。

いまの状態はHypervisorはアップデートできたものの、その上のCVM仮想マシンが起動していない状態となります。

手順7 AHV上の仮想マシンの標準設定の修正

vSphere上でNutanix CEを稼働させた場合、標準設定の状態ではNutanix上で作成した仮想マシンが起動しません。

起動させるためには、「/var/cache/libvirt/qemu/capabilities/3c76bc41d59c0c7314b1ae8e63f4f765d2cf16abaeea081b3ca1f5d8732f7bb1.xml」 のalias=’pc’をpc-i440fx-rhel7.2.0の行に付け直します。

該当ファイルは下記の様な形になっていて、「alias=’pc’」がpc-i440fx-rhel7.3.0の行についています。

これを「pc-i440fx-rhel7.2.0」の行に「alias=’pc’」設定を移動させます。

手順としては、pc-i440fx-rhel7.3.0の行をpc-i440fx-rhel7.2.0書き換えて、既存のpc-i440fx-rhel7.2.0設定を削除するのが簡単でしょう。

画像

手順8 AHV上のCVM仮想マシン設定の修正

CVM仮想マシンの仮想マシンタイプ設定が「pc-i440fx-rhel7.3.0」に設定されていました。

設定の確認は「virsh dumpxml <name>|less」で行います。
設定変更は「virsh edit <Name>」となります。

viコマンドでxmlファイルが開かれますので、「pc-i440fx-rhel7.3.0」を「pc-i440fx-rhel7.2.0」に書き換えて保存します。

この後、CVM仮想マシンを再起動します

面倒ならNutanix CE仮想マシンごとrebootします。

手順9 終了


ESXi ARM Editionをラズパイ4にインストールした

$
0
0

VMware Flingにて「ESXi ARM Edition」が公開された。

早速、ラズパイ4の8GBモデルにインストールしてみた。

用意するもの
・ラズパイ4の4GBか8GBモデル
・UEFI起動専用microSD
・ESXiのインストーラーISOを書き込んだUSBメモリ
・ESXiのインストール先になるUSBメモリ(USB2.0だとインストール先に設定できなかった)
 (iSCSI LUNにもインストールできるらしい)
・Raspberry Pi OSをインストールしたmicroSD

インストール手順

(0) ラズパイ4のEEPROMを最新版にする

まず、純正のRaspberry Pi OSをインストールしたmicroSDで起動して
「sudo rpi-eeprom-update」を実行。

画像


上記のように「*** UPDATE AVAILABLE ***」と表示されている場合は、新しいバージョンが出ているので「sudo rpi-eeprom-update -a」を実行しアップデートトリガを建てたあと、OSを再起動(reboot)する。

再起動後、下記の様に「up-to-date」表示となることを確認する。

画像

(1) VMware Flingsの「ESXi Arm Edition」からファイルを入手

VMware Flingsの「ESXi ARM Edition」からISOイメージを入手

なお、マニュアルは「ESXi-ARM-ISO」と表示されているプルダウンメニューを開くと選択できるようになっている。

(2) UEFI起動専用microSD にUEFIファイルを置く

まず、パソコンでmicroSDをFA32でフォーマットする。その際、ボリュームライベルを「UEFI」と指定する。
32GBを超えているとexFAT形式になり、起動できないので注意すること。

ラズパイ公式が提供しているfirmware.zipをhttps://github.com/raspberrypi/firmware/releases からダウンロードしてくる。

このファイルの中にあるbootディレクトリの中身をmicroSDに展開する。

画像

展開したあと、kernelで始まるファイル名を削除する。

次に、pftf提供のUEFIを https://github.com/pftf/RPi4/releases/ からダウンロードする

ダウンロードしたzipファイルの中身を全部microSDに上書きコピーする。

ラズパイ4 4GBモデルの場合はconfig.txtの最後に「gpu_mem=16」という文字列を追加する。

なお、UEFI関連の細かいところは tianocore / edk2-platformsの「Raspberry Pi 4 Platform」を参照のこと

(3) ESXiインストーラーUSBメモリを作成

VMware FlingsからダウンロードしたESXi インストーラISOファイルを、USBメモリに書き込む。

うちでは「Rufus」を使用して書き込んだ。

画像

(4) ラズパイにUEFI起動専用microSDをさして初回起動

起動後、ESCキーを押してUEFI設定画面に遷り、「Device Manager」を選択

「Raspberry Pi Configuration」の「Display Configuration」にて「Virtual 1024×768」ぐらいの解像度を設定する。これはもっと高解像度でもいいのだが、文字が小さくて読みにくくなるだけなのでやめた方が良い。

画像

「Raspberry Pi Configuration」の「Advanced Configuration」にて「Limit RAM to 3GB」を「Disabled」に設定 (設定しないとメモリが3GBまでしか使えない)

画像

これを設定したあと、ラズパイを一度リセットする。

なお「CPU Configuration」にてオーバークロック設定も可能だが、ESXi ARM手順書に「do not overclock」とある。

(5) ESXiインストーラーUSBメモリをさして起動

起動後、ESCキーを押してUEFI設定画面に遷り、「Boot Manager」を選択

デバイス一覧からUSBメモリを選択して起動する。

画像

なお、この段階ではインストール先USBメモリはささない

(6) インストール手順をすすめてインストール先の選択を行う

ESXi インストーラーの画面はx86_64環境の場合とほぼ変わらず

画像
画像

インストール手順をすすめていくと、インストール先の選択を行うところになる。

ここの段階にきてからインストール先USBメモリをさして「F5」キーを押して更新する。

更新するとUSBメモリが追加されるはず。

画像

このとき、追加されたUSBメモリの容量が0MBとなっている場合は、該当するUSBメモリにインストールが出来ない。

インストールできるUSBを選択したあとは、普通のESXiインストールと同じ

画像
画像
画像
画像

インストールが完了したら再起動される

再起動したらESXiインストーラーUSBメモリは取り外す。

(7) 自動起動設定を行う

UEFI設定画面の「Boot Maintenance Manager」にて、インストール先USBメモリを選択して自動的に起動する設定とする。

画像

(8) ESXiが起動する

HDMI出力される画面はほぼ通常のESXi 7.0と同じ。

画像

また、Host Clientが起動しているので Webブラウザから管理画面にアクセスすることもできる。

画像
画像

(9) 手動で時刻設定を行う

ラズパイ4は時刻保持をしないので、起動直後は時間が大きくズレている。(2020/09/01に設定されていた)

まず、手動で大まかな時刻を設定して確定する。その後にNTP設定を行う。

なお、大きく時刻がズレているとvCenterサーバへの登録に失敗したりする。

(10) vCenterに登録

ESXi ARMであっても普通のESXiと同様に登録できます。

最初は「Unable to push signed certificate to host 」というエラーで登録失敗したのですが、これは、ESXi ARMとvCenter間の時刻ズレが原因でした。

画像

(11) Ubuntu 20.04 LTS(arm)のインストール

Ubuntu 公式のARM serverページからUbuntu Server installer ISOファイルを入手します。

これを使うだけで、あとは普通の仮想マシン作成手順と同じです。

画像
画像
画像

Ubuntuのインストール詳細は省略しますが、インストール中のラズパイ4の負可は下記の様になっていました。

画像

なお、パーテーション構成はこのような感じでした。

osakanataro@ubuntu-arm:~$ uname -a
Linux ubuntu-arm 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 11:01:50 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
osakanataro@ubuntu-arm:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               932M     0  932M   0% /dev
tmpfs                              199M  1.1M  198M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   20G  5.0G   14G  27% /
tmpfs                              991M     0  991M   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              991M     0  991M   0% /sys/fs/cgroup
/dev/sda2                          976M  106M  804M  12% /boot
/dev/loop0                          49M   49M     0 100% /snap/core18/1883
/dev/loop1                          64M   64M     0 100% /snap/lxd/16103
/dev/loop2                          26M   26M     0 100% /snap/snapd/8543
/dev/sda1                          511M  3.5M  508M   1% /boot/efi
tmpfs                              199M     0  199M   0% /run/user/1000
osakanataro@ubuntu-arm:~$

また「lshw」コマンドによるハードウェア認識は下記の様になります。

osakanataro@ubuntu-arm:~$ sudo lshw
ubuntu-arm
    description: Computer
    product: linux,dummy-virt
    width: 64 bits
    capabilities: cp15_barrier setend swp tagged_addr_disabled
  *-core
       description: Motherboard
       physical id: 0
     *-cpu
          description: CPU
          product: cpu
          physical id: 0
          bus info: cpu@0
          capabilities: fp asimd evtstrm crc32 cpuid
     *-memory
          description: System memory
          physical id: 1
          size: 2GiB
     *-pci
          description: Host bridge
          product: VMware
          vendor: VMware
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 01
          width: 32 bits
          clock: 33MHz
        *-generic UNCLAIMED
             description: System peripheral
             product: Virtual Machine Communication Interface
             vendor: VMware
             physical id: 0.7
             bus info: pci@0000:00:00.7
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: msi msix cap_list
             configuration: latency=0 maxlatency=255 mingnt=6
             resources: ioport:1000(size=64) memory:34500000-34501fff
        *-display UNCLAIMED
             description: VGA compatible controller
             product: VMware
             vendor: VMware
             physical id: f
             bus info: pci@0000:00:0f.0
             version: 00
             width: 64 bits
             clock: 33MHz
             capabilities: msi msix vga_controller bus_master cap_list
             configuration: latency=64
             resources: memory:30000000-303fffff memory:50000000-57ffffff memory:5c000000-5c007fff
        *-pci:0
             description: PCI bridge
             product: PCI bridge
             vendor: VMware
             physical id: 11
             bus info: pci@0000:00:11.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci subtractive_decode bus_master cap_list
             resources: memory:30400000-304fffff
           *-sata
                description: SATA controller
                product: SATA AHCI controller
                vendor: VMware
                physical id: 1
                bus info: pci@0000:01:01.0
                logical name: scsi0
                logical name: scsi1
                version: 00
                width: 32 bits
                clock: 66MHz
                capabilities: sata pm msi ahci_1.0 bus_master cap_list rom emulated
                configuration: driver=ahci latency=64
                resources: irq:43 memory:30410000-30410fff memory:30400000-3040ffff
              *-disk
                   description: ATA Disk
                   product: VMware Virtual S
                   physical id: 0
                   bus info: scsi@0:0.0.0
                   logical name: /dev/sda
                   version: 0001
                   serial: 00000000000000000001
                   size: 40GiB (42GB)
                   capabilities: gpt-1.00 partitioned partitioned:gpt
                   configuration: ansiversion=5 guid=dcc76c9a-30c6-47ff-a50e-9c1aef36f82d logicalsectorsize=512 sectorsize=512
                 *-volume:0 UNCLAIMED
                      description: Windows FAT volume
                      vendor: mkfs.fat
                      physical id: 1
                      bus info: scsi@0:0.0.0,1
                      version: FAT32
                      serial: 8602-1cb1
                      size: 510MiB
                      capacity: 511MiB
                      capabilities: boot fat initialized
                      configuration: FATs=2 filesystem=fat
                 *-volume:1
                      description: EXT4 volume
                      vendor: Linux
                      physical id: 2
                      bus info: scsi@0:0.0.0,2
                      logical name: /dev/sda2
                      logical name: /boot
                      version: 1.0
                      serial: 62661a57-4595-43cb-a0c4-7a8bd89295ad
                      size: 1GiB
                      capabilities: journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized
                      configuration: created=2020-10-08 10:16:20 filesystem=ext4 lastmountpoint=/boot modified=2020-10-08 11:16:51 mount.fstype=ext4 mount.options=rw,relatime mounted=2020-10-08 11:16:51 state=mounted
                 *-volume:2
                      description: EFI partition
                      physical id: 3
                      bus info: scsi@0:0.0.0,3
                      logical name: /dev/sda3
                      serial: qFzQl0-IcQD-bYC3-gpCZ-jpfP-zy2j-GzOGgE
                      size: 38GiB
                      capabilities: lvm2
              *-cdrom
                   description: DVD-RAM writer
                   product: VMware SATA CD01
                   vendor: NECVMWar
                   physical id: 1
                   bus info: scsi@1:0.0.0
                   logical name: /dev/cdrom
                   logical name: /dev/cdrw
                   logical name: /dev/dvd
                   logical name: /dev/sr0
                   version: 1.00
                   capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
                   configuration: ansiversion=5 status=open
        *-pci:1
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15
             bus info: pci@0000:00:15.0
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:8 memory:30500000-306fffff ioport:58000000(size=2097152)
           *-network
                description: Ethernet interface
                product: 82574L Gigabit Network Connection
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: ens160
                version: 00
                serial: 00:50:56:93:f5:9f
                size: 1Gbit/s
                capacity: 1Gbit/s
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress msix bus_master cap_list rom ethernet physical logical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=1.8-0 ip=172.17.44.88 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
                resources: irq:44 memory:30500000-3051ffff memory:30520000-3053ffff memory:30550000-30553fff memory:30540000-3054ffff
        *-pci:2
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.1
             bus info: pci@0000:00:15.1
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:9 memory:30700000-308fffff ioport:58200000(size=2097152)
        *-pci:3
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.2
             bus info: pci@0000:00:15.2
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:10 memory:30900000-30afffff ioport:58400000(size=2097152)
        *-pci:4
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.3
             bus info: pci@0000:00:15.3
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:11 memory:30b00000-30cfffff ioport:58600000(size=2097152)
        *-pci:5
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.4
             bus info: pci@0000:00:15.4
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:12 memory:30d00000-30efffff ioport:58800000(size=2097152)
        *-pci:6
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.5
             bus info: pci@0000:00:15.5
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:13 memory:30f00000-310fffff ioport:58a00000(size=2097152)
        *-pci:7
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.6
             bus info: pci@0000:00:15.6
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:14 memory:31100000-312fffff ioport:58c00000(size=2097152)
        *-pci:8
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 15.7
             bus info: pci@0000:00:15.7
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:15 memory:31300000-314fffff ioport:58e00000(size=2097152)
        *-pci:9
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16
             bus info: pci@0000:00:16.0
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:16 memory:31500000-316fffff ioport:59000000(size=2097152)
           *-usb
                description: USB controller
                product: USB3 xHCI 1.0 Controller
                vendor: VMware
                physical id: 0
                bus info: pci@0000:0a:00.0
                version: 00
                width: 64 bits
                clock: 33MHz
                capabilities: pm pciexpress msi msix xhci bus_master cap_list
                configuration: driver=xhci_hcd latency=0 maxlatency=255 mingnt=6
                resources: irq:40 memory:31500000-3151ffff
              *-usbhost:0
                   product: xHCI Host Controller
                   vendor: Linux 5.4.0-48-generic xhci-hcd
                   physical id: 0
                   bus info: usb@1
                   logical name: usb1
                   version: 5.04
                   capabilities: usb-2.00
                   configuration: driver=hub slots=4 speed=480Mbit/s
                 *-usb:0
                      description: Human interface device
                      product: VMware Virtual USB Mouse
                      vendor: VMware
                      physical id: 1
                      bus info: usb@1:1
                      version: 1.02
                      capabilities: usb-1.10
                      configuration: driver=usbhid speed=12Mbit/s
                 *-usb:1
                      description: Keyboard
                      product: VMware Virtual USB Keyboard
                      vendor: VMware
                      physical id: 2
                      bus info: usb@1:2
                      version: 1.00
                      capabilities: usb-1.10
                      configuration: driver=usbhid speed=12Mbit/s
                 *-usb:2
                      description: USB hub
                      product: VMware Virtual USB Hub
                      vendor: VMware, Inc.
                      physical id: 3
                      bus info: usb@1:3
                      version: 1.00
                      capabilities: usb-1.10
                      configuration: driver=hub slots=7 speed=12Mbit/s
                 *-usb:3
                      description: USB hub
                      product: VMware Virtual USB Hub
                      vendor: VMware, Inc.
                      physical id: 4
                      bus info: usb@1:4
                      version: 1.00
                      capabilities: usb-2.00
                      configuration: driver=hub slots=7 speed=480Mbit/s
              *-usbhost:1
                   product: xHCI Host Controller
                   vendor: Linux 5.4.0-48-generic xhci-hcd
                   physical id: 1
                   bus info: usb@2
                   logical name: usb2
                   version: 5.04
                   capabilities: usb-3.10
                   configuration: driver=hub slots=4 speed=10000Mbit/s
        *-pci:10
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.1
             bus info: pci@0000:00:16.1
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:17 memory:31700000-318fffff ioport:59200000(size=2097152)
        *-pci:11
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.2
             bus info: pci@0000:00:16.2
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:18 memory:31900000-31afffff ioport:59400000(size=2097152)
        *-pci:12
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.3
             bus info: pci@0000:00:16.3
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:19 memory:31b00000-31cfffff ioport:59600000(size=2097152)
        *-pci:13
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.4
             bus info: pci@0000:00:16.4
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:20 memory:31d00000-31efffff ioport:59800000(size=2097152)
        *-pci:14
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.5
             bus info: pci@0000:00:16.5
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:21 memory:31f00000-320fffff ioport:59a00000(size=2097152)
        *-pci:15
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.6
             bus info: pci@0000:00:16.6
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:22 memory:32100000-322fffff ioport:59c00000(size=2097152)
        *-pci:16
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 16.7
             bus info: pci@0000:00:16.7
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:23 memory:32300000-324fffff ioport:59e00000(size=2097152)
        *-pci:17
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17
             bus info: pci@0000:00:17.0
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:24 memory:32500000-326fffff ioport:5a000000(size=2097152)
        *-pci:18
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.1
             bus info: pci@0000:00:17.1
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:25 memory:32700000-328fffff ioport:5a200000(size=2097152)
        *-pci:19
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.2
             bus info: pci@0000:00:17.2
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:26 memory:32900000-32afffff ioport:5a400000(size=2097152)
        *-pci:20
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.3
             bus info: pci@0000:00:17.3
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:27 memory:32b00000-32cfffff ioport:5a600000(size=2097152)
        *-pci:21
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.4
             bus info: pci@0000:00:17.4
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:28 memory:32d00000-32efffff ioport:5a800000(size=2097152)
        *-pci:22
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.5
             bus info: pci@0000:00:17.5
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:29 memory:32f00000-330fffff ioport:5aa00000(size=2097152)
        *-pci:23
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.6
             bus info: pci@0000:00:17.6
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:30 memory:33100000-332fffff ioport:5ac00000(size=2097152)
        *-pci:24
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 17.7
             bus info: pci@0000:00:17.7
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:31 memory:33300000-334fffff ioport:5ae00000(size=2097152)
        *-pci:25
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18
             bus info: pci@0000:00:18.0
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:32 memory:33500000-336fffff ioport:5b000000(size=2097152)
        *-pci:26
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.1
             bus info: pci@0000:00:18.1
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:33 memory:33700000-338fffff ioport:5b200000(size=2097152)
        *-pci:27
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.2
             bus info: pci@0000:00:18.2
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:34 memory:33900000-33afffff ioport:5b400000(size=2097152)
        *-pci:28
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.3
             bus info: pci@0000:00:18.3
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:35 memory:33b00000-33cfffff ioport:5b600000(size=2097152)
        *-pci:29
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.4
             bus info: pci@0000:00:18.4
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:36 memory:33d00000-33efffff ioport:5b800000(size=2097152)
        *-pci:30
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.5
             bus info: pci@0000:00:18.5
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:37 memory:33f00000-340fffff ioport:5ba00000(size=2097152)
        *-pci:31
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.6
             bus info: pci@0000:00:18.6
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:38 memory:34100000-342fffff ioport:5bc00000(size=2097152)
        *-pci:32
             description: PCI bridge
             product: PCI Express Root Port
             vendor: VMware
             physical id: 18.7
             bus info: pci@0000:00:18.7
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:39 memory:34300000-344fffff ioport:5be00000(size=2097152)
osakanataro@ubuntu-arm:~$

(12) open-vm-toolsのインストール

Ubuntu 20.04など、x86_64環境であれば open-vm-tools のパッケージが存在している。

しかし、これまではARM(aarch64)環境のESXiなどは存在していなかったので、ARM環境で動作する open-vm-tools は用意されていない。このため、自分で open-vm-tools をコンパイルしてインストールする必要がある。

まずは、コンパイルに必要なパッケージ群をインストールする。

osakanataro@ubuntu-arm:~$ sudo apt install -y automake-1.15 pkg-config libtool libmspack-dev libglib2.0-dev libpam0g-dev libssl-dev libxml2-dev libxmlsec1-dev libx11-dev libxext-dev libxinerama-dev libxi-dev libxrender-dev libxrandr-dev libgtk2.0-dev libgtk-3-dev libgtkmm-3.0-dev
[sudo] password for osakanataro:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core autoconf automake autopoint autotools-dev
  build-essential cpp cpp-9 debhelper dh-autoreconf dh-strip-nondeterminism
  dpkg-dev dwz fakeroot fontconfig fontconfig-config fonts-dejavu-core g++
  g++-9 gcc gcc-9 gcc-9-base gettext gir1.2-atk-1.0 gir1.2-atspi-2.0
  gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-2.0 gir1.2-gtk-3.0
  gir1.2-harfbuzz-0.0 gir1.2-pango-1.0 gtk-update-icon-cache
  hicolor-icon-theme humanity-icon-theme icu-devtools intltool-debian
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libarchive-cpio-perl libarchive-zip-perl libasan5 libatk-bridge2.0-0
  libatk-bridge2.0-dev libatk1.0-0 libatk1.0-data libatk1.0-dev
  libatkmm-1.6-1v5 libatkmm-1.6-dev libatomic1 libatspi2.0-0 libatspi2.0-dev
  libavahi-client3 libavahi-common-data libavahi-common3 libblkid-dev
  libc-dev-bin libc6-dev libcairo-gobject2 libcairo-script-interpreter2
  libcairo2 libcairo2-dev libcairomm-1.0-1v5 libcairomm-1.0-dev libcc1-0
  libcolord2 libcroco3 libcrypt-dev libcups2 libdatrie-dev libdatrie1
  libdbus-1-dev libdebhelper-perl libdpkg-perl libdrm-amdgpu1 libdrm-nouveau2
  libdrm-radeon1 libegl-dev libegl-mesa0 libegl1 libegl1-mesa-dev libepoxy-dev
  libepoxy0 libexpat1-dev libfakeroot libffi-dev libfile-fcntllock-perl
  libfile-stripnondeterminism-perl libfontconfig1 libfontconfig1-dev
  libfreetype-dev libfreetype6-dev libfribidi-dev libgail-common libgail18
  libgbm1 libgcc-9-dev libgcrypt20-dev libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin
  libgdk-pixbuf2.0-common libgdk-pixbuf2.0-dev libgl-dev libgl1
  libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles-dev libgles1 libgles2
  libglib2.0-dev-bin libglibmm-2.4-1v5 libglibmm-2.4-dev libglvnd-dev
  libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev libgmpxx4ldbl
  libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev libgnutlsxx28 libgomp1
  libgpg-error-dev libgraphite2-3 libgraphite2-dev libgtk-3-0 libgtk-3-bin
  libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libgtkmm-3.0-1v5
  libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libharfbuzz0b
  libice-dev libice6 libicu-dev libidn2-dev libisl22 libitm1 libjbig0
  libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm10 liblsan0 libltdl-dev
  libmail-sendmail-perl libmount-dev libmpc3 libmspack0 libnspr4 libnspr4-dev
  libnss3 libnss3-dev libopengl-dev libopengl0 libp11-kit-dev libpango-1.0-0
  libpango1.0-dev libpangocairo-1.0-0 libpangoft2-1.0-0 libpangomm-1.4-1v5
  libpangomm-1.4-dev libpangoxft-1.0-0 libpcre16-3 libpcre2-16-0 libpcre2-32-0
  libpcre2-dev libpcre2-posix2 libpcre3-dev libpcre32-3 libpcrecpp0v5
  libpixman-1-0 libpixman-1-dev libpng-dev libpng-tools libpthread-stubs0-dev
  librest-0.7-0 librsvg2-2 librsvg2-common libselinux1-dev libsensors-config
  libsensors5 libsepol1-dev libsigc++-2.0-0v5 libsigc++-2.0-dev libsm-dev
  libsm6 libsoup-gnome2.4-1 libstdc++-9-dev libsub-override-perl
  libsys-hostname-long-perl libtasn1-6-dev libtasn1-doc libthai-data
  libthai-dev libthai0 libtiff5 libtsan0 libubsan1 libunbound8 libwayland-bin
  libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1
  libwayland-server0 libwebp6 libx11-xcb1 libxau-dev libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-render0-dev
  libxcb-shm0 libxcb-shm0-dev libxcb-sync1 libxcb-xfixes0 libxcb1-dev
  libxcomposite-dev libxcomposite1 libxcursor-dev libxcursor1 libxdamage-dev
  libxdamage1 libxdmcp-dev libxfixes-dev libxfixes3 libxft-dev libxft2 libxi6
  libxinerama1 libxkbcommon-dev libxkbcommon0 libxml2-utils libxmlsec1
  libxmlsec1-gcrypt libxmlsec1-gnutls libxmlsec1-nss libxmlsec1-openssl
  libxrandr2 libxrender1 libxshmfence1 libxslt1-dev libxslt1.1 libxtst-dev
  libxtst6 libxxf86vm1 linux-libc-dev m4 make manpages-dev nettle-dev
  pango1.0-tools po-debconf ubuntu-mono uuid-dev wayland-protocols x11-common
  x11proto-dev x11proto-input-dev x11proto-randr-dev x11proto-record-dev
  x11proto-xext-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev
  zlib1g-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc cpp-doc gcc-9-locales dh-make
  debian-keyring gcc-9-doc gcc-multilib flex bison gdb gcc-doc gettext-doc
  libasprintf-dev libgettextpo-dev libatkmm-1.6-doc glibc-doc libcairo2-doc
  libcairomm-1.0-doc colord cups-common libdatrie-doc bzr freetype2-doc
  libgcrypt20-doc libgirepository1.0-dev libglib2.0-doc libglibmm-2.4-doc
  gmp-doc libgmp10-doc libmpfr-dev dns-root-data gnutls-bin gnutls-doc
  libgraphite2-utils gvfs libgtk-3-doc libgtk2.0-doc libgtkmm-3.0-doc
  libice-doc icu-doc liblcms2-utils libtool-doc imagemagick libpango1.0-doc
  librsvg2-bin lm-sensors libsigc++-2.0-doc libsm-doc libssl-doc
  libstdc++-9-doc libthai-doc gfortran | fortran95-compiler gcj-jdk
  libwayland-doc libx11-doc libxcb-doc libxext-doc m4-doc make-doc
  libmail-box-perl
The following NEW packages will be installed:
  adwaita-icon-theme at-spi2-core autoconf automake automake-1.15 autopoint
  autotools-dev build-essential cpp cpp-9 debhelper dh-autoreconf
  dh-strip-nondeterminism dpkg-dev dwz fakeroot fontconfig fontconfig-config
  fonts-dejavu-core g++ g++-9 gcc gcc-9 gcc-9-base gettext gir1.2-atk-1.0
  gir1.2-atspi-2.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gtk-2.0
  gir1.2-gtk-3.0 gir1.2-harfbuzz-0.0 gir1.2-pango-1.0 gtk-update-icon-cache
  hicolor-icon-theme humanity-icon-theme icu-devtools intltool-debian
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libarchive-cpio-perl libarchive-zip-perl libasan5 libatk-bridge2.0-0
  libatk-bridge2.0-dev libatk1.0-0 libatk1.0-data libatk1.0-dev
  libatkmm-1.6-1v5 libatkmm-1.6-dev libatomic1 libatspi2.0-0 libatspi2.0-dev
  libavahi-client3 libavahi-common-data libavahi-common3 libblkid-dev
  libc-dev-bin libc6-dev libcairo-gobject2 libcairo-script-interpreter2
  libcairo2 libcairo2-dev libcairomm-1.0-1v5 libcairomm-1.0-dev libcc1-0
  libcolord2 libcroco3 libcrypt-dev libcups2 libdatrie-dev libdatrie1
  libdbus-1-dev libdebhelper-perl libdpkg-perl libdrm-amdgpu1 libdrm-nouveau2
  libdrm-radeon1 libegl-dev libegl-mesa0 libegl1 libegl1-mesa-dev libepoxy-dev
  libepoxy0 libexpat1-dev libfakeroot libffi-dev libfile-fcntllock-perl
  libfile-stripnondeterminism-perl libfontconfig1 libfontconfig1-dev
  libfreetype-dev libfreetype6-dev libfribidi-dev libgail-common libgail18
  libgbm1 libgcc-9-dev libgcrypt20-dev libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin
  libgdk-pixbuf2.0-common libgdk-pixbuf2.0-dev libgl-dev libgl1
  libgl1-mesa-dev libgl1-mesa-dri libglapi-mesa libgles-dev libgles1 libgles2
  libglib2.0-dev libglib2.0-dev-bin libglibmm-2.4-1v5 libglibmm-2.4-dev
  libglvnd-dev libglvnd0 libglx-dev libglx-mesa0 libglx0 libgmp-dev
  libgmpxx4ldbl libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev
  libgnutlsxx28 libgomp1 libgpg-error-dev libgraphite2-3 libgraphite2-dev
  libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk-3-dev libgtk2.0-0
  libgtk2.0-bin libgtk2.0-common libgtk2.0-dev libgtkmm-3.0-1v5
  libgtkmm-3.0-dev libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0
  libharfbuzz0b libice-dev libice6 libicu-dev libidn2-dev libisl22 libitm1
  libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm10 liblsan0 libltdl-dev
  libmail-sendmail-perl libmount-dev libmpc3 libmspack-dev libmspack0 libnspr4
  libnspr4-dev libnss3 libnss3-dev libopengl-dev libopengl0 libp11-kit-dev
  libpam0g-dev libpango-1.0-0 libpango1.0-dev libpangocairo-1.0-0
  libpangoft2-1.0-0 libpangomm-1.4-1v5 libpangomm-1.4-dev libpangoxft-1.0-0
  libpcre16-3 libpcre2-16-0 libpcre2-32-0 libpcre2-dev libpcre2-posix2
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-0 libpixman-1-dev
  libpng-dev libpng-tools libpthread-stubs0-dev librest-0.7-0 librsvg2-2
  librsvg2-common libselinux1-dev libsensors-config libsensors5 libsepol1-dev
  libsigc++-2.0-0v5 libsigc++-2.0-dev libsm-dev libsm6 libsoup-gnome2.4-1
  libssl-dev libstdc++-9-dev libsub-override-perl libsys-hostname-long-perl
  libtasn1-6-dev libtasn1-doc libthai-data libthai-dev libthai0 libtiff5
  libtool libtsan0 libubsan1 libunbound8 libwayland-bin libwayland-client0
  libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-server0
  libwebp6 libx11-dev libx11-xcb1 libxau-dev libxcb-dri2-0 libxcb-dri3-0
  libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-render0-dev libxcb-shm0
  libxcb-shm0-dev libxcb-sync1 libxcb-xfixes0 libxcb1-dev libxcomposite-dev
  libxcomposite1 libxcursor-dev libxcursor1 libxdamage-dev libxdamage1
  libxdmcp-dev libxext-dev libxfixes-dev libxfixes3 libxft-dev libxft2
  libxi-dev libxi6 libxinerama-dev libxinerama1 libxkbcommon-dev libxkbcommon0
  libxml2-dev libxml2-utils libxmlsec1 libxmlsec1-dev libxmlsec1-gcrypt
  libxmlsec1-gnutls libxmlsec1-nss libxmlsec1-openssl libxrandr-dev libxrandr2
  libxrender-dev libxrender1 libxshmfence1 libxslt1-dev libxslt1.1 libxtst-dev
  libxtst6 libxxf86vm1 linux-libc-dev m4 make manpages-dev nettle-dev
  pango1.0-tools pkg-config po-debconf ubuntu-mono uuid-dev wayland-protocols
  x11-common x11proto-dev x11proto-input-dev x11proto-randr-dev
  x11proto-record-dev x11proto-xext-dev x11proto-xinerama-dev
  xorg-sgml-doctools xtrans-dev zlib1g-dev
0 upgraded, 295 newly installed, 0 to remove and 0 not upgraded.
Need to get 106 MB of archives.
After this operation, 1,063 MB of additional disk space will be used.
Get:1 http://jp.ports.ubuntu.com/ubuntu-ports focal/main arm64 hicolor-icon-theme all 0.17-2 [9,976 B]
<略>
Setting up libgtkmm-3.0-dev:arm64 (3.24.2-1build1) ...
Processing triggers for libgdk-pixbuf2.0-0:arm64 (2.40.0+dfsg-3) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
osakanataro@ubuntu-arm:~$

「git clone https://github.com/vmware/open-vm-tools.git」を実行して、open-vm-toolsのソースコードをダウンロードする。

osakanataro@ubuntu-arm:~$ git clone https://github.com/vmware/open-vm-tools.git
Cloning into 'open-vm-tools'...
remote: Enumerating objects: 1286, done.
remote: Counting objects: 100% (1286/1286), done.
remote: Compressing objects: 100% (557/557), done.
remote: Total 55877 (delta 876), reused 1040 (delta 729), pack-reused 54591
Receiving objects: 100% (55877/55877), 21.09 MiB | 5.96 MiB/s, done.
Resolving deltas: 100% (41991/41991), done.
osakanataro@ubuntu-arm:~$

そして「cd open-vm-tools/open-vm-tools/」「autoreconf -i」「./configure」を実行。

osakanataro@ubuntu-arm:~$ cd open-vm-tools/open-vm-tools/
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ autoreconf -i
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:201: installing 'config/compile'
configure.ac:70: installing 'config/config.guess'
configure.ac:70: installing 'config/config.sub'
configure.ac:329: installing 'config/install-sh'
configure.ac:329: installing 'config/missing'
Makefile.am: installing './INSTALL'
checkvm/Makefile.am: installing 'config/depcomp'
lib/guestRpc/Makefile.am:26: warning: 'CFLAGS' is a user variable, you should not override it;
lib/guestRpc/Makefile.am:26: use 'AM_CFLAGS' instead
libappmonitor/Makefile.am:39: warning: source file '$(top_srcdir)/lib/stubs/stub-panic.c' is in a subdirectory,
libappmonitor/Makefile.am:39: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
libappmonitor/Makefile.am:39: warning: source file '$(libappmonitor_rpcchanneldir)/bdoorChannel.c' is in a subdirectory,
libappmonitor/Makefile.am:39: but option 'subdir-objects' is disabled
libappmonitor/Makefile.am:39: warning: source file '$(libappmonitor_rpcchanneldir)/rpcChannel.c' is in a subdirectory,
libappmonitor/Makefile.am:39: but option 'subdir-objects' is disabled
libappmonitor/Makefile.am:39: warning: source file '$(libappmonitor_rpcchanneldir)/glib_stubs.c' is in a subdirectory,
libappmonitor/Makefile.am:39: but option 'subdir-objects' is disabled
libappmonitor/Makefile.am:47: warning: source file '$(libappmonitor_rpcchanneldir)/vsockChannel.c' is in a subdirectory,
libappmonitor/Makefile.am:47: but option 'subdir-objects' is disabled
libappmonitor/Makefile.am:47: warning: source file '$(libappmonitor_rpcchanneldir)/simpleSocket.c' is in a subdirectory,
libappmonitor/Makefile.am:47: but option 'subdir-objects' is disabled
libguestlib/Makefile.am:55: warning: 'CFLAGS' is a user variable, you should not override it;
libguestlib/Makefile.am:55: use 'AM_CFLAGS' instead
libvmtools/Makefile.am:65: warning: source file '$(top_srcdir)/lib/stubs/stub-log.c' is in a subdirectory,
libvmtools/Makefile.am:65: but option 'subdir-objects' is disabled
tests/testDebug/Makefile.am:44: warning: 'CFLAGS' is a user variable, you should not override it;
tests/testDebug/Makefile.am:44: use 'AM_CFLAGS' instead
tests/testPlugin/Makefile.am:44: warning: 'CFLAGS' is a user variable, you should not override it;
tests/testPlugin/Makefile.am:44: use 'AM_CFLAGS' instead
vgauth/lib/Makefile.am:29: warning: source file '../common/audit.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/lib/Makefile.am:29: warning: source file '../common/certverify.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/lib/Makefile.am:29: warning: source file '../common/i18n.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/lib/Makefile.am:29: warning: source file '../common/prefs.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/lib/Makefile.am:29: warning: source file '../common/usercheck.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/lib/Makefile.am:29: warning: source file '../common/VGAuthLog.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/lib/Makefile.am:29: warning: source file '../common/VGAuthUtil.c' is in a subdirectory,
vgauth/lib/Makefile.am:29: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/alias.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/file.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/filePosix.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/netPosix.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/proto.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/random.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:34: warning: source file '../serviceImpl/saml-xmlsec1.c' is in a subdirectory,
vgauth/service/Makefile.am:34: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:36: warning: source file '../serviceImpl/saml-xml-security-c.cpp' is in a subdirectory,
vgauth/service/Makefile.am:36: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/service.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/ticket.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../serviceImpl/verify.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/audit.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/certverify.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/i18n.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/prefs.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/usercheck.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/VGAuthLog.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/VGAuthUtil.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vgauth/service/Makefile.am:20: warning: source file '../common/vmxlog.c' is in a subdirectory,
vgauth/service/Makefile.am:20: but option 'subdir-objects' is disabled
vmblock-fuse/Makefile.am:40: warning: source file '$(top_srcdir)/modules/shared/vmblock/block.c' is in a subdirectory,
vmblock-fuse/Makefile.am:40: but option 'subdir-objects' is disabled
vmblock-fuse/Makefile.am:40: warning: source file '$(top_srcdir)/modules/shared/vmblock/stubs.c' is in a subdirectory,
vmblock-fuse/Makefile.am:40: but option 'subdir-objects' is disabled
vmhgfs-fuse/Makefile.am:38: warning: source file '$(top_srcdir)/lib/stubs/stub-debug.c' is in a subdirectory,
vmhgfs-fuse/Makefile.am:38: but option 'subdir-objects' is disabled
vmhgfs-fuse/Makefile.am:38: warning: source file '$(top_srcdir)/lib/stubs/stub-log.c' is in a subdirectory,
vmhgfs-fuse/Makefile.am:38: but option 'subdir-objects' is disabled
vmhgfs-fuse/Makefile.am:38: warning: source file '$(top_srcdir)/lib/stubs/stub-panic.c' is in a subdirectory,
vmhgfs-fuse/Makefile.am:38: but option 'subdir-objects' is disabled
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ ./configure
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking valgrind/valgrind.h usability... no
checking valgrind/valgrind.h presence... no
checking for valgrind/valgrind.h... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... pkg-config
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for libmspack >= 0.0.20040308alpha (via pkg-config)... yes
checking for glib-2.0 >= 2.34.0 (via pkg-config)... yes
checking for gmodule-2.0 >= 2.34.0 (via pkg-config)... yes
checking for gobject-2.0 >= 2.34.0 (via pkg-config)... yes
checking for gthread-2.0 >= 2.34.0 (via pkg-config)... yes
checking for glib-genmarshal... yes
checking for fuse (via pkg-config)... no
configure: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled.
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking for pam_start in -lpam... yes
checking for BIO_new_file in -lssl... no
checking for openssl >= 1.0.1 (via pkg-config)... yes
checking for strlen in -lxml2... yes
checking xmlsec/xmlsec.h usability... no
checking xmlsec/xmlsec.h presence... no
checking for xmlsec/xmlsec.h... no
checking for xmlsec1-config... /usr/bin/xmlsec1-config
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
configure: WARNING: CUnit not found, tests won't be compiled.
checking for XeviQueryVersion in -lXext... yes
checking for X11/extensions/extutil.h... yes
checking for XineramaQueryVersion in -lXinerama... yes
checking for XOpenDevice in -lXi... yes
checking for XRenderQueryVersion in -lXrender... yes
checking for XRRQueryVersion in -lXrandr... yes
checking for XTestQueryExtension in -lXtst... yes
checking for SmcOpenConnection in -lSM... yes
checking X11/SM/SMlib.h usability... yes
checking X11/SM/SMlib.h presence... yes
checking for X11/SM/SMlib.h... yes
checking X11/ICE/ICElib.h usability... yes
checking X11/ICE/ICElib.h presence... yes
checking for X11/ICE/ICElib.h... yes
checking for XCompositeQueryExtension in -lXcomposite... yes
checking X11/extensions/Xcomposite.h usability... yes
checking X11/extensions/Xcomposite.h presence... yes
checking for X11/extensions/Xcomposite.h... yes
checking for gdk-pixbuf-xlib-2.0 >= 2.21.0 (via pkg-config)... yes
checking for gtk+-3.0 >= 3.0.0 (via pkg-config)... yes
checking for gtkmm-3.0 >= 3.0.0 (via pkg-config)... yes
checking for sigc++-2.0 >= 2.5.1 (via pkg-config)... yes
checking for crypt in -lcrypt... yes
checking for dlopen... no
checking for dlopen in -ldl... yes
checking for ecvt... yes
checking for fcvt... yes
checking for mkdtemp... yes
checking for pthread_mutex_init in -lpthread... yes
checking for g++... yes
checking for libtirpc (via pkg-config)... no
configure: tirpc is needed: no
configure: building without libtirpc
checking for rpcgen... /usr/bin/rpcgen
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking sys/inttypes.h usability... no
checking sys/inttypes.h presence... no
checking for sys/inttypes.h... no
checking sys/io.h usability... no
checking sys/io.h presence... no
checking for sys/io.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking for sys/types.h... (cached) yes
checking for sys/user.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking syslimits.h usability... no
checking syslimits.h presence... no
checking for syslimits.h... no
checking unwind.h usability... yes
checking unwind.h presence... yes
checking for unwind.h... yes
checking for wchar.h... (cached) yes
checking linux/unistd.h usability... yes
checking linux/unistd.h presence... yes
checking for linux/unistd.h... yes
checking for X11/extensions/panoramiXproto.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for struct stat.st_rdev... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working volatile... yes
checking for GCC flag -Wno-pointer-sign... yes
checking for GCC flag -Wno-unused-value... yes
checking for GCC flag -fno-strict-aliasing... yes
checking for GCC flag -Wno-unknown-pragmas... yes
checking for GCC flag -Wno-uninitialized... yes
checking for GCC flag -Wno-deprecated-declarations... yes
checking for GCC flag -Wno-unused-const-variable... yes
checking for GCC flag -fvisibility... yes
checking for GCC flag -Wno-unused-but-set-variable... yes
checking for doxygen... no
configure: WARNING: doxygen not found; API documentation will not be generated.
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUDEV... no
configure: WARNING: Missing libdrm or libudev. The resolutionKMS plugin will search for them at run-time.
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib/appUtil/Makefile
config.status: creating lib/auth/Makefile
config.status: creating lib/backdoor/Makefile
config.status: creating lib/asyncsocket/Makefile
config.status: creating lib/sslDirect/Makefile
config.status: creating lib/pollGtk/Makefile
config.status: creating lib/poll/Makefile
config.status: creating lib/dataMap/Makefile
config.status: creating lib/hashMap/Makefile
config.status: creating lib/dict/Makefile
config.status: creating lib/dynxdr/Makefile
config.status: creating lib/err/Makefile
config.status: creating lib/file/Makefile
config.status: creating lib/foundryMsg/Makefile
config.status: creating lib/glibUtils/Makefile
config.status: creating lib/guestApp/Makefile
config.status: creating lib/guestRpc/Makefile
config.status: creating lib/hgfs/Makefile
config.status: creating lib/hgfsBd/Makefile
config.status: creating lib/hgfsHelper/Makefile
config.status: creating lib/hgfsServer/Makefile
config.status: creating lib/hgfsServerManagerGuest/Makefile
config.status: creating lib/hgfsServerPolicyGuest/Makefile
config.status: creating lib/hgfsUri/Makefile
config.status: creating lib/impersonate/Makefile
config.status: creating lib/lock/Makefile
config.status: creating lib/message/Makefile
config.status: creating lib/misc/Makefile
config.status: creating lib/netUtil/Makefile
config.status: creating lib/nicInfo/Makefile
config.status: creating lib/panic/Makefile
config.status: creating lib/panicDefault/Makefile
config.status: creating lib/procMgr/Makefile
config.status: creating lib/rpcChannel/Makefile
config.status: creating lib/rpcIn/Makefile
config.status: creating lib/rpcOut/Makefile
config.status: creating lib/rpcVmx/Makefile
config.status: creating lib/slashProc/Makefile
config.status: creating lib/string/Makefile
config.status: creating lib/stubs/Makefile
config.status: creating lib/syncDriver/Makefile
config.status: creating lib/system/Makefile
config.status: creating lib/unicode/Makefile
config.status: creating lib/user/Makefile
config.status: creating lib/vmCheck/Makefile
config.status: creating lib/vmSignal/Makefile
config.status: creating lib/wiper/Makefile
config.status: creating lib/xdg/Makefile
config.status: creating services/Makefile
config.status: creating services/vmtoolsd/Makefile
config.status: creating services/plugins/Makefile
config.status: creating services/plugins/appInfo/Makefile
config.status: creating services/plugins/serviceDiscovery/Makefile
config.status: creating services/plugins/desktopEvents/Makefile
config.status: creating services/plugins/dndcp/Makefile
config.status: creating services/plugins/guestInfo/Makefile
config.status: creating services/plugins/hgfsServer/Makefile
config.status: creating services/plugins/powerOps/Makefile
config.status: creating services/plugins/resolutionSet/Makefile
config.status: creating services/plugins/resolutionKMS/Makefile
config.status: creating services/plugins/timeSync/Makefile
config.status: creating services/plugins/vix/Makefile
config.status: creating services/plugins/vmbackup/Makefile
config.status: creating services/plugins/deployPkg/Makefile
config.status: creating vmware-user-suid-wrapper/Makefile
config.status: creating toolbox/Makefile
config.status: creating hgfsclient/Makefile
config.status: creating hgfsmounter/Makefile
config.status: creating checkvm/Makefile
config.status: creating rpctool/Makefile
config.status: creating vgauth/Makefile
config.status: creating vgauth/lib/Makefile
config.status: creating namespacetool/Makefile
config.status: creating vgauth/cli/Makefile
config.status: creating vgauth/test/Makefile
config.status: creating vgauth/service/Makefile
config.status: creating libguestlib/Makefile
config.status: creating libguestlib/vmguestlib.pc
config.status: creating libDeployPkg/Makefile
config.status: creating libDeployPkg/libDeployPkg.pc
config.status: creating libhgfs/Makefile
config.status: creating libvmtools/Makefile
config.status: creating xferlogs/Makefile
config.status: creating modules/Makefile
config.status: creating vmblock-fuse/Makefile
config.status: creating vmhgfs-fuse/Makefile
config.status: creating vmblockmounter/Makefile
config.status: creating tests/Makefile
config.status: creating tests/vmrpcdbg/Makefile
config.status: creating tests/testDebug/Makefile
config.status: creating tests/testPlugin/Makefile
config.status: creating tests/testVmblock/Makefile
config.status: creating docs/Makefile
config.status: creating docs/api/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/build/rpcgen_wrapper.sh
config.status: creating udev/Makefile
config.status: creating libappmonitor/Makefile
config.status: creating libappmonitor/appmonitor.pc
config.status: executing depfiles commands
config.status: executing libtool commands
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$

続いてコンパイル。なぜか、ただのmakeにもsudoしろ、とあるけど、まぁ、マニュアルにそう書いてあるからなぁ・・・

「sudo make」「sudo make install」「sudo ldconfig」

osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo make
[sudo] password for osakanataro:
Making all in lib
make[1]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/lib'
Making all in guestRpc
make[2]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/lib/guestRpc'
/bin/bash ../../scripts/build/rpcgen_wrapper.sh lib/guestRpc/nicinfo.x nicinfo.h
/bin/bash ../../scripts/build/rpcgen_wrapper.sh lib/guestRpc/nicinfo.x nicinfo_xdr.c
/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"11.1.5\" -DPACKAGE_STRING=\"open-vm-tools\ 11.1.5\" -DPACKAGE_BUGREPORT=\"open-vm-tools-devel@lists.sourceforge.net\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DPACKAGE=\"open-vm-tools\" -DVERSION=\"11.1.5\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_X11_SM_SMLIB_H=1 -DHAVE_X11_ICE_ICELIB_H=1 -DHAVE_X11_EXTENSIONS_XCOMPOSITE_H=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -I.   -I/home/osakanataro/open-vm-tools/open-vm-tools/lib/include -I/home/osakanataro/open-vm-tools/open-vm-tools/lib/include  -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DUSE_VGAUTH  -DNO_ICU -DVMX86_TOOLS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DENABLE_RESOLUTIONKMS  -g -O2 -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -Wno-unused -MT libGuestRpc_la-nicinfo_xdr.lo -MD -MP -MF .deps/libGuestRpc_la-nicinfo_xdr.Tpo -c -o libGuestRpc_la-nicinfo_xdr.lo `test -f 'nicinfo_xdr.c' || echo './'`nicinfo_xdr.c
<略>
Making all in docs
make[1]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/docs'
make[2]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/docs'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools/docs'
make[1]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools/docs'
Making all in udev
make[1]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/udev'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools/udev'
make[1]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools'
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$

osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo make install
[sudo] password for osakanataro:
Making install in lib
make[1]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/lib'
Making install in guestRpc
make[2]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/lib/guestRpc'
make[3]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools/lib/guestRpc'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
<略>
/usr/bin/install -c -m 644 ./99-vmware-scsi-udev.rules /lib/udev/rules.d
make[2]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools/udev'
make[1]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools/udev'
make[1]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools'
make[2]: Entering directory '/home/osakanataro/open-vm-tools/open-vm-tools'
make[2]: Nothing to be done for 'install-exec-am'.
/usr/bin/install -c -d /etc/vmware-tools/
/usr/bin/install -c ./tools.conf /etc/vmware-tools/tools.conf.example
make[2]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools'
make[1]: Leaving directory '/home/osakanataro/open-vm-tools/open-vm-tools'
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo ldconfig
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$

で、 /etc/systemd/system/vmtoolsd.service としてopen-vm-tools 起動用ファイルを置く

osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo cat > /etc/systemd/system/vmtoolsd.service << EOF
> [Unit]
> Description=
> Description=Open VM Tools
> After=
> After=network-online.target
> [Service]
> ExecStart=
> ExecStart=/usr/local/bin/vmtoolsd
> Restart=always
> RestartSec=1sec
> [Install]
> WantedBy=multi-user.target
> EOF
-bash: /etc/systemd/system/vmtoolsd.service: Permission denied
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$

おや?なぜかうまくいかない。

viでファイルを作成する方は成功した。

osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo vi /etc/systemd/system/vmtoolsd.service
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ cat /etc/systemd/system/vmtoolsd.service
[Unit]
Description=
Description=Open VM Tools
After=
After=network-online.target
[Service]
ExecStart=
ExecStart=/usr/local/bin/vmtoolsd
Restart=always
RestartSec=1sec
[Install]
WantedBy=multi-user.target
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$

「sudo systemctl enable vmtoolsd」で起動時にopen-vm-toolsが起動されるように設定し、手動で起動することを確認

osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo systemctl enable vmtoolsd
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ systemctl start vmtoolsd
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'vmtoolsd.service'.
Authenticating as: osakanataro
Password:
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ sudo systemctl start vmtoolsd
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$ systemctl status vmtoolsd
● vmtoolsd.service - Open VM Tools
     Loaded: loaded (/etc/systemd/system/vmtoolsd.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-10-08 03:49:27 UTC; 6s ago
   Main PID: 73818 (vmtoolsd)
      Tasks: 3 (limit: 2234)
     Memory: 1.3M
     CGroup: /system.slice/vmtoolsd.service
             mq73818 /usr/local/bin/vmtoolsd

Oct 08 03:49:27 ubuntu-arm systemd[1]: Started Open VM Tools.
osakanataro@ubuntu-arm:~/open-vm-tools/open-vm-tools$

管理画面上でもvmware-toolsの起動を確認。

Outlook2019で iredmail(postfix/dovecot)環境を登録しようとするとエラーになる

$
0
0

Becky!やThunderbird、Windows Live 2012では問題なく動いていたのだが、Outlook 2019(およびOffice 365のOutlook)に対してメールを新規登録した場合、うまく動かない、というクレームがあったので調査

要点

その1: SSL対応するならちゃんとすること

自己署名SSLや、メールサーバとして指定したホスト名がSSL証明書に含まれていないとエラーになる。

Let’s Encryptでやっても良いが、POP3/IMAP/SMTPサーバ名でSSL証明書が発行されていること。

その2: Outlook側の「ユーザー情報」の「名前」が空欄は不許可

ここが空欄になっていると、メール送信がエラー(エラーコード 0x800c8101) になる。

成功例:IMAP設定の場合

上記では送信サーバ(SMTP)のポートが「587」となっているが、プロバイダ側で許可されている場合はポート25でも良い。

成功例:POP3の場合

上記では送信サーバ(SMTP)のポートが「587」となっているが、プロバイダ側で許可されている場合はポート25でも良い。


エラーログ集

SMTPサーバ指定を暗号化なしに設定した場合

使用する暗号化接続の種類を「なし」に設定した場合、エラーになった

Outlook側エラー「テスト電子メール メッセージの送信: このクライアントでサポートされている認証方法が、サーバーでサポートされていません。」

サーバ側のmaillog出力

Oct 13 10:41:28 mailserver postfix/submission/smtpd[16308]: connect from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:41:28 mailserver postfix/submission/smtpd[16308]: lost connection after EHLO from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:41:28 mailserver postfix/submission/smtpd[16308]: disconnect from test.example.com[xxx.xxx.xxx.xxx]

SMTPサーバ指定をSSL/TLSに設定した場合

送信サーバの使用する暗号化接続の種類を「SSL/TLS」に設定した場合もエラーになった。

Outlook側のエラーメッセージ

テスト電子メール メッセージの送信: このサーバーは、指定した種類の接続暗号化をサポートしていません。暗号化方式を変更してください。詳細については、メール サーバーの管理者かインターネット サービス プロバイダー (ISP) に問い合わせてください。

メールサーバ側maillogのエラーメッセージ

Oct 13 10:46:34 mailserver postfix/submission/smtpd[18081]: connect from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:46:34 mailserver postfix/submission/smtpd[18081]: lost connection after UNKNOWN from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:46:34 mailserver postfix/submission/smtpd[18081]: disconnect from test.example.com[xxx.xxx.xxx.xxx]

Windows Live メール 2012で「メッセージを表示できませんでした」となる

$
0
0

メールサーバを管理しているといろんなユーザがいるわけです。

とっくにサポートが切れたWindows Live メール 2012をWindows10上で使っている人、とかね。

そんな人からの問い合わせに対応するために検証用Windows10にWindows Live メールをセットアップしてみたら、メールが表示されない。

「メッセージを表示出来ませんでした」ってなんだ?

いろいろ調査してみると、[オプション]-[メール]-[詳細設定]の「メンテナンス」でどんな状態にあるか確認できるらしい(注:これは調査のための操作なので、特にやる必要はありません)

これの「トラブルシューティング」の「全般」と「メール」にチェックを入れて、「保存先フォルダー」に書かれたディレクトリにあるWindowsLiveMail.log にログが出力されるようになる。

受信トレイのメールをクリックしてみると下記の様な「Zone_MailChk ERROR: (storutil.cpp:3965), failed with 0x800C013E」などのエラーが出力される。

[15:11:00.34] 4138                 Mail:            Zone_MailChk ERROR: (msgfldr.cpp:2741), failed with 0x800C013E  
[15:11:00.34] 4138                 Mail:            Zone_MailChk ERROR: (msgfldr.cpp:905), failed with 0x800C013E  
[15:11:00.34] 4138                 Mail:            Zone_MailChk ERROR: (storutil.cpp:3965), failed with 0x800C013E  

この情報を元に検索したところ、2020/08/26付けの「Windows Live Mail」というマイクロソフトコミュニティの書き込みを発見。

レジストリエディッタで「HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Live Mail」直下にDWORD(32bit)で3つのキーを値「1」で新規作成して、Windowsを再起動してWindows Liveメールを開き直すとメッセージが読めるようになる、と。

作成するDWORDキー
  RecreateFolderIndex
  RecreateStreamIndex
  RecreateUIDLIndex

(該当する3つのキーの値は1回Windows Liveメールを起動することで「0」に戻ります)

この手順を実施したところ、ちゃんとメッセージが読めるようになりました。

最小インストールのCentOS7でブラウザを動かす場合FirefoxとChromeのどっちが容量少ないか

$
0
0

検証環境へのアクセス用ゲートウェイとしてCentOS7をインストールし、その上でWebブラウザを起動させて検証環境内機器の設定画面を開こうとした。

CentOS標準だとFirefoxのパッケージがあり、CentOS+EPELだとchromiumがある。

それぞれ、CentOS7最小インストール状態から「yum install firefox」「yum install chromium」を実行した際に、どんなパッケージが追加されることになるのか確認した。

結論としては
 Firefox  84パッケージ追加、インストール容量324MB
 Chromium 101パッケージ追加、インストール容量504MB
ということで、Firefoxの方が少なかった。

TeraTermの「SSHポート転送」の「Xクライアントアプリケーションの転送」を使う場合は、CentOS7側にxorg-x11-xauthパッケージをインストールしておく必要があるため「yum install xorg-x11-xauth」を実行する必要があった。

そして、日本語表示についてはさらにパッケージを追加する必要があった。

以前調べた「最小インストールのRHEL7環境で文字化けせずにNetBackup管理画面を表示するために必要なパッケージ」の情報が使えるかな?と「yum install vlgothic-fonts vlgothic-p-fonts」でインストールしたところ問題ないような表示となりました。

Firefoxの場合

合計84パッケージが追加され、インストール容量は324MB

# yum info firefox
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.nara.wide.ad.jp
 * epel: epel.uni-sofia.bg
 * extras: ftp.nara.wide.ad.jp
 * updates: ftp.nara.wide.ad.jp
利用可能なパッケージ
名前                : firefox
アーキテクチャー    : i686
バージョン          : 68.12.0
リリース            : 1.el7.centos
容量                : 96 M
リポジトリー        : updates/7/x86_64
要約                : Mozilla Firefox Web browser
URL                 : https://www.mozilla.org/firefox/
ライセンス          : MPLv1.1 or GPLv2+ or LGPLv2+
説明                : Mozilla Firefox is an open-source web browser, designed for standards
                    : compliance, performance and portability.

名前                : firefox
アーキテクチャー    : x86_64
バージョン          : 68.12.0
リリース            : 1.el7.centos
容量                : 93 M
リポジトリー        : updates/7/x86_64
要約                : Mozilla Firefox Web browser
URL                 : https://www.mozilla.org/firefox/
ライセンス          : MPLv1.1 or GPLv2+ or LGPLv2+
説明                : Mozilla Firefox is an open-source web browser, designed for standards
                    : compliance, performance and portability.
#
# yum install firefox
<略>
依存性を解決しました

==================================================================================================================================================================================================
 Package                                                アーキテクチャー                    バージョン                                                 リポジトリー                          容量
==================================================================================================================================================================================================
インストール中:
 firefox                                                x86_64                              68.12.0-1.el7.centos                                       updates                               93 M
依存性関連でのインストールをします:
 adwaita-cursor-theme                                   noarch                              3.28.0-1.el7                                               base                                 641 k
 adwaita-icon-theme                                     noarch                              3.28.0-1.el7                                               base                                  11 M
 at-spi2-atk                                            x86_64                              2.26.2-1.el7                                               base                                  81 k
 at-spi2-core                                           x86_64                              2.28.0-1.el7                                               base                                 158 k
 atk                                                    x86_64                              2.28.1-2.el7                                               base                                 263 k
 avahi-libs                                             x86_64                              0.6.31-20.el7                                              base                                  62 k
 cairo                                                  x86_64                              1.15.12-4.el7                                              base                                 741 k
 cairo-gobject                                          x86_64                              1.15.12-4.el7                                              base                                  26 k
 centos-indexhtml                                       noarch                              7-9.el7.centos                                             base                                  92 k
 colord-libs                                            x86_64                              1.3.4-2.el7                                                base                                 186 k
 cups-libs                                              x86_64                              1:1.6.3-43.el7                                             base                                 358 k
 dconf                                                  x86_64                              0.28.0-4.el7                                               base                                 106 k
 dejavu-fonts-common                                    noarch                              2.33-6.el7                                                 base                                  64 k
 dejavu-sans-fonts                                      noarch                              2.33-6.el7                                                 base                                 1.4 M
 fontconfig                                             x86_64                              2.13.0-4.3.el7                                             base                                 254 k
 fontpackages-filesystem                                noarch                              1.44-8.el7                                                 base                                 9.9 k
 fribidi                                                x86_64                              1.0.2-1.el7_7.1                                            base                                  79 k
 gdk-pixbuf2                                            x86_64                              2.36.12-3.el7                                              base                                 570 k
 glib-networking                                        x86_64                              2.56.1-1.el7                                               base                                 145 k
 gnutls                                                 x86_64                              3.3.29-9.el7_6                                             base                                 680 k
 graphite2                                              x86_64                              1.3.10-1.el7_3                                             base                                 115 k
 gsettings-desktop-schemas                              x86_64                              3.28.0-3.el7                                               base                                 606 k
 gtk-update-icon-cache                                  x86_64                              3.22.30-5.el7                                              base                                  27 k
 gtk2                                                   x86_64                              2.24.31-1.el7                                              base                                 3.4 M
 gtk3                                                   x86_64                              3.22.30-5.el7                                              base                                 4.4 M
 harfbuzz                                               x86_64                              1.7.5-2.el7                                                base                                 267 k
 hicolor-icon-theme                                     noarch                              0.12-7.el7                                                 base                                  42 k
 jasper-libs                                            x86_64                              1.900.1-33.el7                                             base                                 150 k
 jbigkit-libs                                           x86_64                              2.0-11.el7                                                 base                                  46 k
 json-glib                                              x86_64                              1.4.2-2.el7                                                base                                 134 k
 lcms2                                                  x86_64                              2.6-3.el7                                                  base                                 150 k
 libICE                                                 x86_64                              1.0.9-9.el7                                                base                                  66 k
 libSM                                                  x86_64                              1.2.2-2.el7                                                base                                  39 k
 libX11                                                 x86_64                              1.6.7-2.el7                                                base                                 607 k
 libX11-common                                          noarch                              1.6.7-2.el7                                                base                                 164 k
 libXau                                                 x86_64                              1.0.8-2.1.el7                                              base                                  29 k
 libXcomposite                                          x86_64                              0.4.4-4.1.el7                                              base                                  22 k
 libXcursor                                             x86_64                              1.1.15-1.el7                                               base                                  30 k
 libXdamage                                             x86_64                              1.1.4-4.1.el7                                              base                                  20 k
 libXext                                                x86_64                              1.3.3-3.el7                                                base                                  39 k
 libXfixes                                              x86_64                              5.0.3-1.el7                                                base                                  18 k
 libXft                                                 x86_64                              2.3.2-2.el7                                                base                                  58 k
 libXi                                                  x86_64                              1.7.9-1.el7                                                base                                  40 k
 libXinerama                                            x86_64                              1.1.3-2.1.el7                                              base                                  14 k
 libXrandr                                              x86_64                              1.5.1-2.el7                                                base                                  27 k
 libXrender                                             x86_64                              0.9.10-1.el7                                               base                                  26 k
 libXt                                                  x86_64                              1.1.5-3.el7                                                base                                 173 k
 libXtst                                                x86_64                              1.2.3-1.el7                                                base                                  20 k
 libXxf86vm                                             x86_64                              1.1.4-1.el7                                                base                                  18 k
 libepoxy                                               x86_64                              1.5.2-1.el7                                                base                                 211 k
 liberation-fonts-common                                noarch                              1:1.07.2-16.el7                                            base                                  27 k
 liberation-sans-fonts                                  noarch                              1:1.07.2-16.el7                                            base                                 279 k
 libglvnd                                               x86_64                              1:1.0.1-0.8.git5baa1e5.el7                                 base                                  89 k
 libglvnd-egl                                           x86_64                              1:1.0.1-0.8.git5baa1e5.el7                                 base                                  44 k
 libglvnd-glx                                           x86_64                              1:1.0.1-0.8.git5baa1e5.el7                                 base                                 125 k
 libgusb                                                x86_64                              0.2.9-1.el7                                                base                                  40 k
 libjpeg-turbo                                          x86_64                              1.2.90-8.el7                                               base                                 135 k
 libmodman                                              x86_64                              2.0.1-8.el7                                                base                                  28 k
 libproxy                                               x86_64                              0.4.11-11.el7                                              base                                  64 k
 libsoup                                                x86_64                              2.62.2-2.el7                                               base                                 411 k
 libthai                                                x86_64                              0.1.14-9.el7                                               base                                 187 k
 libtiff                                                x86_64                              4.0.3-32.el7                                               base                                 171 k
 libusbx                                                x86_64                              1.0.21-1.el7                                               base                                  61 k
 libwayland-client                                      x86_64                              1.15.0-1.el7                                               base                                  33 k
 libwayland-cursor                                      x86_64                              1.15.0-1.el7                                               base                                  20 k
 libwayland-egl                                         x86_64                              1.15.0-1.el7                                               base                                  13 k
 libwayland-server                                      x86_64                              1.15.0-1.el7                                               base                                  39 k
 libxcb                                                 x86_64                              1.13-1.el7                                                 base                                 214 k
 libxkbcommon                                           x86_64                              0.7.1-3.el7                                                base                                 108 k
 libxshmfence                                           x86_64                              1.2-1.el7                                                  base                                 7.2 k
 mesa-libEGL                                            x86_64                              18.3.4-7.el7_8.1                                           updates                              109 k
 mesa-libGL                                             x86_64                              18.3.4-7.el7_8.1                                           updates                              165 k
 mesa-libgbm                                            x86_64                              18.3.4-7.el7_8.1                                           updates                               39 k
 mesa-libglapi                                          x86_64                              18.3.4-7.el7_8.1                                           updates                               46 k
 mozilla-filesystem                                     x86_64                              1.9-11.el7                                                 base                                 5.3 k
 nettle                                                 x86_64                              2.7.1-8.el7                                                base                                 327 k
 pango                                                  x86_64                              1.42.4-4.el7_7                                             base                                 280 k
 pixman                                                 x86_64                              0.34.0-1.el7                                               base                                 248 k
 rest                                                   x86_64                              0.8.1-2.el7                                                base                                  63 k
 startup-notification                                   x86_64                              0.12-8.el7                                                 base                                  39 k
 trousers                                               x86_64                              0.3.14-2.el7                                               base                                 289 k
 xcb-util                                               x86_64                              0.4.0-2.el7                                                base                                  16 k
 xkeyboard-config                                       noarch                              2.24-1.el7                                                 base                                 834 k

トランザクションの要約
==================================================================================================================================================================================================
インストール  1 パッケージ (+83 個の依存関係のパッケージ)

総ダウンロード容量: 126 M
インストール容量: 324 M
Is this ok [y/d/N]:

Chromiumの場合

合計、101個のパッケージが追加され、504MB

なお、事前に「yum install epel-release」を実行してEPELレポジトリを有効とする必要がある。

# yum info chromium
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.nara.wide.ad.jp
 * epel: mirror.slu.cz
 * extras: ftp.nara.wide.ad.jp
 * updates: ftp.nara.wide.ad.jp
利用可能なパッケージ
名前                : chromium
アーキテクチャー    : x86_64
バージョン          : 85.0.4183.121
リリース            : 1.el7
容量                : 97 M
リポジトリー        : epel/x86_64
要約                : A WebKit (Blink) powered web browser
URL                 : http://www.chromium.org/Home
ライセンス          : BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
説明                : Chromium is an open-source web browser, powered by WebKit (Blink).

# yum install chromium
<略>
依存性を解決しました

==================================================================================================================================================================================================
 Package                                                アーキテクチャー                    バージョン                                                 リポジトリー                          容量
==================================================================================================================================================================================================
インストール中:
 chromium                                               x86_64                              85.0.4183.121-1.el7                                        epel                                  97 M
依存性関連でのインストールをします:
 adwaita-cursor-theme                                   noarch                              3.28.0-1.el7                                               base                                 641 k
 adwaita-icon-theme                                     noarch                              3.28.0-1.el7                                               base                                  11 M
 at-spi2-atk                                            x86_64                              2.26.2-1.el7                                               base                                  81 k
 at-spi2-core                                           x86_64                              2.28.0-1.el7                                               base                                 158 k
 atk                                                    x86_64                              2.28.1-2.el7                                               base                                 263 k
 audit-libs-python                                      x86_64                              2.8.5-4.el7                                                base                                  76 k
 avahi                                                  x86_64                              0.6.31-20.el7                                              base                                 264 k
 avahi-libs                                             x86_64                              0.6.31-20.el7                                              base                                  62 k
 cairo                                                  x86_64                              1.15.12-4.el7                                              base                                 741 k
 cairo-gobject                                          x86_64                              1.15.12-4.el7                                              base                                  26 k
 checkpolicy                                            x86_64                              2.5-8.el7                                                  base                                 295 k
 chromium-common                                        x86_64                              85.0.4183.121-1.el7                                        epel                                  16 M
 colord-libs                                            x86_64                              1.3.4-2.el7                                                base                                 186 k
 cups-libs                                              x86_64                              1:1.6.3-43.el7                                             base                                 358 k
 dconf                                                  x86_64                              0.28.0-4.el7                                               base                                 106 k
 dejavu-fonts-common                                    noarch                              2.33-6.el7                                                 base                                  64 k
 dejavu-sans-fonts                                      noarch                              2.33-6.el7                                                 base                                 1.4 M
 flac-libs                                              x86_64                              1.3.0-5.el7_1                                              base                                 169 k
 fontconfig                                             x86_64                              2.13.0-4.3.el7                                             base                                 254 k
 fontpackages-filesystem                                noarch                              1.44-8.el7                                                 base                                 9.9 k
 fribidi                                                x86_64                              1.0.2-1.el7_7.1                                            base                                  79 k
 gdk-pixbuf2                                            x86_64                              2.36.12-3.el7                                              base                                 570 k
 glib-networking                                        x86_64                              2.56.1-1.el7                                               base                                 145 k
 gnutls                                                 x86_64                              3.3.29-9.el7_6                                             base                                 680 k
 graphite2                                              x86_64                              1.3.10-1.el7_3                                             base                                 115 k
 gsettings-desktop-schemas                              x86_64                              3.28.0-3.el7                                               base                                 606 k
 gsm                                                    x86_64                              1.0.13-11.el7                                              base                                  30 k
 gstreamer1                                             x86_64                              1.10.4-2.el7                                               base                                 1.2 M
 gtk-update-icon-cache                                  x86_64                              3.22.30-5.el7                                              base                                  27 k
 gtk3                                                   x86_64                              3.22.30-5.el7                                              base                                 4.4 M
 harfbuzz                                               x86_64                              1.7.5-2.el7                                                base                                 267 k
 hicolor-icon-theme                                     noarch                              0.12-7.el7                                                 base                                  42 k
 jasper-libs                                            x86_64                              1.900.1-33.el7                                             base                                 150 k
 jbigkit-libs                                           x86_64                              2.0-11.el7                                                 base                                  46 k
 json-glib                                              x86_64                              1.4.2-2.el7                                                base                                 134 k
 lcms2                                                  x86_64                              2.6-3.el7                                                  base                                 150 k
 libICE                                                 x86_64                              1.0.9-9.el7                                                base                                  66 k
 libSM                                                  x86_64                              1.2.2-2.el7                                                base                                  39 k
 libX11                                                 x86_64                              1.6.7-2.el7                                                base                                 607 k
 libX11-common                                          noarch                              1.6.7-2.el7                                                base                                 164 k
 libXau                                                 x86_64                              1.0.8-2.1.el7                                              base                                  29 k
 libXcomposite                                          x86_64                              0.4.4-4.1.el7                                              base                                  22 k
 libXcursor                                             x86_64                              1.1.15-1.el7                                               base                                  30 k
 libXdamage                                             x86_64                              1.1.4-4.1.el7                                              base                                  20 k
 libXext                                                x86_64                              1.3.3-3.el7                                                base                                  39 k
 libXfixes                                              x86_64                              5.0.3-1.el7                                                base                                  18 k
 libXft                                                 x86_64                              2.3.2-2.el7                                                base                                  58 k
 libXi                                                  x86_64                              1.7.9-1.el7                                                base                                  40 k
 libXinerama                                            x86_64                              1.1.3-2.1.el7                                              base                                  14 k
 libXrandr                                              x86_64                              1.5.1-2.el7                                                base                                  27 k
 libXrender                                             x86_64                              0.9.10-1.el7                                               base                                  26 k
 libXtst                                                x86_64                              1.2.3-1.el7                                                base                                  20 k
 libXxf86vm                                             x86_64                              1.1.4-1.el7                                                base                                  18 k
 libasyncns                                             x86_64                              0.8-7.el7                                                  base                                  26 k
 libcanberra                                            x86_64                              0.30-9.el7                                                 base                                  82 k
 libcanberra-gtk3                                       x86_64                              0.30-9.el7                                                 base                                  31 k
 libcgroup                                              x86_64                              0.41-21.el7                                                base                                  66 k
 libepoxy                                               x86_64                              1.5.2-1.el7                                                base                                 211 k
 libglvnd                                               x86_64                              1:1.0.1-0.8.git5baa1e5.el7                                 base                                  89 k
 libglvnd-egl                                           x86_64                              1:1.0.1-0.8.git5baa1e5.el7                                 base                                  44 k
 libglvnd-glx                                           x86_64                              1:1.0.1-0.8.git5baa1e5.el7                                 base                                 125 k
 libgusb                                                x86_64                              0.2.9-1.el7                                                base                                  40 k
 libjpeg-turbo                                          x86_64                              1.2.90-8.el7                                               base                                 135 k
 libmodman                                              x86_64                              2.0.1-8.el7                                                base                                  28 k
 libogg                                                 x86_64                              2:1.3.0-7.el7                                              base                                  24 k
 libproxy                                               x86_64                              0.4.11-11.el7                                              base                                  64 k
 libsemanage-python                                     x86_64                              2.5-14.el7                                                 base                                 113 k
 libsndfile                                             x86_64                              1.0.25-11.el7                                              base                                 149 k
 libsoup                                                x86_64                              2.62.2-2.el7                                               base                                 411 k
 libtdb                                                 x86_64                              1.3.18-1.el7                                               base                                  49 k
 libthai                                                x86_64                              0.1.14-9.el7                                               base                                 187 k
 libtiff                                                x86_64                              4.0.3-32.el7                                               base                                 171 k
 libtool-ltdl                                           x86_64                              2.4.2-22.el7_3                                             base                                  49 k
 libusbx                                                x86_64                              1.0.21-1.el7                                               base                                  61 k
 libvorbis                                              x86_64                              1:1.3.3-8.el7.1                                            base                                 204 k
 libwayland-client                                      x86_64                              1.15.0-1.el7                                               base                                  33 k
 libwayland-cursor                                      x86_64                              1.15.0-1.el7                                               base                                  20 k
 libwayland-egl                                         x86_64                              1.15.0-1.el7                                               base                                  13 k
 libwayland-server                                      x86_64                              1.15.0-1.el7                                               base                                  39 k
 libxcb                                                 x86_64                              1.13-1.el7                                                 base                                 214 k
 libxkbcommon                                           x86_64                              0.7.1-3.el7                                                base                                 108 k
 libxshmfence                                           x86_64                              1.2-1.el7                                                  base                                 7.2 k
 libxslt                                                x86_64                              1.1.28-5.el7                                               base                                 242 k
 mesa-libEGL                                            x86_64                              18.3.4-7.el7_8.1                                           updates                              109 k
 mesa-libGL                                             x86_64                              18.3.4-7.el7_8.1                                           updates                              165 k
 mesa-libgbm                                            x86_64                              18.3.4-7.el7_8.1                                           updates                               39 k
 mesa-libglapi                                          x86_64                              18.3.4-7.el7_8.1                                           updates                               46 k
 minizip                                                x86_64                              1.2.7-18.el7                                               base                                  34 k
 nettle                                                 x86_64                              2.7.1-8.el7                                                base                                 327 k
 nss-mdns                                               x86_64                              0.14.1-9.el7                                               epel                                  43 k
 pango                                                  x86_64                              1.42.4-4.el7_7                                             base                                 280 k
 pixman                                                 x86_64                              0.34.0-1.el7                                               base                                 248 k
 policycoreutils-python                                 x86_64                              2.5-34.el7                                                 base                                 457 k
 pulseaudio-libs                                        x86_64                              10.0-5.el7                                                 base                                 651 k
 python-IPy                                             noarch                              0.75-6.el7                                                 base                                  32 k
 rest                                                   x86_64                              0.8.1-2.el7                                                base                                  63 k
 setools-libs                                           x86_64                              3.3.8-4.el7                                                base                                 620 k
 sound-theme-freedesktop                                noarch                              0.8-3.el7                                                  base                                 377 k
 trousers                                               x86_64                              0.3.14-2.el7                                               base                                 289 k
 xkeyboard-config                                       noarch                              2.24-1.el7                                                 base                                 834 k

トランザクションの要約
==================================================================================================================================================================================================
インストール  1 パッケージ (+100 個の依存関係のパッケージ)

総ダウンロード容量: 147 M
インストール容量: 504 M
Is this ok [y/d/N]:


ちなみに、Chromiumをインストールした後に、Firefoxをインストールしようとした場合に追加されるパッケージ群は下記。

9パッケージで、インストール容量は 238MB

# yum install firefox
<略>

依存性を解決しました

==================================================================================================================================================================================================
 Package                                                アーキテクチャー                      バージョン                                             リポジトリー                            容量
==================================================================================================================================================================================================
インストール中:
 firefox                                                x86_64                                68.12.0-1.el7.centos                                   updates                                 93 M
依存性関連でのインストールをします:
 centos-indexhtml                                       noarch                                7-9.el7.centos                                         base                                    92 k
 gtk2                                                   x86_64                                2.24.31-1.el7                                          base                                   3.4 M
 libXt                                                  x86_64                                1.1.5-3.el7                                            base                                   173 k
 liberation-fonts-common                                noarch                                1:1.07.2-16.el7                                        base                                    27 k
 liberation-sans-fonts                                  noarch                                1:1.07.2-16.el7                                        base                                   279 k
 mozilla-filesystem                                     x86_64                                1.9-11.el7                                             base                                   5.3 k
 startup-notification                                   x86_64                                0.12-8.el7                                             base                                    39 k
 xcb-util                                               x86_64                                0.4.0-2.el7                                            base                                    16 k

トランザクションの要約
==================================================================================================================================================================================================
インストール  1 パッケージ (+8 個の依存関係のパッケージ)

総ダウンロード容量: 97 M
インストール容量: 238 M
Is this ok [y/d/N]:

東京証券取引所arrowheadを止めた設定 on_panic

$
0
0

10月1日に東京証券取引所arrowheadシステムは共有ディスク装置のメモリ障害が起因になって発生したとのこと。

ようやく情報が出そろって何が原因だったのかがわかってきた。

書かれていた情報をまとめると後述のようになる。
(注:Data ONTAP 7G, Data ONTAP 8, ONTAP 9という正式表記がありますがめんどいので全部ONTAPで統一します)

なお、富士通が直接やった案件ではどうなのかわかりませんが、それ以外からNetAppを購入している場合、この設定項目を変更するなんてことはしないので、影響ありません。心配しなくて大丈夫です。

前提条件について

・NetApp FASシリーズのOEMである富士通 NR1000Fを使用している

・NetAppはONTAP OSというOSで動作している

・arrowheadで使用していたNASのOSバージョンは(制御機構バージョン)、初代(2010/01)は 7、2代目(2015/09)は8、今回障害が発生した3代目(2019/11)は9

・ONTAP OSはversion 8からシステムが作り直されておりシステム体系がだいぶ変わった。ただ、いままでの操作を新システムに変換する為の一覧(7-Modeオプションとclustered Data ONTAPコマンドのマッピング)が用意されている

・ONTAP 8は7-modeとClusteredの2種類がある
 7-modeはONTAP 7と同じコマンド体系だが内部はClusteredベース

・ONTAP 8を7-modeかClusteredのどちらで使っていたのか不明
 2代目(2015/09)だと、8.1.x最終バージョンの8.1.4(July 2014)はサポート切れになるので
 September 2014リリースの8.2.2、April 2015リリースの8.2.3?
 7-modeが廃止されてClusteredに一本化されたONTAP 8.3はApril 2015リリース

・ONTAP 7とONTAP 8 Clusteredではサーバの上でNFS/CIFSファイルサービスが動く形式
 管理とファイルサービスは同一サーバ上で動作
 1物理ノード=1ファイルサービス

・ONTAP 8以降は仮想基盤の上でNFS/CIFSサービス用仮想マシン(StorageVM/SVM)が動く形式
 管理とファイルサービスは別扱いで動作
 1つの物理ノードの上で複数のStorageVMを動作可能

設定内容について

・今回問題となった設定は「storage failoverのonpanicオプション」に関するもの

・このオプションに相当するONTAP 7時代の設定はマッピングには「cf.takeover.on_panic」<=>「storage failover modify -onpanic」と記載されている。

・cf.takeover.on_panic設定についてONTAP 7.3.2のドキュメントではデフォルトが「on」となっている(それ以前のバージョンだとデフォルト記載が無い)

・ONTAP 7.xのリリース時期を比較すると、初代稼働が2010/01ということは2009/夏前には試験が始まってそうなので、7.3.2だと時期が早すぎるので、 7.3.1.1 あたりと想定される
 7.3.1: 23 January 2009, 7.3.1.1: April 2009, 7.3.2: Aug 14 2009
 7.3.3: 18 June 2010,7.3.4: 14 March 2011

・ONTAP 7.3時代のマニュアルには「iSCSIライセンスを入れるとcf.takeover.on_panicがonに設定される」という記述もあり、on_panic設定がデフォルト「off」だった時代もあるようだ

・ONTAP 7.3のマニュアルの「Reasons for takeover」にデフォルト「off」と明記。ONTAP7.3.2の同じ箇所にもデフォルトoffと書いてある。どっちなんだよ

・ONTAP 8の7-modeの場合はcf.takeover.on_panicオプションがあるがoff時の説明が「a node panic will not cause an automatic takeover.」に変わっており、「You should not turn this option off unless you are instructed by technical support to do so.」と記載されている。

さて、問題となった設定の「ONTAP7のcf.takeover.on_panic」と「ONTAP8以降のstorage failoverのonpanicオプション」の違いを見てみる

まず、ONTAP 7での「cf.takeover.on_panic

この値は「on」でも「off」でもサービスが切り替わるのは変わらない。

ONTAP 7では相手ノードからの応答が15秒以内になかったら相手が死んだと判断して切り替える、というのが基本となっている。

しかし、PANICが発生し、それがちゃんと検出できた場合は相手が死んでいるのは確定しているので、15秒待たないで切り替えていいんじゃないか?というのが「cf.takeover.on_panic」の扱いになる。

ONTAP 7時代の cf.takeover.on_panic
 on = PANICを検出したら即座に切り替える
 off = 通常の障害検出である15秒待ってから切り替える

ONTAP 8以降ではこのcf.takeover.on_panicオプションは storage failoverのonpanicオプション に置き換えられた、とマッピングに記載されている。

storage failoverのonpanicオプションについて確認するとonrebootオプションとあわせて、「自動テイクオーバーの制御用コマンド」として掲載されている。

役割は「ノードでのパニック」「ノード再起動」が発生した場合に、ストレージサービス(StorageVM)が使用しているストレージを活きているノード上に所有権を移動して継続稼働させるか、というものになっている。

また、この動作の説明はONTAP8 7-mode時のcf.takeover.on_panicに書かれている説明とも合致する。

ONTAP 8以降のstorage failoverのonpanicオプションとONTAP 8 7-modeのcf.takeover.on_panic
 on = 切り替えを行う
 off = 切り替えない

ただ、ここらへんの違いを下記のドキュメント記述だけで判断できるのか?という感じではある。


プレスリリースからの引用

JPX 2020/10/05付け「arrowhead の障害に関する原因と対策について」より

画像
画像

JPX 2020/10/19付け「10月1日に株式売買システムで発生した障害について

富士通 2020/10/19付け「東京証券取引所様の株式売買システム「arrowhead」で発生した障害の原因と対策について」と「[重要]ストレージシステム「ETERNUS NR1000 series」におけるコントローラ自動切替の仕様に関する重要なお知らせ

画像
画像
画像

ONTAP 7.3の「Reasons for takeover

ONTAP 7.3.2の「Reasons for takeover


Viewing all 1101 articles
Browse latest View live