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.
- 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.
- Download a QCOW2 format Image.
- An OpenStack setup consuming storage from CloudByte ElastiStor.
- Create an NFS Storage Volume in ElastiStor. For details, see Provision Storage.
- Add NFS Clients (OpenStack controller with Glance service) to access NFS Volumes. For details, see the section Manage NFS Configuration.
- Mount the NFS volumes on the controllers. For details, Mounting the NFS volumes on the controllers.
- Change the default backend storage (Swift) in the controller. For details, see Changing the default backend storage.
- Copy the QCOW2 image to the controller. For details, see the section Copying the QCOW2 image to the controller.
- 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
- Run the following command to fetch the mount point of the Storage volume:
showmount -e VSM_IP_address.
- On the Glance Server, create a directory to mount the NFS Storage Volume. Use the following command:
- Run the following command to mount the NFS Volume:
mount -t nfs VSM_IP_address:/storage_volume_mount_point/directory_nameFor example,
mount –t nfs 192.168.1.250:/acc1glancenfstsore /glancenfsstore
- Run the following command to verify successful mount of Volume:
- Repeat steps 1 to 4 on all the OpenStack controllers with Glance service in progress.
Filesystem Size Used Avail Use% Mounted on 192.168.1.250:/acc1glancenfstsore 200G 0G 200G 0% /glancenfsstore
Changing the default backend storage
- Run the following command to edit the glance-api.conf file: vi /etc/glance/glance-api.conf
- (If not already commented)Comment the following lines in the file:
- Uncomment the following lines in the file:
- Run the following command to save and exit the file:
- Restart glance services using the command:
for i in /etc/init.d/openstack-glance-*; do $i restart;
- Repeat steps 1 to 5 on all the OpenStack controllers with Glance service in progress.
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
default_store=file filesystem_store_datadir=/glancenfsstore Stores=glance.store.filesystem.store
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:
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.
- Log in to the OpenStack controller as root.
- Run the following command to access the OpenStack services as an Admin:
source openrc admin
- 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”
- 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.
Launching an instance from the Glance image
- Go to the QCOW2 image and then click Launch.
- Select the flavor as Large from the drop-down list.
- (Optional) Associate the instance with floating IP address for remote access.
- Click Launch.
Instance launch failed.Solution
- Run the following command to check the status of Nova services: for i in /etc/init.d/openstack-nova-*; do $i status;
- Ensure the following:
- Nova api and scheduler services are running on each OpenStack controllers.
- Nova compute and network services are running on Compute Node.
- Check for error logs in var/log/nova