vHoge

VMwareのアレコレ備忘録。CLIでがんばるネタ多め。

VMUG 仮想インフラ部会 2019 年度 #1

VMUG 参加も自分は 2 年目突入。
本年度もよろしくお願いいたします。

Outline

  • 日時:4/5(金) 15:00~
  • 場所:Tintri by DDN
  • 参加人数:25名前後

Agenda

  1. Tintri VMstore 紹介
  2. DDN 紹介 & ラボ見学
  3. メンバ自己紹介
  4. VMUG.com 移行案内
  5. 次回

Tintri VMstore 紹介

  • 仮想環境に特化した NFS アプライアンスストレージ
  • VMware, Hyper-V, RHEV に OpenStack も対応
  • 1Vol 構成、LUN や Volume 設計不要
  • 仮想マシン単位で自動/手動 QoS, IOPS や レイテンシを可視化
    • vCenter からも情報取得しマージして、GUI に表示。
    • vSphere 以外も同じように何かコントロールプレーンと連携するっぽい
  • Storaga vMotion offload
    • Tintri 起点
      • vCenter の Storage vMotion をキックするわけではない
      • vCenter と連携して Storage vMotion の個々のタスクに分解し vCenter にタスクを投げる、ディスク転送部分のみを Tintri 側でオフロードしているイメージ?

仮想化に特化しているだけあって、仮想マシン単位で可視化、QoS コントロールが可能なのは非常に魅力的。
vSphere 環境だと DRS が効く分 CPU ノイジーはかなり緩和できるが、ストレージは Storage DRS があるとは言え、そんなに動かせるものでもないので…
(そもそもノイジー問題に発生してからの Storage vMotion って非現実的?)

ストレージ構成はシンプルなのでストレージ専用チームでなくても運用できそう。
というか、仮想化基盤とセットで面倒見る体制でないとその恩恵にあずかれないかも。

DDN 紹介 & ラボ見学

  • スパコン向けのストレージ
  • 2018/6にIntelよりLustre部門買収
  • EXAScaler/GPIDScaler
  • ユーザは研究機関、メディア配信、クラウド etc
  • ラボは日本、北米、パリに存在
  • ラボ見学
    • 日本ラボでも io-500 に掲載されるクラス https://www.vi4io.org/io500/start
    • 4U で 90 本のニアライン SAS 搭載なエンクロージャ(SS9012?)
      • ノードの上蓋をスライドさせて縦方向にディスクを挿す
      • 1列15本 × 6列で 90本のディスク。壮観
    • 規模の割に省電力らしい
    • Tintri の実機ももちろん存在。かっこいい

スパコン向けストレージということで、なかなか実機に触れる機会が無いがそれに直接さわれるというのは貴重な機会。
(弊社も導入しているとは言え、実機は見たこと無いし)
コスト感の話は出てないのでピンと来ないが、PB クラスになるとそこら辺のストレージとは容量単価で逆転しているらしい?

GPIDScaler なら NFS なのでメリットはさておき、一応 ESXi でもマウント可?

メンバー自己紹介

2019年度初回ということで自己紹介。VUMG メンバーは今回23名。
顔馴染みな人、お久しぶりな人も居る一方で、今回初参加な人も。
特に有休取って個人的趣味として参加しましたという強者がいらっしゃったり。
コミュニティとして活発な証か。
流通系、産業系、金融系、サービス系やSIerと業界も多種多様。
(いないのは行政・自治体系や医療系くらい?)

VMUG.com 移行案内

Japan VMUG のコミュニケーションツールである VMUG 掲示板を
VMUG.com へ移行していきましょうという案内。
ではあるが、さすが仮想インフラ部会。
本日の部会メンバー23人中21人は既に VMUG.com 登録済みという状況。
全部英語で少し大変ではあるが、今後 VMUG 参加を検討しているという人はまずは VMUG.com に登録してみると良いかも?
(日本語登録手順書も準備してあるので、後からそれ見ながら登録でも大丈夫)

次回

6月中旬~下旬頃の予定。
場所はパソナグループ様にて開催予定ということで…ココなのかな?
めちゃめちゃオシャレ…

Usage of deoloyment by OVF Tool #1

OVF Tool での ovf デプロイ

Portability of OVF Toolでサラッと実行してた以下の ovf デプロイ

ovftool -ds=datastore-hdd -dm=thin -nw="None=VM Network" -n="Photon01" --powerOn --noSSLVerify --acceptAllEulas photon-hw11-3.0-26156e2.ova vi://administrator@vsphere.local:hogehoge@192.168.0.50/home01/host/cls01/192.168.0.51

オプション組み立てが分かってないと何を指定すれば良いのやら…
使い方は公式ドキュメント参照なのだが、
少し掻い摘んでデプロイについての Tips を書いてみる。

超基本 Usage of ovftool

コマンドのヘルプ。全文は長いので折りたたみに。(←最近やり方知った)

ovftool --help

% ovftool --help                                                                                                  
Usage: ovftool [options] <source> [<target>]
where
<source>: Source URL locator to an OVF package, VMX file, or virtual machine in
          vCenter or on ESX Server. 
<target>: Target URL locator which specifies either a file location, or a 
          location in the vCenter inventory or on an ESX Server. 

If <target> is not specified, information about the source is displayed to the 
console. 

Options:
     --acceptAllEulas            : Accept all end-user licenses agreements 
                                   without being prompted. 
     --allowAllExtraConfig       : Whether we allow all the ExtraConfig 
                                   options. These options are a security risk 
                                   as they control low-level and potential 
                                   unsafe options on the VM. 
     --allowExtraConfig          : Whether we allow ExtraConfig options in 
                                   white list. These options are safe as we 
                                   have a white list to filter out the 
                                   low-level and potential unsafe options on 
                                   the VM. 
     --annotation                : Add annotation to vi, vmx, vapprun, vCloud, 
                                   OVF, and OVA source locators 
     --authdPortSource           : Use this to override default vmware authd 
                                   port (902) when using a host as source. 
     --authdPortTarget           : Use this to override default vmware authd 
                                   port (902) when using a host as target. 
     --chunkSize                 : Specifies the chunk size to use for files in
                                   a generated OVF package. The default is not 
                                   to chunk. The chunk size without unit is 
                                   assumed to be in megabytes. Accepted units 
                                   are b, kb, mb, gb; e.g., 2gb or 100kb. 
     --compress                  : Compress the disks in an OVF package. Value 
                                   must be between 1 and 9. 1 is the fastest, 
                                   but gives the worst compression, whereas 9 
                                   is the slowest, but gives the best 
                                   compression. 
     --computerName              : Sets the computer name in the guest for a VM
                                   using the syntax --computerName:<VM 
                                   ID>=<value>. Only applies to vCloud targets 
                                   version 5.5 or newer. 
     --coresPerSocket            : Specifies the distribution of the total 
                                   number of CPUs over a number of virtual 
                                   sockets using the syntax 
                                   --coresPerSocket:<VM ID>=<value>. Only 
                                   applies to vCloud targets version 5.5 or 
                                   newer. 
 -ds/--datastore                 : Target datastore name for a VI locator.
     --decodeBase64              : Decode option values with Base64.
     --defaultStorageProfile     : The storage profile for all VMs in the OVF 
                                   package. The value should be an SPBM profile
                                   ID. Only applies to VI targets version 5.5 
                                   or newer. 
     --defaultStorageRawProfile  : The storage profile for all VMs in the OVF 
                                   package. The value should be raw SPBM 
                                   profile. The value will overwrite that in 
                                   --defaultStorageProfile. Only applies to VI 
                                   targets version 5.5 or newer. 
     --deploymentOption          : Selects what deployment option to use (if 
                                   the source OVF package supports multiple 
                                   options.) 
     --disableVerification       : Skip validation of signature and 
                                   certificate. 
 -dm/--diskMode                  : Select target disk format. Supported formats
                                   are: monolithicSparse, monolithicFlat, 
                                   twoGbMaxExtentSparse, twoGbMaxExtentFlat, 
                                   seSparse (VI target), eagerZeroedThick (VI 
                                   target), thin (VI target), thick (VI 
                                   target), sparse, and flat 
     --diskSize                  : Sets the size of a VM disk in megabytes 
                                   using the syntax --diskSize:<VM ID>,<disk 
                                   instance ID>=<value>. Only applies to vCloud
                                   targets version 5.5 or newer. 
     --eula                      : EULA to be inserted in the first virtual 
                                   system or virtual system collection in the 
                                   OVF. If the EULA is in a file, use the 
                                   option --eula@=filename instead. 
     --exportDeviceSubtypes      : Enables export of resource subtype for 
                                   CD/Floppy/Parallel/Serial devices. This can 
                                   limit portability as not all device backings
                                   are supported on all hypervisors. The 
                                   default is false. 
     --exportFlags               : Specifies one or more export flags to 
                                   control what gets exported. The supported 
                                   values for VI sources are mac, uuid, and 
                                   extraconfig. Supported value for vCloud 
                                   sources are preserveIdentity. One or more 
                                   options can be provided, separated by 
                                   commas. 
     --extraConfig               : Sets an ExtraConfig element for all 
                                   VirtualHardwareSections. The syntax is 
                                   --extraConfig:<key>=<value>. Applies to vi, 
                                   vmx, vapprun, vCloud, ovf, and ova source 
                                   locators. 
     --fencedMode                : If a parent network exists on the vCloud 
                                   target, this property specifies the 
                                   connectivity to the parent. Possible values 
                                   are bridged, isolated, and natRouted. 
 -h /--help                      : Prints this message.
     --hideEula                  : In OVF probe mode, hides the EULA.
     --ipAllocationPolicy        : IP allocation policy for a deployed OVF 
                                   package.Supported values are: dhcpPolicy, 
                                   transientPolicy, fixedPolicy, 
                                   fixedAllocatedPolicy. 
     --ipProtocol                : Select what IP protocol to use (IPv4, IPv6).
     --lax                       : Relax OVF specification conformance and 
                                   virtual hardware compliance checks. Use only
                                   if you know what you are doing. 
     --locale                    : Selects locale for target.
     --machineOutput             : Output OVF Tool messages in a machine 
                                   friendly manner. 
     --makeDeltaDisks            : Build delta disk hierarchy from the given 
                                   source locator. 
     --maxVirtualHardwareVersion : The maximal virtual hardware version to 
                                   generate. 
     --memorySize                : Sets the memory size in megabytes of a VM 
                                   using the syntax --memorySize:<VM 
                                   ID>=<value>. Only applies to vCloud targets 
                                   version 5.5 or newer. 
 -n /--name                      : Specifies target name (defaults to source 
                                   name). 
     --net                       : Set a network assignment in the deployed OVF
                                   package. A network assignment is set using 
                                   the syntax --net:<OVF name>=<target name>. 
                                   If the target is vCloud 5.5 or newer, a 
                                   fence mode can also be specified using the 
                                   syntax --net:<OVF name>=<target name>,<fence
                                   mode>. Possible fence mode values are: 
                                   bridged, isolated, and natRouted. 
 -nw/--network                   : Target network for a VI deployment.
     --nic                       : Specifies NIC configuration in a VM using 
                                   the syntax --nic:<VM ID>,<index>=<OVF net 
                                   name>,<isPrimary>,<ipAddressingMode>,<ipAddress>.
                                   Possible values for ipAddressingMode are: 
                                   DHCP, POOL, MANUAL, and NONE. ipAddress is 
                                   optional and should only be used when 
                                   ipAddressingMode is set to MANUAL. Only 
                                   applies to vCloud targets version 5.5 or 
                                   newer. 
     --noDisks                   : Disable disk conversion.
     --noImageFiles              : Do not include image files in destination.
     --noSSLVerify               : Skip SSL verification for VI connections.
     --numberOfCpus              : Sets the number of CPUs for a VM using the 
                                   syntax --numberOfCpus:<VM ID>=<value>. Only 
                                   applies to vCloud targets version 5.5 or 
                                   newer. 
 -o /--overwrite                 : Force overwrites of existing files.
     --powerOffSource            : Ensures a VM/vApp is powered off before 
                                   importing from a VI source. 
     --powerOffTarget            : Ensures a VM/vApp is powered off before 
                                   overwriting a VI target. 
     --powerOn                   : Powers on a VM/vApp deployed on a VI target.
     --privateKey                : Sign OVF package with the given private key 
                                   (.pem file). The file must contain a private
                                   key and a certificate. 
     --privateKeyPassword        : Password for the private key. Should be used
                                   in conjunction with privateKey if the 
                                   private key requires password 
                                   authentication. If required and not 
                                   specified, the tool will prompt for the 
                                   password. 
     --prop                      : Set a property in the deployed OVF package. 
                                   A property is set using the syntax 
                                   --prop:<key>=<value>. 
     --proxy                     : Proxy used for HTTP[S] access.
     --proxyNTLMAuth             : Enable NTLM authentication for proxy.
 -q /--quiet                     : No output to screen except errors.
     --schemaValidate            : Validate OVF descriptor against OVF schema.
     --shaAlgorithm              : Select SHA digest algorithm when creating 
                                   OVF package. Supported values are SHA1, 
                                   SHA256 and SHA512. Default value is SHA256. 
     --skipManifestCheck         : Skip validation of OVF package manifest.
     --skipManifestGeneration    : Skip generation of OVF package manifest.
     --sourcePEM                 : File path to PEM formatted file used to 
                                   verify VI connections. 
     --sourceSSLThumbprint       : SSL fingerprint of SOURCE. OVF Tool verifies
                                   the SSL fingerprint it gets from SOURCE if 
                                   the value is set. 
 -st/--sourceType                : Explicitly express that source is OVF, OVA, 
                                   VMX, VI, vCloud, ISO, FLP, vApprun 
     --sslCipherList             : Use this to override default OpenSSL ciphers
                                   suite. 
     --sslVersion                : Use this to set preferred TLS/SSL version 
                                   for HTTPS connections. The valid values are 
                                   as following: 
                                     TLSv1_0: Set preferred TLS/SSL version to 
                                   TLSv1.0. 
                                     TLSv1_1: Set preferred TLS/SSL version to 
                                   TLSv1.1. 
                                     TLSv1_2: Set preferred TLS/SSL version to 
                                   TLSv1.2. 
     --storageProfile            : Sets the storage profile for a VM using the 
                                   syntax --storageProfile:<VM ID>=<value>. 
                                   Only applies to vCloud targets version 5.5 
                                   or newer. 
     --targetPEM                 : File path to PEM formatted file used to 
                                   verify VI connections. 
     --targetSSLThumbprint       : SSL fingerprint of TARGET. OVF Tool verifies
                                   the SSL fingerprint it gets from TARGET if 
                                   the value is set. 
 -tt/--targetType                : Explicitly express that target is OVF, OVA, 
                                   VMX, VI, vCloud, ISO, FLP, vApprun 
     --vCloudTemplate            : Create only a vApp template. Default value 
                                   is false 
     --vService                  : Set a vService assignment in the deployed 
                                   OVF package. A vService assignment is set 
                                   using the syntax 
                                   --vService:<dependencyId>=<providerId>. 
     --verifyOnly                : Do not upload the source but only verify it 
                                   against the target host. Applies to VI 4 
                                   targets only. 
 -v /--version                   : Prints the version of this tool.
     --viCpuResource             : Specify the CPU resource settings for 
                                   VI-locator targets. The syntax is 
                                   --viCpuResource=<shares>:<reservation>:<limit>.
     --viMemoryResource          : Specify the CPU resource settings for 
                                   VI-locator targets. The syntax is 
                                   --viMemoryResource=<shares>:<reservation>:<limit>.
 -vf/--vmFolder                  : Target VM folder in VI inventory (relative 
                                   to datacenter). 

For more help, type: --help <topic>, where topics are:
 locators    : For detailed source and destination locator syntax
 examples    : For examples of use
 config      : For syntax of configuration files
 debug       : For debug purpose
 integration : For a list of options primarily used when ovftool is exec'ed 
               from another tool or shellscript. 

基本 Usage は以下。

% ovftool [options] <source> [<target>]

Photon の実行例で見ると --hoge はオプションなので、基本形は以下となっている。

ovftool [options] photon-hw11-3.0-26156e2.ova vi://administrator@vsphere.local:hogehoge@192.168.0.50/home01/host/cls01/192.168.0.51

OVF デプロイで言うと、source は ova なので対象のファイル(パス)photon-hw11-3.0-26156e2.ovaが指定してある。
target にはデプロイ先 vCenter のインベントリパスを指定。
インンベントリパスについてはフルで理解しようとするとインベントリ階層(この辺)を理解する必要があるが、端的には以下で理解しておけば大概は困らないかと…

vi://[ユーザ名]:[パスワード]@[vCenter FQDN or IP]/[Datacenter]/host/[cluster]/[host]
* ユーザ名、パスワードは省略可(実行時に対話的入力になる)

基本 Usage of ovftool

source と target 指定すればあとはオプションだからいけるやろー
というとそうでもない。
OVF エクスポートとかも含めコマンドとしてのオプションであって、
OVF デプロイを行う場合、ovf に応じて必須なオプションがあったりする。
大概の場合だと以下の2つ。

 -ds/--datastore                 : Target datastore name for a VI
 -nw/--network                   : Target network for a VI deployment.

--dsは Datastore 名の指定。
当然ながらデプロイ先のホストから見える Datastore でないとエラーでコケる。
--nwは PortGroup 名の指定。
VM をどの NW に接続させるかの指定で、当然ながらデプロイ先ホストから見える必要がある。
-nw="None=VM Network"と指定しまったが、別に-nw="VM Network"だけでいける。
(この指定の仕方が必要なときはまた追々…)

あとは必須ではないがあると楽なオプション。
--acceptAllEulasは無いと長々と EULA 出てくるので操作的にはうんざりします。。。

-dm/--diskMode                  : Select target disk format. Supported formats
                                  are: monolithicSparse, monolithicFlat, 
                                  twoGbMaxExtentSparse, twoGbMaxExtentFlat, 
                                  seSparse (VI target), eagerZeroedThick (VI 
                                  target), thin (VI target), thick (VI 
                                  target), sparse, and flat 
-n /--name                      : Specifies target name (defaults to source 
                                                                    name).
     --powerOn                   : Powers on a VM/vApp deployed on a VI target. 
     --noSSLVerify               : Skip SSL verification for VI connections.     
     --acceptAllEulas            : Accept all end-user licenses agreements 
                                   without being prompted.  

これで完璧?

PhotonOS の OVA はこれでいくらでもデプロイし放題。
ただ PhotonOS の OVA 自体はデプロイオプションとしては簡単な部類で、
vApp オプションを使っている OVA だともう少し厄介。

その辺の話は別記事にて。

Portability of OVF Tool

OVF Tool とは

OVF のエクスポートやデプロイを CLI から行うツールで、
Windows / Mac / Linux 版が配布されており、 My VMware より無償で入手できる。
https://www.vmware.com/support/developer/ovf/

Linux(CLI) 環境での作業が多い自分としては欠かせないツールの一つ。
これの使い方アレコレで色々書けるが、その前に実行バイナリの配備についてのネタ。

Installation...

OVF Tool ですが、配布が上記の公式サイトのみでインストーラ形式での配布となっている。
OVF Toolの配布
Linux の .bundle は 500 行程度のシェルスクリプトヘッダ + アーカイブ?のバイナリ。
  offset 計算とかして切り出して実行とかやっているっぽい。

で、このインストールが root 権限を求めてきたり…

% ./VMware-ovftool-4.3.0-7948156-lin.x86_64.bundle --console
Extracting VMware Installer...done.
root access is required for the operations you have chosen.

/usr/bin/usr/lib下にインストールを行ったり…

% sudo ./VMware-ovftool-4.3.0-7948156-lin.x86_64.bundle --console --eulas-agreed
Extracting VMware Installer...done.
The product is ready to be installed.  Press Enter to begin
installation or Ctrl-C to cancel.

Installing VMware OVF Tool component for Linux 4.3.0
    Configuring...
[######################################################################] 100%
Installation was successful.
% sudo find /* -name "*ovftool*"
/etc/vmware-installer/components/vmware-ovftool
/etc/vmware-installer/components/vmware-ovftool/4.3.0/vmware-ovftool.pyc
/etc/vmware-installer/components/vmware-ovftool/4.3.0/vmware-ovftool.py
/usr/lib/vmware-ovftool
/usr/lib/vmware-ovftool/ovftool
/usr/lib/vmware-ovftool/ovftool.bin
/usr/lib/vmware-ovftool/env/ovftool-hw14-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw11-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw8-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw12-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw4-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw7-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw3-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw10-config-option.xml
/usr/lib/vmware-ovftool/env/en/ovftool.vmsg
/usr/lib/vmware-ovftool/env/en/ovftool-warning.vmsg
/usr/lib/vmware-ovftool/env/ovftool-hw9-config-option.xml
/usr/lib/vmware-ovftool/env/ovftool-hw13-config-option.xml
/usr/bin/ovftool

rpmdebでは無く、vmware-installerという個別のパッケージ管理(?)だったり…
どうしても環境を汚してしまう一品。

一応インストール先は-pオプションで指定できるが、
vmware-installerの残骸周りを/etcの下に残してしまう。

本当に必要なもの

インストーラでどうのこのと仰々しいが、実は本当に必要なものは
/usr/lib/vmware-ovftool下一式のみ。
なので、実はそこだけ持っていけば動く。
試しにインストールしたホストとは違うホストへscpする。

% scp -r user@InstalledHost:/usr/lib/vmware-ovftool ./

動作確認として Photon OSOVA をデプロイしてみる。

% vmware-ovftool/ovftool -ds=datastore-hdd -dm=thin -nw="None=VM Network" -n="Photon01" --powerOn --noSSLVerify --acceptAllEulas photon-hw11-3.0-26156e2.ova vi://administrator@vsphere.local:hogehoge@192.168.0.50/home01/host/cls01/192.168.0.51
Opening OVA source: photon-hw11-3.0-26156e2.ova
The manifest validates
Source is signed and the certificate validates
Opening VI target: vi://administrator%40vsphere.local@192.168.0.50:443/home01/host/cls01/192.168.0.51
Deploying to VI: vi://administrator%40vsphere.local@192.168.0.50:443/home01/host/cls01/192.168.0.51
Transfer Completed
Powering on VM: Photon01
Task Completed
Completed successfully

問題なくデプロイまで完了。
どこかのホストにインストールだけして、そこから抜き出せばいい感じ。

Windows 版は…

インストーラ
これもインストール自体は求められるが、同じ要領でいけそうか?
手元に Windows 環境複数は無いので、ひとまず違う場所にコピーしてみる。

C:\>XCOPY "C:\Program Files\VMware\VMware OVF Tool" "D:\VMware OVF Tool" /s
D:\VMware OVF Tool は受け側のファイル名ですか、
またはディレクトリ名ですか
(F= ファイル、D= ディレクトリ)? D
VMware OVF Tool\expat.dll
VMware OVF Tool\googleurl.dll
VMware OVF Tool\icudt58.dll
VMware OVF Tool\icuuc58.dll
VMware OVF Tool\libcurl.dll
VMware OVF Tool\libeay32.dll
VMware OVF Tool\open_source_licenses.txt
VMware OVF Tool\ovftool.exe
VMware OVF Tool\README.txt
VMware OVF Tool\ssleay32.dll
VMware OVF Tool\ssoclient.dll
VMware OVF Tool\vim-types.dll
VMware OVF Tool\vmacore.dll
VMware OVF Tool\vmomi.dll
VMware OVF Tool\vmware-eula.rtf
VMware OVF Tool\vmware.eula
VMware OVF Tool\xerces-c_3_1.dll
VMware OVF Tool\zlib1.dll
VMware OVF Tool\env\defloc.vlcl
VMware OVF Tool\env\iso2psx.vlcl
VMware OVF Tool\env\iso2win.vlcl
VMware OVF Tool\env\isodata.vlcl
VMware OVF Tool\env\loc2iso.vlcl
VMware OVF Tool\env\ovftool-hw10-config-option.xml
VMware OVF Tool\env\ovftool-hw11-config-option.xml
VMware OVF Tool\env\ovftool-hw12-config-option.xml
VMware OVF Tool\env\ovftool-hw13-config-option.xml
VMware OVF Tool\env\ovftool-hw14-config-option.xml
VMware OVF Tool\env\ovftool-hw3-config-option.xml
VMware OVF Tool\env\ovftool-hw4-config-option.xml
VMware OVF Tool\env\ovftool-hw7-config-option.xml
VMware OVF Tool\env\ovftool-hw8-config-option.xml
VMware OVF Tool\env\ovftool-hw9-config-option.xml
VMware OVF Tool\env\en\action.vmsg
VMware OVF Tool\env\en\alarm.vmsg
VMware OVF Tool\env\en\auth.vmsg
VMware OVF Tool\env\en\cluster.vmsg
VMware OVF Tool\env\en\default.vmsg
VMware OVF Tool\env\en\enum.vmsg
VMware OVF Tool\env\en\evc.vmsg
VMware OVF Tool\env\en\event.vmsg
VMware OVF Tool\env\en\eventaux.vmsg
VMware OVF Tool\env\en\fault.vmsg
VMware OVF Tool\env\en\gos.vmsg
VMware OVF Tool\env\en\host.vmsg
VMware OVF Tool\env\en\locmsg.vmsg
VMware OVF Tool\env\en\option.vmsg
VMware OVF Tool\env\en\ovftool-warning.vmsg
VMware OVF Tool\env\en\ovftool.vmsg
VMware OVF Tool\env\en\perf.vmsg
VMware OVF Tool\env\en\question.vmsg
VMware OVF Tool\env\en\stask.vmsg
VMware OVF Tool\env\en\task.vmsg
VMware OVF Tool\env\en\vm.vmsg
VMware OVF Tool\schemas\DMTF\CIM_ResourceAllocationSettingData.xsd
VMware OVF Tool\schemas\DMTF\CIM_VirtualSystemSettingData.xsd
VMware OVF Tool\schemas\DMTF\common.xsd
VMware OVF Tool\schemas\DMTF\dsp8023.xsd
VMware OVF Tool\schemas\DMTF\dsp8027.xsd
VMware OVF Tool\schemas\DMTF\xml.xsd
VMware OVF Tool\schemas\vmware\ovf-vmware.xsd
VMware OVF Tool\schemas\vmware\ovfenv-vmware.xsd
62 個のファイルをコピーしました

コピー終わったら元の本体はアンインスール。
再び OVA デプロイ実験。

D:\VMware OVF Tool>ovftool.exe -ds="datastore-hdd" -dm=Thin -nw="None=VM Network" -n="Photon02" --powerOn --noSSLVerify --acceptAllEulas D:\photon-hw11-3.0-26156e2.ova vi://administrator@vsphere.local:hogehoge@192.168.0.50/home01/host/cls01/192.168.0.51
Opening OVA source: D:\photon-hw11-3.0-26156e2.ova
The manifest validates
Source is signed and the certificate validates
Opening VI target: vi://administrator%40vsphere.local@192.168.0.50:443/home01/host/cls01/192.168.0.51
Deploying to VI: vi://administrator%40vsphere.local@192.168.0.50:443/home01/host/cls01/192.168.0.51
Transfer Completed
Powering on VM: Photon02
Task Completed
Completed successfully

いける。
こちらもどこかの Windows を犠牲にインストール先ディレクトリだけ持っていけば良さげ。

Mac

試せる環境ないので割愛。
Linux 版と同じ感じでいけそうな気はする。

邪道?な技

実はわざわざどこかにインストールとかしなくても入手する方法がある。
それは vCenter Server Appliance 6.0 の ISO イメージ。

% sudo mount -t iso9660 -o loop /tmp/VMware-VCSA-all-6.0.0-9451619.iso /mnt/cdrom 
mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
% find /mnt/cdrom/vcsa-cli-installer/ -name ovftool
./lin64/ovftool
./lin64/ovftool/ovftool
./mac/VMware OVF Tool/ovftool
./win32/ovftool

vCSA の VMOVA デプロイ。
そのデプロイ用の OVF Tool がディレクトリで存在しているので、
これを抜き出してもそのまま使える。

残念ながら vCSA 6.5 以降はvcsa-deployのバイナリの中に統合された?らしく、
OVF Tool の一式は無くなっている。

CLI 環境から vCSA をデプロイする

vCenter Server Apliance のデプロイ

5.x 時代はただの OVA で、各種設定はコンソールや VAMI で投入してようやく動いていた具合で割と面倒。
それが 6.0 になって html + (謎の)クライアント統合プラグインでの GUI デプロイで大分楽になり、6.5/6.7 は専用 exe による GUI デプロイで、クライアントにプラグインを追加することなくデプロイできるように。
特に何事もなければそれを使っている人が多そう。

GUI ベースだったら特にそれで問題ないんですが、
作業環境が Linux(CUI) 環境が主だったり、 GUI 環境は共用なので クライアント統合プラグインのインストールで環境汚すのが…
みたいな話などなど、 GUI デプロイはなぁ…という状況に対応できるようなツールとして
CLI 用のデプロイツールvcsa-cli-installerがあったりします。

自分はすっかりこちらに慣れてしまったおかげで、
最近は GUI あろうとなかろうとコレでデプロイしています。
なんだかんだでファイルにパラメータが残っているとレビューや振り返りがしやすい。

ちなみに別に Linux に限らず、WindowsMac でもそれぞれに対応したバイナリがあります。

vcsa-cli-installer のありか

vCSA の ISO イメージの中に入ってます。

% sudo mount -t iso9660 -o loop /tmp/VMware-VCSA-all-6.7.0-11726888.iso /mnt/cdrom 
mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
% ls /mnt/cdrom
dbschema/             readme-de.txt*  readme-fr.txt*  readme-ko.txt*     readme-zh-TW.txt*  umds/  vcsa-cli-installer/  vcsa-ui-installer/
migration-assistant/  readme-es.txt*  readme-ja.txt*  readme-zh-CN.txt*  readme.txt*        vcsa/  vcsa-converge-cli/

中身を取り出す際はvcsa-cli-installerディレクトリだけ持って行ってもダメで、
ISO イメージ直下をまるごともっていく必要があります。
※ vCSA の ova 自体がvcsaディレクトリ下にあったり、他も何か使われていそう…(?)

デプロイの流れ

  1. 設定用 json ファイル作成
  2. vcsa-cli-installer

設定用 json ファイル作成

GUI で入力しているパラメータ値はあらかじめ json ファイルに記述しておく。
json ファイルのテンプレートが以下のディレクトリにあるので、それを埋めていく。

% ls ./vcsa-cli-installer/templates
install/  migrate/  upgrade/

新規インストール、Windows 版 vCenterServer からのマイグレーション、アップグレードでそれぞれ異なる。

さらに

% ls /mnt/cdrom/vcsa-cli-installer/templates/install 
PSC_first_instance_on_ESXi.json*  PSC_replication_on_ESXi.json*  embedded_vCSA_on_ESXi.json*  embedded_vCSA_replication_on_ESXi.json*  vCSA_on_ESXi.json*
PSC_first_instance_on_VC.json*    PSC_replication_on_VC.json*    embedded_vCSA_on_VC.json*    embedded_vCSA_replication_on_VC.json*    vCSA_on_VC.json*

インスール形態で微妙に template が変わってくる。

  • embedded_* ・・・ vCenter と Platform Services Controller を同じ VM にデプロイ
  • PSC_* ・・・ Platform Services Controller のみが稼働する VM をデプロイ
  • vCSA_* ・・・ vCenter のみが稼働する VM をデプロイ
  • _first* ・・・ Primary となる VM をデプロイ (多分 vCenter HA)
  • _replication* ・・・ レプリカ先となる VM をデプロイ (多分 vCenter HA)
  • *_on_ESXi.json ・・・ ESXi 上に直で vCSA VM をデプロイ
  • *_on_VC.json ・・・ どこかの vCenter 管理下に vCSA VM をデプロイ

アップレードやマイグレーションについても大体同じ prefix ルール。

ちなみにこの json 、メジャーバージョンや Update 、時にはマイナーバージョンでも
書式が変わっていることがあり、異バージョン間での互換性は無いので注意…
基本的には再利用は考えず、テンプレートから作っていく方が無難。

バージョンの見分け方は json 内に書いてある通り。

{
    "__version": "2.13.0", ←←←←← コレ
    "__comments": "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.",
    "new_vcsa": {
        "esxi": {
            "hostname": "<FQDN or IP address of the ESXi host on which to deploy the new appliance>",
            "username": "root",
            【以下略】

vcsa-cli-installer の実行

vcsa-cli-installerディレクトリ下に各 OS 毎のバイナリvcsa-deployがあるので、
作成した json とその他もろもろをオプションに与える感じでバイナリを叩く。

自信があれば一発実行で良いが、json の validation check や
dry run を行うだけのオプションもあったりするので、事前に試してみた方が確実かと。
細かい usage は--helpを参照だが、とりあえず--accept-eulaはしないと始まらない。

今回使った embedded_vCSA_on_ESXi.json

{
    "__version": "2.13.0",
    "__comments": "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.",
    "new_vcsa": {
        "esxi": {
            "hostname": "192.168.0.51",
            "username": "root",
            "password": "esxihogehoge",
            "deployment_network": "VM Network",
            "datastore": "datastore-hdd"
        },
        "appliance": {
            "__comments": [
                "You must provide the 'deployment_option' key with a value, which will affect the VCSA's configuration parameters, such as the VCSA's number of vCPUs, the memory size, the storage size, and the maximum numbers of ESXi hosts and VMs which can be managed. For a list of acceptable values, run the supported deployment sizes help, i.e. vcsa-deploy --supported-deployment-sizes"
            ],
            "thin_disk_mode": true,
            "deployment_option": "small",
            "name": "Embedded-vCenter-Server-Appliance"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "ip": "192.168.0.50",
            "dns_servers": [
                "192.168.0.52"
            ],
            "prefix": "24",
            "gateway": "192.168.0.1",
            "system_name": "vcsa01.home.lab"
        },
        "os": {
            "password": "osfugafuga",
            "ntp_servers": "time.nist.gov",
            "ssh_enable": true
        },
        "sso": {
            "password": "vcenterhogehoge",
            "domain_name": "vsphere.local"
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                "++++VMware Customer Experience Improvement Program (CEIP)++++",
                "VMware's Customer Experience Improvement Program (CEIP) ",
                "provides VMware with information that enables VMware to ",
                "improve its products and services, to fix problems, ",
                "and to advise you on how best to deploy and use our ",
                "products. As part of CEIP, VMware collects technical ",
                "information about your organization's use of VMware ",
                "products and services on a regular basis in association ",
                "with your organization's VMware license key(s). This ",
                "information does not personally identify any individual. ",
                "",
                "Additional information regarding the data collected ",
                "through CEIP and the purposes for which it is used by ",
                "VMware is set forth in the Trust & Assurance Center at ",
                "http://www.vmware.com/trustvmware/ceip.html . If you ",
                "prefer not to participate in VMware's CEIP for this ",
                "product, you should disable CEIP by setting ",
                "'ceip_enabled': false. You may join or leave VMware's ",
                "CEIP for this product at any time. Please confirm your ",
                "acknowledgement by passing in the parameter ",
                "--acknowledge-ceip in the command line.",
                "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
            ]
        },
        "settings": {
            "ceip_enabled": false
        }
    }
}

で、実際の実行時コンソールは下記に。
環境にもよるが、新規デプロイであれば30分程度。
アップグレードだと1時間以上は要する。
(マイグレーションはやったことないのであしからず…)

% ./vcsa-deploy install --accept-eula --no-esx-ssl-verify ~/embedded_vCSA_on_ESXi.json
Run the installer with "-v" or "--verbose" to log detailed information
Updating log file location, copying '/tmp/vcsaCliInstaller-2019-03-24-14-57-k0e5zx7f/vcsa-cli-installer.log' to desired location as a backup: '/tmp/vcsaCliInstaller-2019-03-24-14-57-k0e5zx7f/workflow_1553439472833/vcsa-cli-installer.log.bak'
Workflow log-dir /tmp/vcsaCliInstaller-2019-03-24-14-57-k0e5zx7f/workflow_1553439472833
==================================================================== [START] Start executing Task: To validate CLI options at 14:57:52 ====================================================================
Deprecation Warning: The command parameter '--no-esx-ssl-verify' is deprecated. You must use the new parameter '--no-ssl-certificate-verification' in the next deployment.
Command line arguments verfied.
========================== [SUCCEEDED] Successfully executed Task 'CLIOptionsValidationTask: Executing CLI optionsValidation task' in TaskFlow 'template_validation' at 14:57:52 ==========================
============================================================ [START] Start executing Task: To validate the syntax of the template. at 14:57:52 ============================================================
Template syntax validation for template '/home/jan/embedded_vCSA_on_ESXi.json' succeeded.
Syntax validation for all templates succeeded.
========================== [SUCCEEDED] Successfully executed Task 'SyntaxValidationTask: Executing Template Syntax Validation task' in TaskFlow 'template_validation' at 14:57:52 ==========================
 [START] Start executing Task: To check the version of each template, and for each older template that supports CEIP, convert it to the latest template format, and save it to the Template Blackboard at
14:57:53
Deprecation Warning: The command parameter '--no-esx-ssl-verify' is deprecated. You must use the new parameter '--no-ssl-certificate-verification' in the next deployment.
CEIP is not enabled because the template key 'ceip_enabled' in section 'ceip', subsection 'settings' in template '/home/jan/embedded_vCSA_on_ESXi.json' was set to 'false'.
CEIP is not enabled because the template key 'ceip_enabled' in section 'ceip', subsection 'settings' in template '/home/jan/embedded_vCSA_on_ESXi.json' was set to 'false'.
CEIP is not enabled because the template key 'ceip_enabled' in section 'ceip', subsection 'settings' in template '/home/jan/embedded_vCSA_on_ESXi.json' was set to 'false'.
Template version processing for template '/home/jan/embedded_vCSA_on_ESXi.json' succeeded.
Version processing for all templates succeeded.
========================= [SUCCEEDED] Successfully executed Task 'VersionProcessingTask: Executing Template Version Processing task' in TaskFlow 'template_validation' at 14:57:53 =========================
=============================== [START] Start executing Task: To validate the template structure against the rules specified by a corresponding template schema. at 14:57:53 ===============================
Template structure validation for template '/home/jan/embedded_vCSA_on_ESXi.json' succeeded.
Structure validation for all templates succeeded.
======================= [SUCCEEDED] Successfully executed Task 'StructureValidationTask: Executing Template Structure Validation task' in TaskFlow 'template_validation' at 14:57:53 =======================
 [START] Start executing Task: To create a dependency graph for the provided templates, with an edge pairing two templates that are dependent on each other. Such graph relationships will affect whether
certain templates can be deployed in parallel, or must be deployed sequentially. at 14:57:53
Dependency processing for all templates succeeded.
====================== [SUCCEEDED] Successfully executed Task 'DependencyProcessingTask: Executing Template Dependency Processing task' in TaskFlow 'template_validation' at 14:57:53 ======================
===================================================== [START] Start executing Task: Validate that requirements are met in the source VCSA. at 14:57:53 =====================================================
InstallRequirementCollector: Reached gathering requirement
================================= [SUCCEEDED] Successfully executed Task 'SrcRequirementTask: Running SrcRequirementTask' in TaskFlow 'embedded_vCSA_on_ESXi' at 14:57:53 =================================
==================================================================== [START] Start executing Task: Perform precheck tasks. at 14:57:54 ====================================================================
============================================= [START] Start executing Task: Verify that the provided credentials for the target ESXi/VC are valid at 14:57:54 =============================================
The certificate of server '192.168.0.51' will not be verified because you have provided either the '--no-ssl-certificate-verification' or '--no-esx-ssl-verify' command parameter, which disables
verification for all certificates. Remove this parameter from the command line if you want server certificates to be verified.
============================================== [SUCCEEDED] Successfully executed Task 'Running precheck: TargetCredentials' in TaskFlow 'install' at 14:57:54 ==============================================
================================================ [START] Start executing Task: Precheck CPU, memory and datastore size requirements for a host. at 14:57:54 ================================================
================================================= [SUCCEEDED] Successfully executed Task 'Running precheck: HostConfigs' in TaskFlow 'install' at 14:57:55 =================================================
=============================================== [START] Start executing Task: Verify the target host type matches the one given in the template at 14:57:56 ===============================================
=============================================== [SUCCEEDED] Successfully executed Task 'Running precheck: TargetHostType' in TaskFlow 'install' at 14:57:56 ===============================================
============================================ [START] Start executing Task: Verify that the target ESXi or VC version meets the minimum requirements at 14:57:56 ============================================
================================================ [SUCCEEDED] Successfully executed Task 'Running precheck: TargetVersion' in TaskFlow 'install' at 14:57:56 ================================================
================================================== [START] Start executing Task: Validate that the OVA image has the required OVA properties. at 14:57:56 ==================================================
=============================================== [SUCCEEDED] Successfully executed Task 'Running precheck: OVAProperties.' in TaskFlow 'install' at 14:57:56 ===============================================
======================================================= [START] Start executing Task: Validate the provided ip/fqdn is available to use at 14:57:56 =======================================================
Pinging IPv4 address 192.168.0.50
192.168.0.50 is unreachable.
Unable to resolve address of given host vcsa01.home.lab.
================================================= [SUCCEEDED] Successfully executed Task 'Running precheck: IpFqdnInUse' in TaskFlow 'install' at 14:57:59 =================================================
=========================================================== [START] Start executing Task: Validate the target ESXi management status at 14:58:00 ===========================================================
============================================= [SUCCEEDED] Successfully executed Task 'Running precheck: ESXManagementStatus' in TaskFlow 'install' at 14:58:00 =============================================
================================================ [START] Start executing Task: Validate the provided target appliance name is available to use at 14:58:00 ================================================
================================================ [SUCCEEDED] Successfully executed Task 'Running precheck: ApplianceName' in TaskFlow 'install' at 14:58:00 ================================================
======================================= [START] Start executing Task: Check whether the datastore's free space accommodate the VCSA's deployment option at 14:58:00 =======================================
============================================== [SUCCEEDED] Successfully executed Task 'Running precheck: TargetDsFreespace' in TaskFlow 'install' at 14:58:00 ==============================================
============================================ [START] Start executing Task: Verify the provided SSO info is valid by connecting to the STS service. at 14:58:00 ============================================
=============================================== [SUCCEEDED] Successfully executed Task 'Running precheck: SSOCredentials' in TaskFlow 'install' at 14:58:00 ===============================================
=============================================== [START] Start executing Task: Verify that the provided external SSO (PSC)/Embedded info is valid at 14:58:00 ===============================================
================================================= [SUCCEEDED] Successfully executed Task 'Running precheck: SSOExternal' in TaskFlow 'install' at 14:58:00 =================================================
======================================== [SUCCEEDED] Successfully executed Task 'PrecheckTask: Running prechecks.' in TaskFlow 'embedded_vCSA_on_ESXi' at 14:58:00 ========================================
============================================ [START] Start executing Task: Invoke OVF Tool to deploy VCSA for installation, upgrade, and migration at 14:58:01 ============================================
OVF Tool: Opening OVA source: /mnt/vcsa-cli-installer/lin64/../../vcsa/VMware-vCenter-Server-Appliance-6.7.0.21000-11726888_OVF10.ova
OVF Tool: Opening VI target: vi://root@192.168.0.51:443/
OVF Tool: Deploying to VI: vi://root@192.168.0.51:443/
OVF Tool: Disk progress: 99%
OVF Tool: Transfer Completed
OVF Tool: Powering on VM: Embedded-vCenter-Server-Appliance
OVF Tool: Task progress: 60%
OVF Tool: Task Completed
OVF Tool: Waiting for IP address...
OVF Tool: Received IP address: 192.168.0.50
OVF Tool: Completed successfully
======================================= [SUCCEEDED] Successfully executed Task 'Deploying vCenter Server Appliance' in TaskFlow 'embedded_vCSA_on_ESXi' at 15:02:19 =======================================
================================================== [START] Start executing Task: Monitor the entire VCSA deployment using appliance REST API at 15:02:19 ==================================================
Checking if the target VCSA is powered on and ready for operations...
Successfully verified that the target VCSA 'Embedded-vCenter-Server-Appliance' has been powered on and is now ready for operations
Checking if the target VCSA appliance API is available for query
The certificate of server '192.168.0.50' will not be verified because you have provided either the '--no-ssl-certificate-verification' or '--no-esx-ssl-verify' command parameter, which disables
verification for all certificates. Remove this parameter from the command line if you want server certificates to be verified.
Successfully verified that the target VCSA appliance API is available for query
Start monitoring target VCSA deployment, deployment status will be written into: /tmp/vcsaCliInstaller-2019-03-24-14-57-k0e5zx7f/workflow_1553439472833/embedded_vCSA_on_ESXi/vcsa_deployment.json
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 5/100)   - Setting up storage
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 56/100)  - Installed vmware-directory-client-6.7.0.3781-11338774.x86_64.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 59/100)  - Installed vmware-identity-sts-6.7.0.4892-11338777.noarch.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 59/100)  - Installed vmware-identity-sts-6.7.0.4892-11338777.noarch.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 59/100)  - Installed vmware-identity-sts-6.7.0.4892-11338777.noarch.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 77/100)  - Installed VMware-vpxd-svcs-6.7.0-11726888.x86_64.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 87/100)  - Installed vmware-vsm-6.7.0-11726888.x86_64.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(RUNNING 89/100)  - Installed VMware-perfcharts-6.7.0-11726888.x86_64.rpm
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 2/100)     - Starting VMware Authentication Framework...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 2/100)     - Starting VMware Authentication Framework...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 10/100)    - Starting VMware Single Sign-On User Creation...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 21/100)    - Starting VMware Component Manager...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 28/100)    - Starting VMware vAPI Endpoint...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 44/100)    - Starting VMware Appliance Management Service...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 60/100)    - Starting VMware vCenter Server...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 60/100)    - Starting VMware vCenter Server...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 60/100)    - Starting VMware vCenter Server...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 63/100)    - Starting VMware Content Library Service...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 65/100)    - Starting VMware ESX Agent Manager...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 73/100)    - Starting VMware Update Manager...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 84/100)    - Starting VMware VSAN Health Service...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(RUNNING 97/100)    - Starting VMware Performance Charts...
VCSA Deployment is still running
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run firstboot
scripts.(SUCCEEDED 100/100) - Task has completed successfully.
Successfully completed VCSA deployment.  VCSA Deployment Start Time: 2019-03-25T00:00:39.279Z VCSA Deployment End Time: 2019-03-25T00:13:14.011Z
================================== [SUCCEEDED] Successfully executed Task 'MonitorDeploymentTask: Monitoring Deployment' in TaskFlow 'embedded_vCSA_on_ESXi' at 15:13:37 ==================================
Monitoring VCSA Deploy task completed
======================================================= [START] Start executing Task: Provide the login information about new appliance. at 15:13:37 =======================================================
    Appliance Name: Embedded-vCenter-Server-Appliance
    System Name: vcsa01.home.lab
    System IP: 192.168.0.50
    Log in as: Administrator@vsphere.local
========================= [SUCCEEDED] Successfully executed Task 'ApplianceLoginSummaryTask: Provide appliance login information.' in TaskFlow 'embedded_vCSA_on_ESXi' at 15:13:37 =========================
================================================================================================= 15:13:37 =================================================================================================
Result and Log File Information...
WorkFlow log directory: /tmp/vcsaCliInstaller-2019-03-24-14-57-k0e5zx7f/workflow_1553439472833

コンソール上にも出ているが、デフォルトだと/tmp以下にログを出力してくれるので、
faild となった場合はコンソールやログから原因を探していく。

shell から ESXi のライセンスを登録する

vCSA 立てるぞーと思ったら OS インストールしたの大分前で、
evaluation license 切れてた…Host Client のポート開いてない…
というケースにでも。
※ 自分の実話だけどピンポイントなレアケース?
まぁ、shell からできれば色々こねくり回して、100台や1000台でも登録できるよねという風にも。

esxcli かと思ったら vim-cmd だったり…
分からないような分かるような微妙な使い分け。

[root@hayabusa:~] vim-cmd vimsvc/license --set <ライセンスキー>

   serial: <ライセンスキー>
   vmodl key: esx.enterprisePlus.cpuPackage
   name: VMware vSphere 6 Enterprise Plus
   total: 16
   used: 1
   unit: cpuPackage
   Properties:
     [ProductName] = VMware ESX Server
     [ProductVersion] = 6.0
     [expirationHours] = 9816
     [expirationMinutes] = 54
     [expirationDate] = 2020-04-30T00:00:00Z
     [system_time] = 2019-03-17T23:05:43.809665Z
     [feature] = vsmp:0 ("Unlimited virtual SMP")
     [feature] = h264remote ("H.264 for Remote Console Connections")
     [feature] = esxHost ("vCenter agent for VMware host")
     [feature] = vimapi ("vSphere API")
     [feature] = contentlib ("Content Library")
     [feature] = vstorage ("Storage APIs")
     [feature] = vmotion ("vSphere vMotion")
     [feature] = xswitchvmotion ("X-Switch vMotion")
     [feature] = das ("vSphere HA")
     [feature] = dr ("vSphere Data Protection")
     [feature] = endpoint ("vShield Endpoint")
     [feature] = replication ("vSphere Replication")
     [feature] = vshield ("vShield Zones")
     [feature] = hotplug ("Hot-Pluggable virtual HW")
     [feature] = svmotion ("vSphere Storage vMotion")
     [feature] = smartcard ("Shared Smart Card Reader")
     [feature] = ft:8 ("vSphere FT (up to 8 virtual CPUs)")
     [feature] = vvolumes ("Virtual Volumes")
     [feature] = storageawarenessapi ("APIs for Storage Awareness")
     [feature] = spbm ("Storage-Policy Based Management")
     [feature] = vaai ("vSphere Storage APIs for Array Integration")
     [feature] = drs ("vSphere DRS")
     [feature] = serialuri:2 ("Remote virtual Serial Port Concentrator")
     [feature] = mpio ("MPIO / Third-Party Multi-Pathing")
     [feature] = bigdataex ("Big Data Extensions")
     [feature] = rem ("Reliable Memory")
     [feature] = dvs ("vSphere Distributed Switch")
     [feature] = hostprofile ("vSphere Host Profiles")
     [feature] = autodeploy ("vSphere Auto Deploy")
     [feature] = sriov ("SR-IOV")
     [feature] = sioshares ("vSphere Storage I/O Control")
     [feature] = dpvmotion ("Direct Path vMotion")
     [feature] = storagedrs ("vSphere Storage DRS")
     [feature] = metrovmotion ("vSphere vMotion Metro")
     [feature] = viewaccel ("vSphere View Accelerator")
     [feature] = appha ("vSphere App HA")
     [feature] = vflash ("vSphere Flash Read Cache")
     [feature] = xvcvmotion ("Cross Virtual Center vMotion")
     [feature] = vgpu ("vGPU")
     [feature] = proactiveha ("vSphere Proactive HA")
     [feature] = vmcrypt ("vSphere VM Encryption")
     [feature] = encryptedvmotion ("vSphere Encrypted vMotion")
     [feature] = predictivedrs ("vSphere Predictive DRS")
     [feature] = pmem ("Persistent Memory")
     [FileVersion] = 6.7.1.0
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e16-suite-vsom-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e18-robo-c3-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e4-c2-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e2-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e6-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e4-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e8-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e11-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e9-eoem-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e8-eoem-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e7-eoem-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e1-eoem-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e2-eoem-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e23-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e17-suite-vsom-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e14-suite-vcloud5-c1-201006
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e14-suite-vcloud6-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e19-eoem-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e6-sub-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e7-sub-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e13-suite-vcloud5-c1-201006
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e13-suite-vcloud6-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-eval-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e5-sub-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e12-suite-vcloud6-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e12-suite-vcloud5-c1-201006
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e3-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e1-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e7-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e3-c2-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e5-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e9-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e10-c3-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e22-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e20-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e5-robo-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e7-robo-c3-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e6-robo-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e15-suite-vsom-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e8-sub-c1-201306
     [LicenseFilePath] = /usr/lib/vmware/licenses/site/license-esx-60-e9-sub-c1-201306
     [Localized] = <Not supported type for value: [N5Vmomi9DataArrayINS_11KeyAnyValueEEE:0x000000c253bf6f50]>
[200] Command Complete.
Result: Success

ちなみにライセンス情報を見る場合は --show
--get ではないので注意。