Skip to main content

Customize OpenStack images for booting from ISCSI

When working with OpenStack Ironic and Tripleo, and using the boot from ISCSI feature, you may need to add some kernel parameters into the deployment image for that to work.
When using some specific hardware, you may need that the deployment image contains some specific kernel parameters on boot. For example, when trying to boot from ISCSI with IBFT nics, you need to add following kernel parameters:

rd.iscsi.ibft=1 rd.iscsi.firmware=1 

 The TripleO image that is generated by default doesn't contain those parameters, because they are very specific depending on the hardware you need. It is not also possible right now to send this parameters through Ironic.

The solution will be to customize the deployment image to add these kernel parameters. The overcloud-full.qcow2 image that comes by default with TripleO is a partition image. It means that the bootloader is not previously installed, but it is done through Ironic. So the way to add custom parameters, is modifying the /etc/default/grub file, adding those parameters.

So let's do it step by step:

1. On the undercloud, install libguestfs-tools: sudo yum install -y libguestfs-tools
2. On /home/stack, you will find overcloud-full.qcow2 image. Start customizing it:

export LIBGUESTFS_BACKEND=direct
guestfish -a overcloud-full.qcow2
<fs> run

<fs> list-filesystems
<fs> mount /dev/sda /
<fs> vi /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

Edit GRUB_CMDLINE_LINUX and append the kernel parameters you need there. Exit the editor saving the file, and exit from guestfish

<fs> exit

Now is time to upload the modified image:

source /home/stack/stackrc
openstack overcloud image upload --existing

Now redeploy again, and the image will boot with the modified kernel parameters, allowing boot from ISCSI to work with your hardware.

Comments

Popular posts from this blog

Describing TOAD - TripleO automated deployer

An overview of the TOAD framework and the advantagesWhat is TOAD? Fully automated deployment using Ansible (single command spin up)Main goal: to automate OSP deployments for continuous integration (CI) and development purposesTOAD is a CI framework using off-the-shelf components that many partners are familiar with:JenkinsJenkins Job Builder (JJB): http://docs.openstack.org/infra/jenkins-job-builder/TripleO Quickstart (oooq): https://www.rdoproject.org/tripleo/Optional ELK Stack (ElasticSearch, Logstash, Kibana) Its core component is TripleO Quickstart, used for TripleO upstream testingFully customizable with oooq settings; can be extendedDeploy environments with one click; trash after finished Of course it’s open source! :)https://github.com/redhat-nfvpe/toadhttps://github.com/redhat-nfvpe/jenkins-jobshttps://github.com/redhat-nfvpe/job-configs What components make up TOAD?Requirements to install TOADTwo different use cases: virtualized and baremetalOnly one Jenkins+Nginx VM needed t…

Start using whole disk images with TripleO

What are the differences between flat partition image and whole disk image? In order to understand this article, you first need to know what a flat partition image and a whole disk image are, and the differences between each other.
flat partition image: disk image that just contains all the desired content in a filesystem, but does not carry any information about partitions on it, and it does not include a bootloader. In order to boot from a whole disk image, the kernel and ramdisk images need to be passed independently when booting, relying on an external system to mount.whole disk image: image that contains all the information about partitions, bootloaders... as well as all the desired content. It can boot independently, without the need of external kernels or systems to mount it. Right now, OpenStack Ironic  supports both kind of images, but OpenStack TripleO was only supporting flat partition images.

TripleO added support for whole disk images Since python-tripleoclient 5.6.0 ver…

Automated OSP deployments with Tripleo Quickstart

In this article I'm going to show a method for automating OSP (RedHat OpenStack platform) deployments. These automated deployments can be very useful for CI, or simply to experiment and test with the system.
Components involvedTOAD: set of playbooks to deploy Jenkins, jenkins-job-builder and an optional ELK stack. This will install a ready to use system with all the preconfigured jobs (including OSP10 deployments and image building).TOAD jenkins-jobs: A set of job templates and macros, using jenkins-job-builder syntax, that get converted into Jenkins jobs for building the OSP base images and for deploying the system.TOAD job-configs: A set of job configurations to be used along with the jenkins-jobs repo. It provides a set of basic configs to build OpenStack using RDO or OSP.TripleO quickstart: set of ansible playbooks, used for building images and for RDO/OSP deployments. System requirementsOne VM to run a Jenkins master + nginx provided by TOAD. If you want to deploy additiona…