InfraVMを指定して、vSAN APIでCluster Shutdownを試みる
背景 想定外停電時など、 UPS と連携して API 経由で自動的に vSAN Cluster をシャットダウンするスクリプトを作成したい。 環境は内部 VC 構成であり、かつクラスタ内に AD/DNS およびスクリプト VM といったインフラ VM が存在する条件でも API でシャットダウンできるようにスクリプトを作成したい 参考サイト PerformClusterPowerAction vSAN Management SDK for Python 前回ブログ スクリプトの解説 実行環境の準備については 前回のブログ を参照願いたい。 samplecode にある vsanclustershutdownsamples.py コピー&編集して差分が以下になるように作成した # diff vsanclustershutdownsamples.py vsanclustershutdownsamples_internalVC_with_InfraVMs.py 93c93,96 < print("FAIL:", test.testName) --- > if test.testName == 'VMware vCenter appliance is deployed on this vSAN cluster': > ...