RHEL Cloud Image for OpenStack

Latest response

I would like to know if anyone has the step by step instructions to build a RHEL cloud-image for OpenStack.

I'm aware that Red Hat provides qcow2 images - However, I need the steps to build my own image with customized packages/scripts etc.

Can someone help?

One important note is: I've already tried preparing one but the image that I end up with doesn't fetch the SSH keys from the Openstack metadata service.

Responses

Hello Sagayaraj,

Our official RHEL 7.1 and 6.6 cloud-init enabled cloud images can be found below :

https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.1/x86_64/product-downloads
https://access.redhat.com/downloads/content/69/ver=/rhel---6/6.6/x86_64/product-downloads

You are free to modify either with our libguestfs-tools or at boot time with cloud-init. I've written the following solution that provides an example of how to do this :

Where can I find and modify the official RHEL Images for use in Openstack?
https://access.redhat.com/solutions/894123

It is likely that in your case you have simply not installed or enabled the required cloud-init service that fetches SSH keys etc at boot time. I would strongly recommend that you modify our official images listed above instead of rolling your own to avoid this.

Regards,

Lee

Got any examples of customizing the storage-layout of the downloaded images?

Hello Tom,

The virt-resize tool will allow you to resize partitions, logical volumes, file systems etc found within the image. For anything more invasive I would recommend opening the image using virt-rescue or guestfish, these provide a rescue shell where you can manually change the layout of the image.

Regards,

Lee

Not trying to be combative, but... You're (essentially) answering a "how do I roll my own" question with a "don't roll your own, use ours and modify it" response. You need to consider the possibility that the reason the OP is looking to roll his own is that the Red Hat-provided images were not sufficient for their needs - or, at least, not sufficient without resorting to a more-esoteric and likely non-obvious modification-case.

Once that possibility is considered, offering up a solution document that only covers trivial modifications may not be the best path. It would probably be better - or at least more complete - to offer up a solution document that also offers solutions for several types of "trickier" implementation needs.

There's also the possibility that while one could go through lots of convolutions to alter a provided image, sometimes it's more efficient to start from scratch.

Though, covering more of the non-trivial methods cases might be better handled in a white-paper or other extended-form discussion than a single-path solution document. Has Red Hat published any types of whitepaper-like documents on the topic?

Hello again Tom,

Understood, However the context provided in the original request did suggest a very basic 'customized packages/scripts' use case that to my mind would not typically require a complete roll your own image solution and all of the work that entails.

I do not believe that we provide any documentation on rolling your own image for RHEL at present. I will look to raise a RHBZ Docs RFE for this shortly and will in the meantime write a basic solution using the standard virt-install and virt-sysprep approach we use to build the rhel-guest images and also used by virt-builder to build images upstream [1]. As you can see from the upstream virt-builder scripts they use a basic kickstart file to install and configure RHEL on the image. This should allow for the vast majority of use cases but please let me know if you feel this will something.

Regards,

Lee

[1] https://github.com/libguestfs/libguestfs/blob/master/builder/website/fedora.sh

Cool. Thanks for the update.

In the coming months, as we do multi-cloud adoption, I need to know how to produce VMs/instances that are as near to identical across environments as possible. Having good reference documents to that end is always appreciated (saves a lot of Googling-about and having to synthesize things). Our IA requirements - regardless of cloud framework - require a number of picayune settings. Finding good reference documents that give a good jumping off points for making those picayune settings uniform across environments has been the bane of my existence for the past half year.

Hey Tom...super old thread I appreciate. However I don't feel like this has been solved properly. The build documented in code would be helpful.

As for multi-cloud support packer from hashicorp seems like a good bet being able to build different artefacts from a common template with differences based on platform, i.e. cloud-init for openstack or vmware-tools for vsphere images.

If I may clarify, I'd appreciate step-by-step instructions to roll-out my own custom image. I am well aware of the steps to modify an existing image.

Were you able to figure this out?

Yes, it would be great if we can get the step-by-step instructions to roll-out my own custom image.

I need to be able to automate qcow2 image creation from ISO

Take a look at virt-dib which is the Tripleo, and thus director, version of diskimage-builder;

http://libguestfs.org/virt-dib.1.html#comparison-with-diskimage-builder

It can be used to either build or update an existing cloud image.

There are also Kickstart scripts which is what Red Hat uses to make our RHV/Cloud image, but they are mostly used by internal engineering. If you mount or run rhel-guest-image-7.5-146.x86_64.raw you can find the kickstart scripts in

/root/anaconda-ks.cfg
/root/original-ks.cfg

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.