vcsa6.7命令行部署

vcsa6.7命令行部署

vcsa6.7命令行部署

这种安装方法必须有内网的dns

下载镜像并解压

命令行部署vcsa必须将镜像解压到指定目录
因为cmd命令无法跳转到虚拟光驱的目录
以下镜像文件解压到了C:\vcsa下

d6e14b46ada82290211cb2f070e4648a.png

拷贝配置文件

配置文件目录如下

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

一般部署到esxi需要的配置文件为

embedded_vCSA_on_ESXi.json
#嵌入式vcsa部署在esxi上

注意!!!用来登录到要从中运行 CLI 安装程序的计算机的用户名、 vCenter Server Appliance 安装程序的路径、JSON 配置文件的路径和 JSON 配置文件中的字符串值(包括密码)必须仅包含 ASCII 字符。扩展 ASCII 字符和非 ASCII 字符不受支持ps:说人话就是解压目录,和json配置文件中不能有中文,包括标点以utf-8格式保存文件需要安装 Visual C++ 可再发行库版本 14.0 或更高版本才能在低于 Windows 10 的 Windows 版本上运行此实用程序。这些库的 Microsoft 安装程序位于 vcsa-cli-installer/win32/vcredist 目录中

配置文件详解

配置文件详细解释,不要直接复制这个因为有中文没法用

{
    "__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": "<FQDN or IP address of the ESXi host on which to deploy the new appliance>",
            #esxi的ip
            "username": "root",
            #esxi用户名
    `        "deployment_option": "small",
            #部署大小small小型或者tiny微型
            "name": "Embedded-vCenter-Server-Appliance"
            #vcsa虚拟机名称
        },
        "network": {
            "ip_family": "ipv4",
            "mode": "static",
            #网络静态或者DHCP
            "ip": "<Static IP address. Remove this if using dhcp.>",
            #IP地址
            "dns_servers": [
                "<DNS Server IP Address. Remove this if using dhcp.>"
            ],
            #dns地址
            "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.>",
            #掩码
            "gateway": "<Gateway IP address. Remove this if using dhcp.>",
            #网关
            "system_name": "<FQDN or IP address for the appliance. Remove this if using dhcp.>"
            #vc主机名
        },
        "os": {
            "password": "<Appliance root password; refer to --template-help for password policy. If left blank, or omitted, you will be prompted to enter it at the command console during template verification.>",
            #vcroot密码
            "ntp_servers": "time.nist.gov",
            #ntp服务器地址
            "ssh_enable": false
            #是否开启ssh
        },
        "sso": {
            "password": "<vCenter Single Sign-On administrator password; refer to --template-help for password policy. If left blank, or omitted, you will be prompted to enter it at the command console during template verification.>",
            #sso密码
            "domain_name": "vsphere.local"
            #sso域名不用管
        }
    },
    "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
            #是否加入ceip不用管
        }
    }
}

自用配置文件

直接改参数就可以了

{
    "__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": "172.16.1.61",
            "username": "root",
            "password": "Qxxxxxxx!",
            "deployment_network": "VM Network",
            "datastore": "data2"
        },
        "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": "172.16.1.95",
            "dns_servers": [
                "172.16.1.95"
            ],
            "prefix": "24",
            "gateway": "172.16.1.1",
            "system_name": "172.16.1.95"
        },
        "os": {
            "password": "Qxxxxxxx!",
            "ntp_servers": "time.nist.gov",
            "ssh_enable": false
        },
        "sso": {
            "password": "Qxxxxxxx!",
            "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
        }
    }
}

拷贝编辑好的配置文件到C盘根目录

embedded_vCSA_on_ESXi.json

命令安装

以管理员身份运行cmd

cd C:\vcsa\vcsa-cli-installer\win32
vcsa-deploy install --accept-eula --acknowledge-ceip c:\embedded_vCSA_on_ESXi.json

然后按1接受esxi的密匙
ovf部署完成后,如果卡在2阶段等待期间可以去5480查看安装进度。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容