如何使用CLI命令行部署VMware VCSA 7 \ vCSA 7 (vCenter 7)
使用CLI 部署 vCenter Server Appliance 7
使用CLI命令行安装部署 vCenter Server Appliance 7
1、使用CLI命令行安装部署,embedded_vCSA_on_ESXi.json (ESXi 7未加入集群)
# embedded_vCSA_on_ESXi.json ESXi 7 未加入vCenter集群
{
"__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": "10.33.201.202", #esxi的fqdn或ip
"username": "root",
"password": "ESXi的密码",
"deployment_network": "VM Network",
"datastore": "Datastore" #存放的数据存储
},
"appliance": {
"thin_disk_mode": true, #硬盘模式:精简制备
"deployment_option": "medium", #部署大小:tiny small medium large,分别为 微、小、中、大
"name": "www.zhangfangzhou.cn" #vCenter-Server-Appliance的名字
},
"network": {
"ip_family": "ipv4",
"mode": "static",
"ip": "10.33.201.80",
"prefix": "22", #网络前缀24位
"gateway": "10.33.200.1",
"dns_servers": [
"10.33.123.60"
]
},
"os": {
"password": "密码",
"ntp_servers": "ntp.aliyun.com",
"ssh_enable": true #ssh开启
},
"sso": {
"password": "密码",
"domain_name": "zhangfangzhou.cn" #sso域名
}
},
"ceip": {
"description": {
"__comments": [
"++++VMware Customer Experience Improvement Program (CEIP)++++",
"--acknowledge-ceip in the command line.",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
]
},
"settings": {
"ceip_enabled": false #不参加(CEIP)客户体验改善计划
}
}
}
注意事项
"system.name": "10.0.0.30" #系统名称,全域名,例vc.vsphere.local如果FQDN不能解析,请使用IP地址作为系统名称,不然会Firstboot Error
vcsa-deploy.exe install --accept-eula --no-ssl-certificate-verification -t E:\ISO\ESXi\VMware-VCSA-all-7.0.3-18700403\vcsa-cli-installer\templates\install\embedded_vCSA_on_ESXi.json
DRS Warning: The target ESXi host '10.33.201.202' is managed by vCenter Server
'10.33.201.200'. If any of these hosts are in a cluster, and DRS is enabled,
vMotion can take effect and adversely impact the installation, upgrade, or
migration processes. It is recommended that you use the *_on_VC.json template
file for the target ESXi host if it is managed by a vCenter Server, and ensure
the ESXi hosts you have specified are not members of clusters with DRS set to
Fully Automated during the installation, upgrade, or migration processes.
2 、使用CLI命令行安装部署,embedded_vCSA_on_VC.json ESXi 7已经加入vCenter集群
"deployment_option": "medium", #部署大小:tiny small medium large,分别为 微、小、中、大
#######################################################################################################
例子1
{
"__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": {
"hostname": "10.33.201.66",
"username": "administrator@zhangfangzhou.cn",
"password": "vCenter Server 的密码",
"deployment_network": "VM Network",
"datacenter": [
"Datacenter" #数据中心名称
],
"datastore": "NFS1", #存储
"target": [
"Cluster1", "10.33.220.99" #集群名称和目标ESXi主机
]
},
"appliance": {
"thin_disk_mode": true,
"deployment_option": "medium",
"name": "www.zhangfangzhou.cn"
},
"network": {
"ip_family": "ipv4",
"mode": "static",
"system_name": "10.33.220.82",
"ip": "10.33.220.82",
"prefix": "24",
"gateway": "10.33.220.1",
"dns_servers": [
"223.5.5.5,114.114.114.114"
]
},
"os": {
"password": "密码",
"ntp_servers": "ntp.aliyun.com",
"ssh_enable": true
},
"sso": {
"password": "密码",
"domain_name": "zhangfangzhou.cn"
}
},
"ceip": {
"description": {
"__comments": [
"++++VMware Customer Experience Improvement Program (CEIP)++++",
"--acknowledge-ceip in the command line.",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
]
},
"settings": {
"ceip_enabled": false
}
}
}
#######################################################################################################
C:\Users\Administrator>e:
E:\>cd E:\ISO\ESXi\VMware-VCSA-all-7.0.3-18778458\vcsa-cli-installer\win32
E:\ISO\ESXi\VMware-VCSA-all-7.0.3-18778458\vcsa-cli-installer\win32>
vcsa-deploy.exe install --accept-eula --no-ssl-certificate-verification -t E:\ISO\ESXi\VMware-VCSA-all-7.0.3-18778458\vcsa-cli-installer\templates\install\embedded_vCSA_on_VC.json
vCenter Server Appliance 的 CLI 部署
https://docs.vmware.com/cn/VMware-vSphere/7.0/vsphere-vcenter-server-703-installation-guide.pdf
CLI 部署命令的语法
https://docs.vmware.com/cn/VMware-vSphere/7.0/com.vmware.vcenter.install.doc/GUID-15F4F48B-44D9-4E3C-B9CF-5FFC71515F71.html
--accept-eula 接受最终用户许可协议(最终用户许可协议; End User License Agreement;)。
--no-esx-ssl-verify 跳过 ESXi 连接的 SSL 验证。
--no-ssl-certificate-verification 跳过所有服务器连接的安全证书验证。
-v, --verbose 将调试信息添加到控制台输出。
-t, --terse 隐藏控制台输出。仅显示警告消息和错误消息。
--verify-template-only 对 JSON 文件中的配置参数执行基本模板验证。不部署设备。
--precheck-only 仅执行基本模板验证和 OVF Tool 参数验证。不部署设备。
https://www.zhangfangzhou.cn/cli-install-vcsa.html