vCenter Server を CLI でアップグレードしてみた

今回は自宅環境の vCenter Server を 8.0 にアップグレードするにあたり、
通常通りの手順ではつまらないと思ったため CLI でやってみようと思います。

vCenter Server の CLI アップグレードに関するドキュメントは以下が公開されて
います。

vCenter Server Appliance の CLI アップグレード

クライアント端末: mac
ソース vCenter Server : vCenter Server 7.0 U3h
ターゲット vCenter Server : vCenter Server 8.0 U3d

まずは、アップグレードに使用する json ファイルを用意する必要があります。

vCenter Server のインストーラーから vcsa-cli-installer/templates/upgrade/vcsa7.0
配下にテンプレートがあるので、それを使用します。
※vCSA 7.0 から vCSA 8.0 へアップグレードするので vcsa7.0 内のテンプレートを
 使用します。

User@MacBook-Pro vcsa7.0 % pwd
/Volumes/VMware VCSA/vcsa-cli-installer/templates/upgrade/vcsa7.0

User@MacBook-Pro vcsa7.0 % ls
embedded_vCSA_on_ESXi.json	embedded_vCSA_on_VC.json

今回はターゲット vCenter Server を直接 ESXi へデプロイするため、
[embedded_vCSA_on_ESXi.json] のテンプレートを使用します。

アップグレード対象の vCenter Server 仮想マシンが別の vCenter Server に管理されて
おり、ターゲット vCenter Server をその vCenter Server にデプロイする場合には
[embedded_vCSA_on_VC.json] を使用します。

[embedded_vCSA_on_ESXi.json] の例

“Line5 〜 Line10” : ターゲット vCenter Server のデプロイ先の情報です。
“Line16 〜 Line18” : ターゲット vCenter Server のサイズや仮想マシン名等の設定
“Line20 〜 Line21” : SSH の設定
“Line23 〜 Line30” : ターゲット vCenter Server が使用する一時ネットワークの設定
“Line40” : ソース vCenter Server からターゲット vCenter Servr へコピーするデータの選択
“Line50 〜 Line53” : ソース vCenter Server を管理している ESXi の情報
“Line55 〜 Line 59” : ソース vCenter Server の情報
“LIne89 〜 Line90” : CEIP への参加設定

{
    "__version": "2.13.0",
    "__comments": "Sample template to upgrade a vCenter Server Appliance 7.0 with an embedded Platform Services Controller to a vCenter Server Appliance 8.0.3.00000 with an embedded Platform Services Controller.",
    "new_vcsa": {
        "esxi": {
            "hostname": "192.168.1.21",
            "username": "root",
            "password": "VMware1!",
            "deployment_network": "VM Network",
            "datastore": "datastore1"
        },
        "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": "tiny",
            "name": "vCenterServer80U3d_system"
        },
        "os": {
            "ssh_enable": true
        },
        "temporary_network": {
            "ip_family": "ipv4",
            "mode": "static",
            "ip": "192.168.1.18",
            "prefix": "24",
            "gateway": "192.168.1.1",
            "dns_servers": [
                "192.168.1.24"
            ]
        },
        "user_options": {
            "__comments": [
			    "Select the data that you want to copy from the source vCenter Server.",
				"'core' = 'Configuration and Inventory',",
				"'core_events_tasks' = 'Configuration, Inventory, Tasks and Events'",
				"'all' = 'Configuration Inventory, Tasks, Events and Performance Metrics'"
			],
            "vcdb_migrateSet": "all"
        }
    },
    "source_vc": {
        "description": {
            "__comments": [
                "This section describes the source appliance which you want to",
                "upgrade and the ESXi host on which the appliance is running. "
            ]
        },
        "managing_esxi_or_vc": {
            "hostname": "192.168.1.21",
            "username": "root",
            "password": "VMware1!"
        },
        "vc_vcsa": {
            "hostname": "192.168.1.17",
            "username": "administrator@vsphere.local",
            "password": "VMware1!",
            "root_password": "VMware1!"
        }
    },
    "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
        }
    }
}

なお、各構成パラメータとその詳細については、vcsa-cli-installer/mac(ご利用の OS) 内で、
./vcsa-deploy upgrade –template-help を実行することで確認可能です。

実際に実行した際の出力結果は以下になります。

Upgrade Template Help (Version 2.13.0)
===========================================================================================================================================================================================
List of the JSON parameters that you can use to prepare templates for upgrade of embedded and external deployments of the vCenter Server Appliance 6.5 and 6.7 to embedded deployments of
the vCenter Server Appliance 8.0.3.00000.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    __version:
        Set this field to "2.13.0".
    =======================================================================================================================================================================================
    new_vcsa:
        This subsection describes the new upgraded appliance that you want to deploy.
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        ===================================================================================================================================================================================
        vc:
            This subsection describes the vCenter Server instance on which to deploy the appliance. Required if you are deploying the appliance on an ESXi host or DRS cluster from a
            vCenter Server inventory. Fill in either this subsection or the 'esxi' subsection.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            hostname:
                The IP address or fully qualified domain name (FQDN) of the vCenter Server instance. If an FQDN is provided, it has to be resolvable from the machine that is running the
                installer.
                Type: string
            username:
                The user name of a user with administrative privileges or the Single Sign-On administrator on vCenter.
                Type: string
            password:
                The password of a user with administrative privileges or the Single Sign-On administrator on vCenter. If left blank, or omitted, you will be prompted to enter it at the
                command console during template verification.
                Type: string
            deployment_network:
                The network of the ESXi host to which to connect the new appliance. When the ESXi host has one network, you can omit this parameter.
                Type: string
            datacenter:
                The path to the datacenter. This path must end with the datacenter's name. If the datacenter has any parent folders, the parent folder names must also be in the path.
                Parent folders are optional. All names are case-sensitive. Example: "datacenter": ["Parent Folder 1", "Parent Folder 2", "My Datacenter"].
                Type: string, array
            datastore:
                The datastore on which to store the files of the appliance. This value has to be either a specific datastore name, or a specific datastore in a datastore cluster. The
                datastore must be accessible from the vCenter Server data center and must have at least 25 GB of free space. Otherwise, the new appliance might not power on.
                Type: string
            port:
                The port number of the vCenter Server instance. The default value is 443.
                Type: integer
            ssl_certificate_verification:
                Supply the SHA-1 thumbprint (fingerprint) of the server's security certificate in the "thumbprint" key, e.g. "thumbprint":
                "CA:FE:18:99:11:22:33:44:55:A2:29:FC:59:47:7C:AB:CD:AB:AA:99", or add the key-value pair or supply the server's security certificate file path(in .pem format) in the
                "certificate_path", eg. "path/to/cert.pem" or set "verification_mode": "NONE" to skip certificate verification for this server. Note that your server's
                thumbprint/certificate path will be different from the example. The only value acceptable for "verification_mode" is "NONE"(case-sensitive), and "thumbprint",
                "certificate_path" and "verification_mode" are mutually exclusive. IMPORTANT: Switch to using certificates as thumbprints will be deprecated soon
                Type: dictionary
            target:
                The path to a specific cluster, ESXi host, or resource pool under the datacenter specified in the template key "datacenter" above. This is where you want to deploy the
                appliance. This path must end with a cluster name, a ESXi hostname, or a resource pool name. Parent folders are optional. All names are case-sensitive. Examples: For the
                hierachy 'Parent Folder 1\Parent Folder 2\My ESXi', you must specify "target": ["Parent Folder 1", "Parent Folder 2", "My ESXi"]. For the hierarchy 'Parent Folder 1\Parent
                Folder 2\My DRS Cluster', you must specify "target": ["Parent Folder 1", "Parent Folder 2", "My DRS Cluster"]. If deploying to a resource pool, you must include the item
                "Resources" before the resource pool name. For example, if cluster "My Cluster" contains resource pool "My Resource Pool", you must specify "target": ["My Cluster",
                "Resources", "My Resource Pool"]. ESXi, cluster, and resource pool names must be the same as the names recorded in the vCenter inventory, i.e. if the name in the vCenter
                inventory is an IP address, the FQDN cannot be provided here, and vice versa. Use the template key 'vm_folder' if you want the deployed appliance to be listed in a
                different location within the data center's hierarchy.  Note that prechecks only verify the memory of the resource pool.
                Type: string, array
            vm_folder:
                A VM folder in the vCenter Server data center to which to add the appliance.
                Type: string, array
        ===================================================================================================================================================================================
        esxi:
            This subsection describes the ESXi host on which to deploy the appliance. Required if you are deploying the appliance directly on an ESXi host. Fill in either this subsection
            or the 'vc' subsection.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            hostname:
                The IP address or fully qualified domain name (FQDN) of the ESXi host. If an FQDN is provided, it has to be resolvable from the machine that is running the installer.
                Type: string
            username:
                The user name of a user with administrative privileges on the ESXi host.
                Type: string
            password:
                The password of the ESXi host user. If left blank, or omitted, you will be prompted to enter it at the command console during template verification.
                Type: string
            deployment_network:
                The network of the ESXi host to which to connect the new appliance. When the ESXi host has one network, you can omit this parameter.
                Type: string
            ===============================================================================================================================================================================
            VCSA_cluster:
                This subsection describes the settings for the vSAN or vLCM managed cluster. Required only if you want to create a vSAN or vLCM managed cluster during the deployment of
                vCenter Server.
                Type: dictionary
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                datacenter:
                    Datacenter where you want to deploy the vCenter Server.
                    Type: string
                cluster:
                    The vSAN or the vLCM managed cluster you want to create just after the vCenter Server deployment.
                    Type: string
                compression_only:
                    Set the value to 'true' to enable compression on the vSAN cluster. If this parameter is set to 'true', the 'deduplication_and_compression' parameter must be set to
                    'false'.
                    Type: boolean (true or false)
                deduplication_and_compression:
                    Set the value to 'true' to enable compression and deduplication on the vSAN cluster.  If this parameter is set to 'true', the 'compression_only' parameter must be set
                    to 'false'.
                    Type: boolean (true or false)
                ===========================================================================================================================================================================
                disks_for_vsan:
                    This section describes vSAN disk settings.
                    Type: string
                ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                    cache_disk:
                        A list of UUIDs or canonical names of disks you want to use for cache. Specify only SSDs.
                        Type: array
                    capacity_disk:
                        A list of UUIDs or canonical names of disks you want to use for storage. Specify either SSDs or HDDs.
                        Type: array
                enable_vlcm:
                    Set to 'true' to create a vLCM managed cluster.
                    Type: boolean (true or false)
                enable_vsan_esa:
                    Set to 'true' to create vSAN cluster with vSAN ESA. vSAN Express Storage Architecture is a next-generation architecture designed to get the most out of
                    high-performance storage devices, resulting in greater performance and efficiency.
                    Type: boolean (true or false)
                ===========================================================================================================================================================================
                storage_pool:
                    This section describes vSAN ESA disk settings.
                    Type: string
                ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                    single_tier:
                        List of disk UUIDs or canonical names to be added to a vSAN storage pool as vSAN single tier devices.
                        Type: array
                vsan_hcl_database_path:
                    Local path to the vSAN HCL database. If the vSAN HCL database present in this location is not up-to-date, the installer will download the latest version of the
                    database and replace it with the older version.
                    Type: string
            datastore:
                The datastore on which to store the files of the appliance. This value has to be either a specific datastore name, or a specific datastore in a datastore cluster. The
                datastore must be accessible from the ESXi host and must have at least 25 GB of free space. Otherwise, the new appliance might not power on.
                Type: string
            port:
                The port number of the ESXi host. The default value is 443.
                Type: integer
            ssl_certificate_verification:
                Supply the SHA-1 thumbprint (fingerprint) of the server's security certificate in the "thumbprint" key, e.g. "thumbprint":
                "CA:FE:18:99:11:22:33:44:55:A2:29:FC:59:47:7C:AB:CD:AB:AA:99", or add the key-value pair or supply the server's security certificate file path(in .pem format) in the
                "certificate_path", eg. "path/to/cert.pem" or set "verification_mode": "NONE" to skip certificate verification for this server. Note that your server's
                thumbprint/certificate path will be different from the example. The only value acceptable for "verification_mode" is "NONE"(case-sensitive), and "thumbprint",
                "certificate_path" and "verification_mode" are mutually exclusive. IMPORTANT: Switch to using certificates as thumbprints will be deprecated soon
                Type: dictionary
            target:
                Optional for the "esxi" section. When deploying to a resource pool, this is the path to the resource pool on the ESXi host where the appliance will be deployed. Be sure to
                include the "Resources" item. For example, "target": ["Resources", "My Resource Pool"]. Nested resouce pools may also be specified.  For example, "target": ["Resources",
                "Parent Pool", "Child Pool"]. All names are case-sensitive. Note that prechecks only verify the memory of the resource pool.
                Type: string, array
        ===================================================================================================================================================================================
        appliance:
            This subsection describes the configuration parameters for the new upgraded appliance.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            thin_disk_mode:
                To deploy the appliance with thin mode virtual disks, set the value to 'true'.
                Type: boolean (true or false)
            deployment_option:
                The type of appliance to deploy.
                Type: None
            image:
                A local file path or URL to the vCenter Server Appliance 8.0.3.00000 installation package. The source is included in the installer ISO file.
                Type: string
            image_url_ssl_certificate_verification:
                Supply the SHA-1 thumbprint (fingerprint) of the server's security certificate in the "thumbprint" key, e.g. "thumbprint":
                "CA:FE:18:99:11:22:33:44:55:A2:29:FC:59:47:7C:AB:CD:AB:AA:99", or add the key-value pair "verification_mode": "NONE" to skip certificate verification for this server. Note
                that your server's thumbprint will be different from the example. The only value acceptable for "verification_mode" is "NONE" (case-sensitive), and "thumbprint" and
                "verification_mode" are mutually exclusive.
                Type: dictionary
            ===============================================================================================================================================================================
            license:
                License key to be applied to the appliance. If the license key is not provided, evaluation license will be used.
                Type: dictionary
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                key:
                    License key.
                    Type: string
                name:
                    User defined name for the license key.
                    Type: string
            name:
                The name of the appliance to deploy.
                Type: string
            ovftool_path:
                A local file path to OVF Tool executable file.
                Type: string
        ===================================================================================================================================================================================
        os:
            This subsection describes the operating system configurations for the new appliance.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            ssh_enable:
                To enable the SSH administrator login option of the appliance, set the value to 'true'. You can change this setting after deployment.
                Type: boolean (true or false)
        ===================================================================================================================================================================================
        ovftool_arguments:
            Use this subsection to add arbitrary arguments to the OVF Tool command that the script generates. You do not need to fill it out in most circumstances.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            <OVF Tool argument name>:
                Values entered for these keys are passed to OVF Tool without any verification of compatibility with other generated arguments as '--key=value'. Keys that are not arguments
                recognized by OVF Tool will cause the script to fail.
                Type: string, boolean (true or false)
        ===================================================================================================================================================================================
        sso:
            Configure replication
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            first_instance:
                Specifies whether you are converging the first external Platform Services Controller in the domain. Set the value to 'true' if this vCenter Server Appliance instance is
                first in the topology you want to converge. To join a replication partner to an existing vCenter Single Sign-On domain, set the value to 'false'. Ignored if you
                aremigrating vCenter Server with an embedded Platform Services controller.
                Type: boolean (true or false)
            replication_partner_hostname:
                The IP address or fully qualified domain name (FQDN) of the vCenter Server ApplianceReplication partner if converging from an external Platform Services ControllerTo an
                embedded Platform Services Controller. Ignored if the vCenter Server Appliance instance is first in the topology you want to converge.
                Type: string
        ===================================================================================================================================================================================
        temporary_network:
            During upgrade, data is exported from the source appliance and imported into a new appliance. The new appliance requires temporary network settings during this process. After
            the export and import complete, the new appliance assumes the network identity of the source appliance and stops using the temporary network settings. The network information
            provided for the temporary network must be distinct from the networking identity of the source appliance, and must provide connectivity between the source and the new
            appliance.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            ip_family:
                Network IP address family.
                Type: JSON string with one of the following values: "ipv4", "ipv6"
            mode:
                Network mode. Use this parameter to select how to allocate the IP address of the appliance.
                Type: JSON string with one of the following values: "static", "dhcp"
            ip:
                Network IP address. Required only if the mode is "static". Can be IPv4 or IPv6 based on the specified address family.
                Type: string
            dns_servers:
                A comma-separated list of IP addresses of DNS servers. Can be a JSON array such as ["1.2.3.4", "127.0.0.1"] or a serialized string such as "1.2.3.4,127.0.0.1".The DNS
                Servers must be able to resolve the legacy vCenter Server's name.
                Type: string, array
            prefix:
                Network prefix length. Use only when the mode is 'static'. Remove if the mode is 'dhcp'. This is the number of bits set in the subnet mask; for instance, if the subnet
                mask is 255.255.255.0, there are 24 bits in the binary version of the subnet mask, so the prefix length is 24. If used, the values must be in the inclusive range of 0 to
                32 for IPv4 and 0 to 128 for IPv6.
                Type: string
            gateway:
                The IP address of the default gateway. Can be "default" when using IPv6.
                Type: string
        ===================================================================================================================================================================================
        user_options:
            This subsection lets you control aspects of upgrade for particular components.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            vcdb_migrateSet:
                Set data upgrade options. The available values are 'core', 'all', 'core_events_tasks'. The default value is 'all'.
                Type: string
    =======================================================================================================================================================================================
    source_vc:
        This section describes the source appliance that you want to upgrade and the ESXi host on which the appliance is running.
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        description:
            This section describes the source appliance which you want to upgrade and the ESXi host on which the appliance is running.
        ===================================================================================================================================================================================
        managing_esxi_or_vc:
            This subsection describes the ESXi host on which the source appliance is running.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            hostname:
                IP address or fully qualified domain name (FQDN) of the ESXi or vCenter host. If an FQDN is provided, it has to be resolvable from the machine that is running the
                installer.
                Type: string
            username:
                Username of a user with administrative privileges on the ESXi or vCenter host.
                Type: string
            password:
                Password of the administrative user on the ESXi or vCenter host. If left blank, or omitted, you will be prompted to enter it at the command console during template
                verification.
                Type: string
            port:
                The port number of the ESXi host. The default value is 443.
                Type: integer
            ssl_certificate_verification:
                Supply the SHA-1 thumbprint (fingerprint) of the server's security certificate in the "thumbprint" key, for example, "thumbprint":
                "CA:FE:18:99:11:22:33:44:55:A2:29:FC:59:47:7C:AB:CD:AB:AA:99", or add the key-value pair or supply the server's security certificate file path(in .pem format) in the
                "certificate_path", for example, "path/to/cert.pem" or set "verification_mode": "NONE" to skip certificate verification for this server. Note that your server's
                thumbprint/certificate path will be different from the example. The only value acceptable for "verification_mode" is "NONE" (case-sensitive), and 'verification_mode' is
                mutually exclusive to 'thumbprint and 'certificate_path', i.e if 'verification_mode' is provided, you cannot provide 'thumbprint' or 'certificate_path' IMPORTANT: Switch
                to using certificates as thumbprints will be deprecated soon
                Type: dictionary
        ===================================================================================================================================================================================
        vc_vcsa:
            This subsection describes the source appliance that you want to upgrade.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            hostname:
                IP address or fully qualified domain name (FQDN) of the source appliance. If an FQDN is provided, it has to be resolvable from the machine that is running the installer.
                Type: string
            username:
                vCenter Single Sign-On administrator user name of the source appliance. If you do not set this value, the default value is 'administrator@<SSO domain-name>'.
                Type: string
            password:
                vCenter Single Sign-On administrator password of the source appliance. If left blank, or omitted, you will be prompted to enter it at the command console during template
                verification.
                Type: string
            root_password:
                Password of the operating system root user of the appliance. If left blank, or omitted, you will be prompted to enter it at the command console during template
                verification.
                Type: string
            export_dir:
                Directory to export source configuration and data.
                Type: string
            ssl_certificate_verification:
                Supply the SHA-1 thumbprint (fingerprint) of the server's security certificate in the "thumbprint" key, for example, "thumbprint":
                "CA:FE:18:99:11:22:33:44:55:A2:29:FC:59:47:7C:AB:CD:AB:AA:99", or add the key-value pair or supply the server's security certificate file path(in .pem format) in the
                "certificate_path", for example, "path/to/cert.pem" or set "verification_mode": "NONE" to skip certificate verification for this server. Note that your server's
                thumbprint/certificate path will be different from the example. The only value acceptable for "verification_mode" is "NONE" (case-sensitive), and 'verification_mode' is
                mutually exclusive to 'thumbprint and 'certificate_path', i.e if 'verification_mode' is provided, you cannot provide 'thumbprint' or 'certificate_path' IMPORTANT: Switch
                to using certificates as thumbprints will be deprecated soon
                Type: dictionary
    =======================================================================================================================================================================================
    source_vum:
        This section describes the source VUM that you want to upgrade.
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        ===================================================================================================================================================================================
        run_migration_assistant:
            This subsection describes the os credentials of the source Windows VUM installation and the ESXi host on which the source Windows VUM is running. Provide this subsection only
            when you want to install and run Migration Assistant automatically.
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            esxi_hostname:
                IP address or fully qualified domain name (FQDN) of the ESXi host. If an FQDN is provided, it has to be resolvable from the machine that is running the installer.
                Type: string
            esxi_username:
                Username of a user with administrative privileges on the ESXi host.
                Type: string
            esxi_password:
                The password of the ESXi host user. If left blank, or omitted, you will be prompted to enter it at the command console during template verification.
                Type: string
            esxi_port:
                The port number of the ESXi host. The default value is 443.
                Type: integer
            vum_hostname:
                IP address or fully qualified domain name (FQDN) of the VUM host. If an FQDN is provided, it has to be resolvable from the machine that is running the installer.
                Type: string
            vum_os_username:
                Administrator username for the source VUM Windows operating system.
                Type: string
            vum_os_password:
                Administrator user password for the source VUM Windows operating system. If left blank, or omitted, you will be prompted to enter it at the command console during template
                verification.
                Type: string
            migration_port:
                Migration Assistant port number. The default value is 9123, e.g. "migration_port": 9123
                Type: integer
            esxi_ssl_certificate_verification:
                Supply the SHA-1 thumbprint (fingerprint) of the server's security certificate in the "thumbprint" key, for example, "thumbprint":
                "CA:FE:18:99:11:22:33:44:55:A2:29:FC:59:47:7C:AB:CD:AB:AA:99", or add the key-value pair or supply the server's security certificate file path(in .pem format) in the
                "certificate_path", for example, "path/to/cert.pem" or set "verification_mode": "NONE" to skip certificate verification for this server. Note that your server's
                thumbprint/certificate path will be different from the example. The only value acceptable for "verification_mode" is "NONE" (case-sensitive), and 'verification_mode' is
                mutually exclusive to 'thumbprint and 'certificate_path', i.e if 'verification_mode' is provided, you cannot provide 'thumbprint' or 'certificate_path' IMPORTANT: Switch
                to using certificates as thumbprints will be deprecated soon
                Type: dictionary
            export_dir:
                Directory to export source configuration and data.
                Type: string
    =======================================================================================================================================================================================
    ceip:
        VMware Customer Experience Improvement Program (CEIP)
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        description:
            This product participates in VMware's Customer Experience Improvement Program ('CEIP'). Details regarding the data collected through CEIP and the purposes for which it is used
            by VMware are set forth at the Trust & Assurance Center at http://www.vmware.com/trustvmware/ceip.html. To join the CEIP for this product, in the template, set 'ceip_enabled':
            true. To leave the CEIP for this product, set 'ceip_enabled': false. Please confirm your acknowledgement by passing in the parameter --acknowledge-ceip in the command line.
        ===================================================================================================================================================================================
        settings:
            CEIP participation options
        -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            ceip_enabled:
                This key describes the enabling option for the VMware's Customer Experience Improvement Program (CEIP). By default we have 'ceip_enabled': true, which indicates that you
                are joining CEIP. If you prefer not to participate in the VMware's CEIP for this product, you must disable CEIP by setting 'ceip_enabled': false. You may join or leave
                VMware's CEIP for this product at any time.
                Type: boolean (true or false)

Template help ended successfully.

[embedded_vCSA_on_ESXi.json] を使用してアップグレードを実行する

アップグレードの実行は、vcsa-cli-installer/mac(ご利用の OS)/vcsa-deploy を使用
して実行します。

<参考>
CLI を使用した vCenter Server Appliance のアップグレード

まずは、アップグレードを実行する前に –precheck-only を使用して事前チェックを
行ってみます。
以下のように SUCCEEDED と表示されれば OK です。
事前チェック実行時のログ保存先も以下から分かります。

User@MacBook-Pro ./vcsa-deploy upgrade --accept-eula --no-ssl-certificate-verification --precheck-only /Users/test/Documents/embedded_vCSA_on_ESXi.json


Run the installer with "-v" or "--verbose" to log detailed information
precheck_rpm_path is not provided. OVA will be used for further processing.
Updating log file location, copying '/var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-05-ibcsovk1/vcsa-cli-installer.log' to desired location as a backup: '/var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-05-ibcsovk1/workflow_1734267903012/vcsa-cli-installer.log.bak'
Consuming the installer build:24225178
Workflow log-dir /var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-05-ibcsovk1/workflow_1734267903012
precheck_rpm_path = None
=============================================================================== [START] Start executing Task: To validate CLI options at 13時05分03秒 
:
:
:
============================= [SUCCEEDED] Successfully executed Task 'Precheck ovftool commandline parameters to deploy a vCenter Server Appliance' in TaskFlow 'embedded_vCSA_on_ESXi' at 13時06分55秒 =============================
=========================================================================================================== 13時06分55秒 ===========================================================================================================
Result and Log File Information...
WorkFlow log directory: /var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-05-ibcsovk1/workflow_1734267903012

事前にチェックに成功したら、本番のアップグレードを実行します。

User@MacBook-Pro ./vcsa-deploy upgrade --accept-eula --no-ssl-certificate-verification /Users/test/Documents/embedded_vCSA_on_ESXi.json

Run the installer with "-v" or "--verbose" to log detailed information
Not executing pre-check-only.
Updating log file location, copying '/var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-25-5djn2o8y/vcsa-cli-installer.log' to desired location as a backup: '/var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-25-5djn2o8y/workflow_1734269100072/vcsa-cli-installer.log.bak'
Consuming the installer build:24225178
Workflow log-dir /var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-25-5djn2o8y/workflow_1734269100072
precheck_rpm_path = None

=================================================================================================================================
**********************************************************************************************
**********************************************************************************************
=================================================================================================================================

=============================================================================== [START] Start executing Task: To validate CLI options at 13時25分10秒 
:
:
:
==========VCSA Deployment Progress Report==========         Task: Install required RPMs for the appliance.(SUCCEEDED 100/100)       - Task has completed successfully.         Task: Run appliance precheck.(SUCCEEDED 100/100)
- Task has completed successfully.         Task: Export existing appliance data.(SUCCEEDED 100/100)        - Task has completed successfully.         Task: Run firstboot scripts.(SUCCEEDED 100/100) - Task has completed
successfully.         Task: Import data into appliance.(SUCCEEDED 100/100)    - Task has completed successfully.
Successfully completed VCSA deployment.  VCSA Deployment Start Time: 2024-12-15T13:30:58.740Z VCSA Deployment End Time: 2024-12-15T14:17:49.066Z
============================================= [SUCCEEDED] Successfully executed Task 'MonitorDeploymentTask: Monitoring Deployment' in TaskFlow 'embedded_vCSA_on_ESXi' at 14時22分33秒 =============================================
Monitoring VCSA Deploy task completed
================================================================= [START] Start executing Task: Provide the login information about new appliance. at 14時22分41秒 =================================================================
    Appliance Name: vCenterServer80U3d_system
    System Name: ss017.home.com
    System IP: 192.168.1.17
    Log in as: Administrator@vsphere.local
The vCenter Server will currently be in the evaluation-mode
=================================== [SUCCEEDED] Successfully executed Task 'ApplianceLoginSummaryTask: Provide appliance login information.' in TaskFlow 'embedded_vCSA_on_ESXi' at 14時22分45秒 ===================================
=========================================================================================================== 14時22分52秒 ===========================================================================================================
Result and Log File Information...
WorkFlow log directory: /var/folders/4z/b9y_2hld11sgmb4dwmr_y9nh0000gn/T/vcsaCliInstaller-2024-12-15-13-25-5djn2o8y/workflow_1734269100072

SUCCEEDED と表示されれば OK です。
上記だと 45 分程度でアップグレードが完了しましたが、途中ネットワークの問題
が起きたため実際は 30 分前後で終わるかと思います。

GUI での手順の場合は Stage1/Stage2 とそれぞれ操作が必要となりますが、
CLI での手順の場合はコマンド実行後はアップグレード完了まで一気に処理を
行なってくれるため非常に便利だと思いました。
※CLI を使用した新規インストールの場合にも一気に処理を行なってくれる。

CLI でのアップグレードを実施するにあたり、事前チェックにて何度か失敗したため
失敗時のエラー内容と対処法について、いくつか記載しておきます。


Failed to authenticate to the source vCenter Server using the provided
credentials.

原因: json ファイルに記載した source_vc の SSO 認証情報に typo がありました。

2024-12-15 12:18:44,516 - vCSACliInstallLogger - ERROR - Error message: Errors encountered during the requirements verification process: 
Problem ID: ur.sourceVC.cannotAuthenticate Title: Failed to authenticate to the source vCenter Server using the provided credentials. 
Details: A problem occurred during authentication to the source vCenter Server using the provided credentials. Suggested Resolution: 
Verify that the source vCenter Server is up and running. Verify that you provided the correct vCenter Single Sign-On credentials.

DNS server maps host name test.home.com to address(es) 192.168.0.17
which seems to be assign not to eth0 ip address or not a local ip address.

原因: ソース vCenter Server にて DNS を使用した正引きに失敗していた。

2024-12-15 12:57:27,926 - vCSACliInstallLogger - ERROR - Error message: Errors encountered during the requirements verification process: 
Title: DNS server maps host name test.home.com to address(es) 192.168.0.17 which seems to be assign not to eth0 ip address or 
not a local ip address. Details: DNS server maps host name ss017.home.com to address(es) 192.168.0.17 which seems to be assign not to 
eth0 ip address or not a local ip address. Suggested Resolution: Update appliance /etc/hosts or /etc/resolv.conf file to properly access 
DNS servers or update appliance DNS servers with the proper host name mapping or configure right network configuration on eth0. 
To check if DNS has record about local host name, execute `dig test.home.com +short` locally on the appliance, or 
`nslookup test.home.com` on a windows machine.

template ‘/Users/test/Documents/embedded_vCSA_on_ESXi.json’
has ceip_enabled set to True, but the command line doesn’t have
–acknowledge-ceip.

原因: ceip_enabled を true にする場合は、コマンド実行時に acknowledge-ceip
   オプションを付与する必要がある。
   (ceip_enabled を false にしていたが、”false”(二重引用符で囲む) にしてたことで
   true と認識されていました。)

2024-12-15 12:15:21,770 - vCSACliInstallLogger - ERROR - Error message: template '/Users/test/Documents/embedded_vCSA_on_ESXi.json' 
has ceip_enabled set to True, but the command line doesn't have --acknowledge-ceip. You must pass in the --acknowledge-ceip command line 
option to confirm your acknowledgement about your VMware Customer Experience Improvement Program (CEIP) participation.
タイトルとURLをコピーしました