creating a VMware CentOS 7 Template


This post will help your creating a CentOS 7 Template for VMware.

Getting started

Install CentOS 7 on any VMware virtualization product with “Minimal Install” for the software selection. You can find the most recent install image here.
Please use a VM hardware version of 10, if you want to deploy your CentOS template to vSphere 5.5 or vCloud Air.

After successful installation login and upgrade packages to the latest version:

Customization

The template will not have a root password nor an admin user password. You will require a private SSH key to login into the VM.

The following lines can either be copied and pasted into a shell or issued step by step:

Notes

Starting with Open VM Tools 9.10 the deployPkg (open-vm-tools-deploypkg) is not needed anymore. Please see VMware support for Open VM Tools.

CentOS 7 is only supported starting with vSphere 6. As a workaround to deploy your CentOS template to vSphere 5.5 or vCloud Air and use VM customization, please uncomment the line to modify /etc/redhat-release.


Leave a comment

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

4 thoughts on “creating a VMware CentOS 7 Template

    • Christopher Banck
      Christopher Banck Post author

      Yes, I’m using CentOS 7.2.
      If you are using vSphere 5.5, have you modified /etc/redhat-release? The line is uncommented and only necessary for vSphere versions earlier than vSphere 6, which supports CentOS 7 natively.

  • swaroop

    Hi i am Swaroop, we had an existing centos 6 template. I am cloning from the centos 6 template using java code (vsphere api). When is power on the cloned server i am able to successfully assign a desired ip address using customization spec from the code like (CustomizationFixedIp fixedIp = new CustomizationFixedIp();
    fixedIp.setIpAddress(“192.168.5.140”);
    CustomizationIPSettings customizationIPSettings = new CustomizationIPSettings();
    customizationIPSettings.setIp(fixedIp);)
    We created a new Centos 7 template and when i clone, i am able to assign the desired ip-address or no ip-address is assigned. When is go to edit settings of the cloned centos 7 server the network adapter is not ticked. While in cloned centos 6 server the network adapter is automatically ticked .

    What do you suggest or think what might be the difference in the templates centos 6 and 7. I even compared the network scripts eth01 and network file and replicated the same on to centos 7 template and still same issue. But when i manually clone from the vsphere client the vmware is able to assign a random ip address. Note: when cloning from java for centos 6 template the network adapter is getting ticked and for centos 7 it is not getting ticked. Kindly need you help or suggestions.

    • swaroop

      Sorry there are some typing errors,
      When i power on the cloned server i am able to successfully assign a desired ip address which is preset using customisation spec from the code like

      We created a new Centos 7 template and when i cloned a server, i am not able to assign the desired ip-address or no ip-address is assigned. When i go to edit settings of the cloned centos 7 server the network adapter is not ticked. While in cloned centos 6 server the network adapter is automatically ticked .