Issue link: https://read.uberflip.com/i/1334488
Chapter 2 49 Creating custom CentOS images For most uses, downloading pre-made Ubuntu or CentOS images will be good enough, as they provide an OS with minimal packages installed and are able to invoke extra commands once booted. Sometimes though, the images need extra work; perhaps they need extra disk space as part of their instance storage, or maybe they need to work with a third party where they expect certain tools or scripts to be present. Creating custom OS images for your cloud allows you to install instances just the way you need to. Creating custom Linux images is more complex, as we have greater flexibility on how to use these images in our OpenStack Compute environment. For this next section, we will look at creating the popular CentOS distribution as an OpenStack Compute image. This section is applicable for most Red Hat-based clones in principle. Getting ready To begin with, ensure you're logged into your Ubuntu client and have your cloud credentials sourced into your environment. We need to install the qemu-kvm package to allow us to create the required images as well as ensure that we have the cloud-utils package available, to allow us to upload the image to our OpenStack environment once complete. sudo apt-get update sudo apt-get -y install qemu-kvm cloud-utils If you are using Ubuntu as your client, through VirtualBox, and you don't have enough disk space, simply add in a new disk of at least 20 GB. We will need at least 20 GB to create our new OS cloud installs and temporary files, so that we can upload this to our OpenStack Compute environment. You also need to use an alternative to kvm, named qemu. Your client also needs a VNC client. If you don't have one installed, you can freely download the following: f For Ubuntu, install apt-get -y install gtkvncviewer f For Mac OSX, visit http://sourceforge.net/projects/chicken/ f for Windows, visit http://www.tightvnc.com/download.php www.it-ebooks.info

