CloudByte ElastiStor integration with OpenStack Glance

Introduction

Glance is an OpenStack component used to store virtual machine images and snapshots. CloudByte ElastiStor, the enterprise storage can be used as extended storage. The document details the procedures to use ElastiStor as a block and object storage for your existing OpenStack setup. For example, Glance image store has to be moved to external storage CloudByte ElastiStor for expanding storage requirements.

Setup

  • Mirantis Fuel is installed.
  • A Swift cluster with three OpenStack controllers.
  • Glance service is configured with Swift as backend to store OpenStack images.
  • OpenStack controllers run proxy and consumes storage from the local available disk.

Prerequisites

  • Download a QCOW2 format Image.
  • An OpenStack setup consuming storage from CloudByte ElastiStor.

Workflow

  1. Create an NFS Storage Volume in ElastiStor. For details, see Provision Storage.
  2. Add NFS Clients (OpenStack controller with Glance service) to access NFS Volumes. For details, see the section Manage NFS Configuration.
  3. Mount the NFS volumes on the controllers. For details, Mounting the NFS volumes on the controllers.
  4. Change the default backend storage (Swift) in the controller. For details, see Changing the default backend storage.
  5. Copy the QCOW2 image to the controller. For details, see the section Copying the QCOW2 image to the controller.
  6. Launch an instance from the Glance image. For details, see the section Launching an instance from the Glance image.

Mounting the NFS volumes on the controllers

  1. Run the following command to fetch the mount point of the Storage volume:
    showmount -e VSM_IP_address
    .
    Sample output:
    /acc1glancenfsstore
  2. On the Glance Server, create a directory to mount the NFS Storage Volume. Use the following command:
    mkdir /directory_name
    .
  3. Run the following command to mount the NFS Volume:
    mount -t nfs VSM_IP_address:/storage_volume_mount_point/directory_name
    For example,
    mount –t nfs 192.168.1.250:/acc1glancenfstsore /glancenfsstore
  4. Run the following command to verify successful mount of Volume:
     df –h

    Sample output:

  5. Filesystem                         Size   Used 	 Avail  	 Use% 	 Mounted on         
     192.168.1.250:/acc1glancenfstsore 200G    0G   200G     0%    /glancenfsstore
  6. Repeat steps 1 to 4 on all the OpenStack controllers with Glance service in progress.

Changing the default backend storage

  1. Run the following command to edit the glance-api.conf file: vi /etc/glance/glance-api.conf
  2. (If not already commented)Comment the following lines in the file:
  3.         default_store=swift
            swift_store_auth_version=2
    	swift_store_auth_address=http://10.1.194.66:5000/v2.0/
    	swift_store_user=services:glance>
    	swift_store_key=PVpmemUO
    	swift_store_container=glance
    	swift_store_create_container_on_put=True
  4. Uncomment the following lines in the file:
  5. default_store=file
    filesystem_store_datadir=/glancenfsstore
    Stores=glance.store.filesystem.store
  6. Run the following command to save and exit the file:
    :wq!
  7. Restart glance services using the command:
    for i in /etc/init.d/openstack-glance-*; do $i restart;
  8. Repeat steps 1 to 5 on all the OpenStack controllers with Glance service in progress.

Copying the QCOW2 image to the controller

Scenario 1: You do not have a QCOW2 format Windows image.

In this case, you have to create an image using the ISO file. For details, see Create QCOW2 image.

Scenario 2: You have a QCOW2 format Windows image.

In this case, copy the image to the OpenStack controller Node. You can copy the image using either of the following procedures:

Procedure 1
Glance_procedure_1

You may not have direct access to any of the OpenStack controllers. You have to copy the QCOW2 image to the Mirantis Fuel master first and then proceed to copying it to the NFS Volumes ( for example,

/glancenfsstore
) in the controllers.

Procedure 2
Glance_procedure_2

  1. Log in to the OpenStack controller as root.
  2. Run the following command to access the OpenStack services as an Admin:
    source openrc admin
  3. Run the following command to upload the QCOW2 image to glance image repository :
    glance image-create -- name image_name -- disk-format qcow2 --container-format bare -- is-public true -- file “/file path/windows-server-2012-r2.qcow2”
  4. Run the following command to verify that the image is created successfully:
    for i in /etc/init.d/openstack-glance-*; do $i status;

The image appears in active mode on OpenStack dashboard if created successfully.
OpenStack UI

Launching an instance from the Glance image

  1. Go to the QCOW2 image and then click Launch.
  2. openstack_click_launch
  3. Select the flavor as Large from the drop-down list.
  4. (Optional) Associate the instance with floating IP address for remote access.
  5. Click Launch.

Troubleshooting

Issue

Instance launch failed.

Solution
  1. Run the following command to check the status of Nova services: for i in /etc/init.d/openstack-nova-*; do $i status;
  2. Ensure the following:
    • Nova api and scheduler services are running on each OpenStack controllers.
    • Nova compute and network services are running on Compute Node.
  3. Check for error logs in var/log/nova

References