Build A Cloud Automation Service Ready CentOS Template

Build A Cloud Automation Service Ready CentOS Template

This post was originally published on this site ---


In previous post (here) I walked through how to build a Ubuntu template that was ready to be use in Cloud Automation Services. In this follow-up post I will walkthrough the process to make a Cloud Automation Service Ready CentOS template. This one is super easy!!



  • downloaded copy of CentOS (I test this with CentOS 7 and 8)
  • A working vSphere environment.
  • A subscription to VMware Cloud Automation Services.
  • About 15 minutes!!


Deploying the CentOS Image:


Again, I am going to assume that you have deployed many an OS image via a provided ISO so I am not going to go step through that process. A couple suggestions, but not mandatory, when you go through the initial CentOS build:


  • Try to use DHCP from the start. It will prevent you from having to change it to DHCP later (if, of course, you’re going to use DHCP which will make life easier)
  • Make sure to keep auto-updates off. It can cause issues down the road that are a pain to troubleshoot.


Configuring the Image:


The below steps are the important ones when creating a template that will work great with Cloud Assembly.

  1. After going through the initial install, log in as root through SSH (for easy copy and paste).
  2. After you have complete the initial installation of CentOS, you will need to install cloud-init.
    • yum install -y cloud-init
  3. Now that cloud-init is install you need to create a custom network configuration.
    • vi /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
    • Add the following line to that file: network: {config: disabled}
    • Save the changes to the file.
  4. Perform any image level configurations you wish. (for example: disable firewall <systemctl disable firewalld> or disable root login, etc, etc.)
  5. Run the following command to clean cloud-init.
    • cloud-init clean

THAT’S IT!!! You’re done. Shutdown the VM and convert it to a template.


Using the Content Catalog in Cloud Assembly


Cloud Assembly can use the content catalog as a source for templates as well as using templates that are stored on clusters associated to the vCenters you used for Cloud Accounts. Now that you have your template you can ‘Clone to Library’ to put the template into a content library.



Next, in Cloud Assembly, go to your vSphere Cloud account and click on the Sync Images button.



Finally, you can go into Image Mappings and select the template hosted on a cluster or from the Content Catalog.



You now have a an CentOS template ready to be deployed via a Cloud Assembly blueprint and ready to be configured using Cloud Config.



In Closing….


Using the steps above you now have CentOS templates that is ready to be used in Cloud Assembly with cloud-init. In a future post I will show how to create a Windows Server template for Cloud Assembly.


The post Build A Cloud Automation Service Ready CentOS Template appeared first on VMware Cloud Management.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.