OpenStack Lab on VMware Workstation – Adding Cinder volume features

cinderblockNow that we have our OpenStack lab up and running, we want to click around and kick the tires on all of the features. One of the first things that we will find is that the All-In-One is really an “almost” All-In-One. What I mean by that, is that there are services available which aren’t configured, and require a little more care and feeding.

Where is my Cinder?

The Block Storage feature of OpenStack is appropriately (or perhaps tongue-in-cheek) named Cinder. This service allows you to create block storage in your OpenStack cloud and attach to virtual machine instances. While the administration dashboard has the Volumes tab and appears to be all set to go, it requires a few extra steps to get Cinder volumes up and running.

Testing our Cinder volumes out of the box

Before we do anything, I wanted to show you how it doesn’t work. That sounds strange, but I’m stubborn and I like to prove things out, and if you are like me, you probably clicked through the dashboard provisioning some goodies and then realized that something wasn’t right with the Volumes page.

First, log in to your All-In-One dashboard as Demo (user account created during the deployment):


In your dashboard (aka Glance) click on the Volumes tab and click the Create Volume button:


In the Create Volume options box, fill in the name of your volume and a description first:


Next, scroll down and fill in the Size (GB) field. I’m using a 1 GB volume for my test:


In a matter of a few seconds we see the results of our volume creation:


Yup…it failed. Booooo! But that’s ok, because as I mentioned at the start of the post, we have to configure Cinder and the volume space before this would work.

Adding the Cinder foundation

We need to do the following to enable and configure Cinder for our All-In-One build. These steps are:

  1. Create a disk drive to store our Cinder volumes
  2. Add Cinder components to the OpenStack build
  3. Create the virtual storage volume and assign it to our Cinder volume pool
  4. Restart the newly installed services
  5. Test Cinder volume creation

Although we have a large disk assigned to the All-In-One (200 GB in my case), we still need another disk to use for the Cinder volumes. Remember that our 200 GB disk is for the virtual machines only. Additional volumes will be stored in our dedicated Cinder volumes.

For cleanliness, I’m going to shut down my OpenStack instance and add the disk to my VMware Workstation. We edit the settings and click on the Add button:


Choose Disk and click Next:


We choose to Create a new virtual disk and click Next:


Take the default which is SCSI and click Next:


For fun, I’ve set it at 40 GB and as always I choose the Store virtual disk as a single file:


I’ll name the disk appropriately as OPENSTACK01-cinder.vmdk so I remember which one it is:


Now that we have our new disk added, we start up our All-In-One VM. Once we are up and running we will SSH into the machine to configure the new Cinder volume. You will need a client such as PuTTY, or whatever your SSH client of choice is.

Log in as the user you have created during the initial build. Once we are logged in, we will elevate our privileges to configure everything:


Type in sudo su – which puts you into the console with su privileges and the full environment. Next you type source openrc which loads the environment variables for our OpenStack configuration that we need for the other script processes:


 Before we add new things, run the knife node show <your node name> which shows the results like the screen below. You see under the Run List that there is no Cinder mentioned:


 Now we type knife node run_list add <your node name> ‘role[cinder-all]’ which will add the Cinder roles to the Run List:


Now we type chef-client which executes the cookbook recipe to create and initialize the Cinder services which are cinder-volume, cinder-api and cinder-scheduler.

This step takes a while once you start it, so you can leave it running for 5 minutes or so:


Once the installation process completed, you will see a screen like the one below with the last message being Report Handlers Complete:


 Now we create the volume by using the pvcreate /dev/sdb command:


Next we create the volume group using the vgcreate cinder-volumes /dev/sdb command:


Finally we have to restart the Cinder services with the following commands:

service cinder-volume restart

service cinder-api restart

service cinder-scheduler restart


Phew! We did it! Now we head back to our dashboard to retry the process of creating a volume. Just as before, log in as demo, go to the Volumes tab and click on the Create Volume button:


In a few seconds you will see the console working away on your volume creation and finally it shows our new volume with a status of Available:


We did it!

Now you can deploy Cinder volumes as a part of your All-In-One lab deployment. This will come in handy later 🙂

4 thoughts on “OpenStack Lab on VMware Workstation – Adding Cinder volume features”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.