0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vCenter Server Appliance(vCSA)をCLIでデプロイする

Last updated at Posted at 2020-03-01

毎回検証用にGUIでポチポチするのがめんどくさかったのでCLIでデプロイするように試してみました。

基本は公式ドキュメントの以下の通りにやれば問題ありません。

作業端末:windows10
デプロイ先:こちらでデプロイしたESXi6.7

前提条件

①vCSAのデプロイ先のESXiがあること。(vCSAは最小でデプロイしてもメモリ10GB必要なので結構リソースが必要です。)
②DNSでデプロイするvCSAのFQDNが名前解決できること(正引き、逆引きとも)

デプロイ準備

①GUIでデプロイするのと同じようにクライアントにvCSAのISOファイルをマウントする。

②マウントしたISOファイル内にテンプレートのjsonがあるので作業端末にコピーして編集する。
 具体的なパスは

E:\vcsa-cli-installer\templates\install

今回はテンプレートファイルembedded_vCSA_on_ESXi.jsonを参考に以下のように作成しました。

・デプロイ先のESXi 192.168.1.10
・DNSサーバ 192.168.1.11

vcsainst.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.1.10",
            "username": "root",
            "password": "P@ssw0rd!",
            "deployment_network": "VM Network",
            "datastore": "nuc01"
        },
        "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": "tiny",
            "name": "Embedded-vCenter-Server-Appliance"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "ip": "192.168.1.12",
            "dns_servers": [
                "192.168.1.11"
            ],
            "prefix": "24",
            "gateway": "192.168.1.1",
            "system_name": "vcsa01.local.com"
        },
        "os": {
            "password": "P@ssw0rd!",
            "time_tools_sync": true,
            "ssh_enable" : true
        },
        "sso": {
            "password": "P@ssw0rd!",
            "domain_name": "vsphere.local"
        }
    },
    "ceip": {
        "settings": {
            "ceip_enabled": false
        }
    }
}

デプロイしてみる

PoweShellを開き、マウントしているISOファイル内の以下のフォルダに移動する。

> cd E:\vcsa-cli-installer\win32

移動後以下のコマンドを実行する。

> .\vcsa-deploy.exe install C:\Users\salin\Desktop\vcsainst.json --accept-eula

途中でサムプリントについて聞かれたら1を入力する。

Do you accept the thumbprint?
1: Accept and continue.
2: Do not accept and exit.
Enter '1' or '2': 1

あとは10分程度待機して以下のようなログが出れば成功です。

==========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:
2020-03-01T12:52:40.907Z VCSA Deployment End Time: 2020-03-01T13:02:23.090Z
 [SUCCEEDED] Successfully executed Task 'MonitorDeploymentTask: Monitoring
Deployment' in TaskFlow 'vcsainst' at 13:05:15
Monitoring VCSA Deploy task completed
 [START] Start executing Task: Provide the login information about new
appliance. at 13:05:16
    Appliance Name: Embedded-vCenter-Server-Appliance
    System Name: vcsa01.local.com
    System IP: 192.168.1.12
    Log in as: Administrator@vsphere.local
 [SUCCEEDED] Successfully executed Task 'ApplianceLoginSummaryTask: Provide
appliance login information.' in TaskFlow 'vcsainst' at 13:05:16
=================================== 13:05:17 ===================================
Result and Log File Information...
WorkFlow log directory:
C:\Users\salin\AppData\Local\Temp\vcsaCliInstaller-2020-03-01-12-48-etudd5vg\workflow_1583066927723

以下のようにHostClinentから見ると正常にデプロイされているのがわかります。
image.png

vCSAへも問題なくアクセスできます。
image.png

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?