{"id":89,"date":"2024-07-04T17:19:52","date_gmt":"2024-07-04T10:19:52","guid":{"rendered":"https:\/\/eatmaja.co.id\/eka\/?p=89"},"modified":"2024-07-04T17:19:52","modified_gmt":"2024-07-04T10:19:52","slug":"how-to-patch-the-vcenter-server-appliance-via-cli","status":"publish","type":"post","link":"https:\/\/www.eatmaja.co.id\/eka\/2024\/07\/04\/how-to-patch-the-vcenter-server-appliance-via-cli\/","title":{"rendered":"How to patch the vCenter Server Appliance via CLI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">There are several ways for patching your VMware vCenter Server Appliance. In this article i\u2019d like to show how i do it with the CLI.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Preparation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First of all log in to the vCenter Server Appliance Management Interface to check which updates are available for your VCSA (vCenter Server Appliance). The URL is https:\/\/your_appliance_ip_or_dns:5480<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_checkforupdates.png\" alt=\"vcsa_checkforupdates\" class=\"wp-image-141\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you go and check for updates online, you can see which version exists. In my example i marked the existing build number in a red box and the available patch with build number in a green box. The patch level in the green box is the way to go for me.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you can download the patch .iso file from your VMware portal. Therefore go to the following URL and download the aimed patch .iso file.<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/my.vmware.com\/de\/group\/vmware\/patch#search\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In my case i\u2019m looking for VCSA 6.5.0.5300 Build Number 5178943<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_myvmwarepatchiso.png\" alt=\"vcsa_myvmwarepatchiso\" class=\"wp-image-151\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After you have found your aimed patch, download it. Make sure you have selected the correct .iso file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to upload the patch .iso file to an existing datastore and attach the iso to your vCenter Server Appliance VM.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_attachisotoappliance.png\" alt=\"vcsa_attachisotoappliance\" class=\"wp-image-154\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After you have attached the patch .iso to your VCSA, you have to enable the SSH service and the Bash Shell. Have a look here on how to activate it:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/docs.vmware.com\/en\/VMware-vSphere\/6.5\/com.vmware.vsphere.vcsa.doc\/GUID-D58532F7-E48C-4BF2-87F9-99BA89BF659A.html\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Patching the appliance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When activated SSH and the Bash Shell you can easily connect to your VCSA with putty or another preferred tool for SSH sessions. You should see the following screen.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_connecttovcsa.png\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_connecttovcsa.png\" alt=\"vcsa_connecttovcsa\" class=\"wp-image-171\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After successfully logging in to the VCSA CLI you can stage the packages located in the patch .iso file with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>software-packages stage --iso<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_stageiso.png\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_stageiso.png\" alt=\"vcsa_stageiso\" class=\"wp-image-172\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can see, that the .iso file has been mounted successfully. The next step is to accept the terms and conditions to further move on.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_accepttermsandconds.png\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_accepttermsandconds.png\" alt=\"vcsa_accepttermsandconds\" class=\"wp-image-167\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you accepted the terms and conditions the needed packages will be staged. If everything goes fine you will see the output \u201cStaging process completed successfully\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After the packages have been staged, you can one again verify which packages will be installed with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>software-packages list --staged<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will list out which packages, respective which version and build number has been staged to install it.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_verifiybuildnumbertostage.png\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_verifiybuildnumbertostage.png\" alt=\"vcsa_verifiybuildnumbertostage\" class=\"wp-image-162\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you double-checked it, you can move on to install the staged packages with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>software-packages install --staged<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will install the staged packages to the VCSA.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_installstagedpackages.png\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_installstagedpackages.png\" alt=\"vcsa_installstagedpackages\" class=\"wp-image-163\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If everything went fine you will see an output stating \u201cPackages upgraded successfully, Reboot is required to complete the installation\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means you have successfully installed the packages and therefore patched the vCenter Server Appliance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next time you are logging in to your Appliance Management a message will appear stating that you need to reboot the appliance. Once you did it, you can verify if the Appliance is running the desired patch level with the desired build number.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_checkbuildnumber.png\"><img decoding=\"async\" src=\"http:\/\/www.virtualhome.blog\/wp-content\/uploads\/2018\/12\/vcsa_checkbuildnumber.png\" alt=\"vcsa_checkbuildnumber\" class=\"wp-image-164\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So, this is my approach on patching a vCenter Server Appliance. I like the CLI method rather than clicking inside the Appliance Management because iam able to see what is really happening during patching.<\/p>\n\n\n\n<p class=\"has-text-align-right wp-block-paragraph\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.virtualhome.blog\/2018\/12\/26\/how-to-patch-the-vcenter-server-appliance-via-cli\/\">narasumber<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are several ways for patching your VMware vCenter Server Appliance. In this article i\u2019d like to show how i do it with the CLI. Preparation First of all log&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,11,22],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-instalasi","category-maintenance","category-vmware"],"_links":{"self":[{"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":0,"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eatmaja.co.id\/eka\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}