CLIによるvCenterのデプロイ

環境

vCenter7環境へ、ネスト環境用のvCenter7をデプロイ
クライアント:CentOS8
ISO:VMware-VCSA-all-7.0.3-20150588.iso

 事前準備

①ISOダウンロード
②ISOに含まれるデプロイパラメータ用jsonファイルを修正
vcsa-cli-installer\templates\install
embedded_vCSA_on_ESXi.json
embedded_vCSA_on_VC.json ←今回はこれを使用
embedded_vCSA_replication_on_ESXi.json
embedded_vCSA_replication_on_VC.json
vCSA_with_cluster_on_ESXi.json

embedded_vCSA_on_VC.json
 
{
    "__version": "2.13.0",
    "__comments": "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on a vCenter Server instance.",
    "new_vcsa": {
        "vc": {
            "__comments": [
                "'datacenter' must end with a datacenter name, and only with a datacenter name. ",
                "'target' must end with an ESXi hostname, a cluster name, or a resource pool name. ",
                "The item 'Resources' must precede the resource pool name. ",
                "All names are case-sensitive. ",
                "For details and examples, refer to template help, i.e. vcsa-deploy {install|upgrade|migrate} --template-help"
            ],
            "hostname": "vcenter-01.vsphere.local",
            "username": "administrator@vsphere.local",
            "password": "password",
            "deployment_network": "VM Network",
            "datacenter": [
                "DC-01"
            ],
            "datastore": "NVMe-02",
            "target": [
                "CL-01"
            ],
            "vm_folder": [
                "Lab"
            ]
        },
        "appliance": {
            "__comments": [
                "You must provide the 'deployment_option' key with a value, which will affect the vCenter Server Appliance's configuration parameters, such as the vCenter Server Appliance'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": "vcenter-test"
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            "system_name": "vcenter-test.home.lab",
            "ip": "192.168.11.52",
            "prefix": "24",
            "gateway": "192.168.11.1",
            "dns_servers": [
                "192.168.11.41"
            ]
        },
        "os": {
            "password": "VMware1!",
            "ntp_servers": "time.nist.gov",
            "ssh_enable": true
        },
        "sso": {
            "password": "VMware1!",
            "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": true
        }
    }
}

 構築

①OVFTool実行に必要なものをインストール
dnf install libnsl
※インストールしないとデプロイ時に以下エラーが出た
Error message: ApplianceDeploymentTask: Caught an exception Deployment failed. OVF Tool return error code: 127

②ISOマウント
mount -t iso9660 -o loop /tmp/VMware-VCSA-all-7.0.3-20150588.iso /mnt/cdrom

json配置
④デプロイ
/mnt/cdrom/vcsa-cli-installer/lin64
./vcsa-deploy install --accept-eula --no-ssl-certificate-verification --acknowledge-ceip /tmp
/embedded_vCSA_on_VC.json

以下のようにsucceededが表示される
image.png