{"id":644,"date":"2019-12-23T21:20:49","date_gmt":"2019-12-23T21:20:49","guid":{"rendered":"http:\/\/michaelstoica.com\/?p=644"},"modified":"2020-02-14T19:49:24","modified_gmt":"2020-02-14T19:49:24","slug":"installing-vcsa-using-cli","status":"publish","type":"post","link":"https:\/\/michaelstoica.com\/site\/installing-vcsa-using-cli\/","title":{"rendered":"Installing vCSA using CLI"},"content":{"rendered":"<p>While redeploying my homelab I decided to do the vCSA installation using the CLI. After you download the vCSA ISO go to <strong>vcsa-cli-installer\/templates\/install\/<\/strong> and choose the one that your need.<\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-646\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa.png\" alt=\"\" width=\"249\" height=\"216\" \/><\/a><\/p>\n<p>You will need to copy to your local system and edit the json file according to your settings.<\/p>\n<p>This is how the embedded_vCSA_on_ESXi template looks:<\/p>\n<p><span style=\"color: #008000;\"><code>\u00a0{<br \/>\n\"__version\": \"2.13.0\",<br \/>\n\"__comments\": \"Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.\",<br \/>\n\"new_vcsa\": {<br \/>\n\"esxi\": {<br \/>\n\"hostname\": \"&lt;FQDN or IP address of the ESXi host on which to deploy the new appliance&gt;\",<br \/>\n\"username\": \"root\",<br \/>\n\"password\": \"&lt;Password of the ESXi host root user. If left blank, or omitted, you will be prompted to enter it at the command console during template verification.&gt;\",<br \/>\n\"deployment_network\": \"VM Network\",<br \/>\n\"datastore\": \"&lt;A specific ESXi host datastore, or a specific datastore in a datastore cluster.&gt;\"<br \/>\n},<br \/>\n\"appliance\": {<br \/>\n\"__comments\": [<br \/>\n\"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\"<br \/>\n],<br \/>\n\"thin_disk_mode\": true,<br \/>\n\"deployment_option\": \"small\",<br \/>\n\"name\": \"Embedded-vCenter-Server-Appliance\"<br \/>\n},<br \/>\n\"network\": {<br \/>\n\"ip_family\": \"ipv4\",<br \/>\n\"mode\": \"static\",<br \/>\n\"ip\": \"&lt;Static IP address. Remove this if using dhcp.&gt;\",<br \/>\n\"dns_servers\": [<br \/>\n\"&lt;DNS Server IP Address. Remove this if using dhcp.&gt;\"<br \/>\n],<br \/>\n\"prefix\": \"&lt;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.&gt;\",<br \/>\n\"gateway\": \"&lt;Gateway IP address. Remove this if using dhcp.&gt;\",<br \/>\n\"system_name\": \"&lt;FQDN or IP address for the appliance. Remove this if using dhcp.&gt;\"<br \/>\n},<br \/>\n\"os\": {<br \/>\n\"password\": \"&lt;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.&gt;\",<br \/>\n\"ntp_servers\": \"time.nist.gov\",<br \/>\n\"ssh_enable\": false<br \/>\n},<br \/>\n\"sso\": {<br \/>\n\"password\": \"&lt;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.&gt;\",<br \/>\n\"domain_name\": \"vsphere.local\"<br \/>\n}<br \/>\n},<br \/>\n\"ceip\": {<br \/>\n\"description\": {<br \/>\n\"__comments\": [<br \/>\n\"++++VMware Customer Experience Improvement Program (CEIP)++++\",<br \/>\n\"VMware's Customer Experience Improvement Program (CEIP) \",<br \/>\n\"provides VMware with information that enables VMware to \",<br \/>\n\"improve its products and services, to fix problems, \",<br \/>\n\"and to advise you on how best to deploy and use our \",<br \/>\n\"products. As part of CEIP, VMware collects technical \",<br \/>\n\"information about your organization's use of VMware \",<br \/>\n\"products and services on a regular basis in association \",<br \/>\n\"with your organization's VMware license key(s). This \",<br \/>\n\"information does not personally identify any individual. \",<br \/>\n\"\",<br \/>\n\"Additional information regarding the data collected \",<br \/>\n\"through CEIP and the purposes for which it is used by \",<br \/>\n\"VMware is set forth in the Trust &amp; Assurance Center at \",<br \/>\n\"http:\/\/www.vmware.com\/trustvmware\/ceip.html . If you \",<br \/>\n\"prefer not to participate in VMware's CEIP for this \",<br \/>\n\"product, you should disable CEIP by setting \",<br \/>\n\"'ceip_enabled': false. You may join or leave VMware's \",<br \/>\n\"CEIP for this product at any time. Please confirm your \",<br \/>\n\"acknowledgement by passing in the parameter \",<br \/>\n\"--acknowledge-ceip in the command line.\",<br \/>\n\"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\"<br \/>\n]<br \/>\n},<br \/>\n\"settings\": {<br \/>\n\"ceip_enabled\": true<br \/>\n}<br \/>\n}<br \/>\n}<\/code><\/span><\/p>\n<p>After you edit the file this is how it should look like<\/p>\n<p><code><span style=\"color: #008000;\">\"__version\": \"2.13.0\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"__comments\": \"Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"new_vcsa\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"esxi\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"hostname\": \"192.168.1.17\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"username\": \"root\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"password\": \"Passw0rd!\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"deployment_network\": \"Management Network\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"datastore\": \"DataStore01\"<\/span><br \/>\n<span style=\"color: #008000;\"> },<\/span><br \/>\n<span style=\"color: #008000;\"> \"appliance\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"thin_disk_mode\": true,<\/span><br \/>\n<span style=\"color: #008000;\"> \"deployment_option\": \"small\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"name\": \"vcsa\"<\/span><br \/>\n<span style=\"color: #008000;\"> },<\/span><br \/>\n<span style=\"color: #008000;\"> \"network\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"ip_family\": \"ipv4\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"mode\": \"static\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"ip\": \"192.168.1.20\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"dns_servers\": [<\/span><br \/>\n<span style=\"color: #008000;\"> \"192.168.1.10\"<\/span><br \/>\n<span style=\"color: #008000;\"> ],<\/span><br \/>\n<span style=\"color: #008000;\"> \"prefix\": \"24\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"gateway\": \"192.168.1.1\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"system_name\": \"vcsa.mdc.local\"<\/span><br \/>\n<span style=\"color: #008000;\"> },<\/span><br \/>\n<span style=\"color: #008000;\"> \"os\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"password\": \"Passw0rd!\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"ntp_servers\": \"192.168.1.1\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"ssh_enable\": true<\/span><br \/>\n<span style=\"color: #008000;\"> },<\/span><br \/>\n<span style=\"color: #008000;\"> \"sso\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"password\": \"Passw0rd!\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"domain_name\": \"vsphere.local\"<\/span><br \/>\n<span style=\"color: #008000;\"> }<\/span><br \/>\n<span style=\"color: #008000;\"> },<\/span><br \/>\n<span style=\"color: #008000;\"> \"ceip\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"description\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"__comments\": [<\/span><br \/>\n<span style=\"color: #008000;\"> \"++++VMware Customer Experience Improvement Program (CEIP)++++\",<\/span><br \/>\n<span style=\"color: #008000;\"> \"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\"<\/span><br \/>\n<span style=\"color: #008000;\"> ]<\/span><br \/>\n<span style=\"color: #008000;\"> },<\/span><br \/>\n<span style=\"color: #008000;\"> \"settings\": {<\/span><br \/>\n<span style=\"color: #008000;\"> \"ceip_enabled\": true<\/span><br \/>\n<span style=\"color: #008000;\"> }<\/span><br \/>\n<span style=\"color: #008000;\"> }<\/span><br \/>\n<span style=\"color: #008000;\">}<\/span><\/code><\/p>\n<p>You can check that template is ok without installing running<em> PS E:\\vcsa-cli-installer\\win32&gt;.\\vcsa-deploy.exe install &#8211;accept-eula &#8211;verify-template-only c:\\scripts\\EmbeddedvCSA.json<\/em><\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-662\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa1.png\" alt=\"\" width=\"855\" height=\"577\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa1.png 855w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa1-300x202.png 300w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa1-768x518.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/a><\/p>\n<p>Once the test finish and all is good you can run the installation using the following command\u00a0PS E:\\vcsa-cli-installer\\win32&gt; .<em>\\vcsa-deploy.exe install &#8211;acknowledge-ceip &#8211;accept-eula &#8211;no-esx-ssl-verify c:\\script<\/em><em>s\\EmbeddedvCSA.json -v<\/em><\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-664\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa2.png\" alt=\"\" width=\"1090\" height=\"1019\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa2.png 1090w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa2-300x280.png 300w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa2-768x718.png 768w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa2-1024x957.png 1024w\" sizes=\"auto, (max-width: 1090px) 100vw, 1090px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-665\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa3.png\" alt=\"\" width=\"893\" height=\"1018\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa3.png 893w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa3-263x300.png 263w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa3-768x876.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-666\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa4.png\" alt=\"\" width=\"905\" height=\"999\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa4.png 905w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa4-272x300.png 272w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2019\/12\/vcsa4-768x848.png 768w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><\/a><\/p>\n<p>Once the installation is finished you can log in vCenter and start the configuration.<\/p>\n<p>Using the CLI installation will save you time for future installations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While redeploying my homelab I decided to do the vCSA installation using the CLI. After you download the vCSA ISO go to vcsa-cli-installer\/templates\/install\/ and choose&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/michaelstoica.com\/site\/installing-vcsa-using-cli\/\">Continue reading<span class=\"screen-reader-text\">Installing vCSA using CLI<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[45,50,13,42],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-general","tag-vcenter","tag-vcsa","tag-vmware","tag-vsphere-6-7","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p63Lge-ao","_links":{"self":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":20,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"predecessor-version":[{"id":692,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/644\/revisions\/692"}],"wp:attachment":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}