# Creating a CentOS/RHEL 7 Image

## About this task

Create a new virtual machine in VMware vCenter and install a base version of your preferred Linux distro build. If you are using cloud init as part of your image you will need to ensure your virtual machine has a cdrom.

## Procedure

1. Before installing the operating system setup a single `ext` or `xfs` partition without a swap disk (This is so that growpart can extend the disk. growpart currently does not support lvm)
2. Install the distro and apply any updates to the operating system and security updates
3. Install cloud-init using command `yum install cloud-init`
4. Install cloud-utils-growpart using command `yum install cloud-utils-growpart`
5. Install open-vm-tools using command `yum install open-vm-tools`
6. Install git by running `yum install git`
7. Install epel-release repo using command `yum install epel-release`
8. selinux set to permissive (enforced can cause problems with cloud-init) `sudo vi /etc/selinux/config`

**Subtopics**  

- **[Cloud-Init](https://support.hpe.com/hpesc/public/api/document/sd00007620en_us/render?page=GUID-9C1E97D3-4285-4F70-ACAF-A56767901C74.html)**
- **[Network Interfaces](https://support.hpe.com/hpesc/public/api/document/sd00007620en_us/render?page=GUID-8DA22ED1-6EFE-40DD-B09D-DA883C50017E.html)**
