Deploying vCSA in 6.5 normally means that you need to run through the manual process using your web browser. However there is another method, vcsa-deploy.exe if you like the idea of having it scripted as a re-usable configured deployment.
I though i would give this a try using the following script i have put together for the recent 6.5u1 vCSA release.
The vcsa-cli-installer\templates folder hosts all the templates that can be selected and you can tailor your modified .json file by adding/removing attributes as required (however don’t forget the options depend on the template you will be using)
“new.vcsa”: {
“esxi”: {
“hostname”: “”,
“username”: “root”,
“password”: “”,
“deployment.network”: “VM Network”,
“datastore”: “ESXi host datastore, or a specific datastore in a datastore cluster.>”
The script below will deploy a vCSA to esxi host 192.168.1.5, the deployment used will be an install (you could script migrate/upgrade) and use the database tiny option (as we are managing 10 or less hosts), it has been told all the relevant IP details to configure and the datastore it will be placed on.
Don’t forget the memory requirements, even a tiny vCSA required 10GB of RAM.
You of course need to be connected by a connect-viserver to the ESXi node to run
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| # Convert JSON file to PowerShell object
$configconfig = "D:\VMware-VCSA-all-6.5.0-8024368\vcsa-cli-installer\templates\install\embedded_vCSA_on_ESXi.json"
$deploy = "D:\VMware-VCSA-all-6.5.0-8024368\vcsa-cli-installer\win32\vcsa-deploy.exe install --accept-eula --acknowledge-ceip "
$UpdatedConfig = "D:\VMware-VCSA-all-6.5.0-8024368\config.json"
$config = (Get-Content -Raw $configconfig) | ConvertFrom-Json
# vCSA system information
$config."new.vcsa".os.password="VMw@re123"
$config."new.vcsa".sso.password = "VMw@re123"
$config."new.vcsa".sso."site-name" = "Default-Site"
# ESXi Host Information
$config."new.vcsa".esxi.hostname="192.168.1.5"
$config."new.vcsa".esxi.datastore="Datastore1"
$config."new.vcsa".esxi.username="root"
$config."new.vcsa".esxi.password="VMw@re123"
$config."new.vcsa".esxi."deployment.network"="VM Network"
$config."new.vcsa".appliance."deployment.option"="tiny"
$config."new.vcsa".appliance.name="MGMT-vCSA65u1"
# Networking
$config."new.vcsa".network.mode = "static"
$config."new.vcsa".network.ip = "192.168.1.25"
$config."new.vcsa".network.prefix = "24"
$config."new.vcsa".network.gateway = "192.168.1.1"
$config."new.vcsa".network."dns.servers"="192.168.1.1"
$config."new.vcsa".network."system.name"="MGMT-vCSA65u1.local"
$config | ConvertTo-Json | Set-Content -Path "$UpdatedConfig"
iex "$deploy $UpdatedConfig" |
Recent Comments