■vCS9ではライセンス管理できないので、自動展開のVVFやVCFとは縁のない、単にバラで手動構築を行う。
今回は単純に、VVF/VCFを扱えるだけのリソースが全然足りない中で出来る範囲まで、という方針。
以下と同様にCloud Imageを使ってインストールプロセスを省略しつつ、先にdnsmasq用ゲストOSを立ち上げる。今回はnetplanではなくNetworkManagerがはじめから入っているRedhat系を使用
# cloudイメージのダウンロード
# cd /var/lib/vz/import
# # wget https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2
# du AlmaLinux-9-GenericCloud-latest.x86_64.qcow2
575492 AlmaLinux-9-GenericCloud-latest.x86_64.qcow2
# cloud-initのカスタマイズでrootのパスワードをredhatにする
# apt install -y libguestfs-tools
# virt-customize -a AlmaLinux-9-GenericCloud-latest.x86_64.qcow2 --root-password password:redhat
[ 0.0] Examining the guest ...
[ 11.0] Setting a random seed
[ 11.1] Setting the machine ID in /etc/machine-id
[ 11.1] Setting passwords
[ 12.6] SELinux relabelling
[ 17.0] Finishing off
■vCenterServerの前提条件としてのDNSの正引き、逆引きをdnsmasq用ゲストOSに追加した「dnsmasq」で構成
待ち受けポート→port
・listen-addressのIPを持ったNIC名→interface
・ホスト名に自動的にドメイン名を付加する→expand-hosts
・自動的にドメイン名→dimain
・正引きの参照→addn-hosts
・逆引きは/etc/dnsmasq.d/配下に配置
[root@dnsmasq ~]# sdiff -s -l dnsmasq.conf /etc/dnsmasq.conf
> port=53
#interface= | interface=eth0
#listen-address= | listen-address=192.168.0.158
> addn-hosts=/etc/hosts
> expand-hosts
> domain=test.local
[root@dnsmasq ~]# grep 158 /etc/hosts /etc/dnsmasq.d/reverse
/etc/hosts:192.168.0.158 dnsmasq.test.local
/etc/dnsmasq.d/reverse:ptr-record=158.0.168.192.in-addr.arpa,dnsmasq.test.local
[root@dnsmasq ~]# dnsmasq --test && systemctl restart dnsmasq.service
■正引きの確認
[root@dnsmasq ~]# awk '!/localhost/{for(a=2;a<=NF;a++){print "dig @192.168.0.158 "$a}}' /etc/hosts | sh -x | grep -A 1 ANSWER.SECTION
+ dig @192.168.0.158 vcsa910.test.local
;; ANSWER SECTION:
vcsa910.test.local. 0 IN A 192.168.0.155
+ dig @192.168.0.158 winsv.test.local
--
;; ANSWER SECTION:
winsv.test.local. 0 IN A 192.168.0.156
+ dig @192.168.0.158 sample.test.local
--
;; ANSWER SECTION:
sample.test.local. 0 IN A 192.168.0.157
+ dig @192.168.0.158 dnsmasq.test.local
--
;; ANSWER SECTION:
dnsmasq.test.local. 0 IN A 192.168.0.158
+ dig @192.168.0.158 pve01-esxi910.test.local
--
;; ANSWER SECTION:
pve01-esxi910.test.local. 0 IN A 192.168.0.159
+ dig @192.168.0.158 pve01-esxi910
--
;; ANSWER SECTION:
pve01-esxi910. 0 IN A 192.168.0.159
■逆引きの確認
[root@dnsmasq ~]# seq 155 159 | awk '{print "dig @192.168.0.158 -x 192.168.0."$0}' | sh -x | grep -A 1 ANSWER.SECTION
+ dig @192.168.0.158 -x 192.168.0.155
;; ANSWER SECTION:
155.0.168.192.in-addr.arpa. 0 IN PTR vcsa910.test.local.
+ dig @192.168.0.158 -x 192.168.0.156
--
;; ANSWER SECTION:
156.0.168.192.in-addr.arpa. 0 IN PTR winsv.test.local.
+ dig @192.168.0.158 -x 192.168.0.157
--
;; ANSWER SECTION:
157.0.168.192.in-addr.arpa. 0 IN PTR sample.test.local.
+ dig @192.168.0.158 -x 192.168.0.158
--
;; ANSWER SECTION:
158.0.168.192.in-addr.arpa. 0 IN PTR dnsmasq.test.local.
+ dig @192.168.0.158 -x 192.168.0.159
--
;; ANSWER SECTION:
159.0.168.192.in-addr.arpa. 0 IN PTR pve01-esxi910.test.local.
■デフォルトのTinyでシンプロビジョニングのまま進める。
画面キャプチャ撮るためだけに後から入力しただけのパラメータは信用度ゼロの参考程度で、それぞれのパラメータは公式のドキュメントを参考に。
■「ホスト」を右クリック、「OVFテンプレートのデプロイ」を選択
■OVFテンプレートの選択
■詳細の確認
■設定
■ネットワークの選択
■テンプレートのカスタマイズ
■Stage2のセットアップ
■5480ポートの管理は一旦終了して、443でのESXiホスト追加
■vCSから分散SWを作る。
vmk0,vmk1のIPアドレス両方を名前解決できるようにして、
一時IPとして第四オクテット「150」あたりを使って入れ替えて、
標準vSWを削除すれば分散SWだけになる




























