How to add Image to Glance

For the impatient:

  1. Move the image to /var/snap/microstack/common/images
  2. Create the image with: microstack.openstack image create --public --container-format=bare --disk-format=qcow2 --file /var/snap/microstack/common/images/FedoraCloudx86.qcow2 FedoraCloudx86

Microstack is admittedly not my favorite way to deploy openstack, probably because it takes some getting used to.

Running openstack services in isolated containers makes things more secure, easier to deploy, homogeneous.. there are so many obvious reasons Canonical did it this way. But it is “different” and I need to remind myself that different is not bad… just different so I am sure as I spend more time working on it my attitude will change.

My Multi-Node Microstack deployment has 2 nodes so far, a controller running as a vm and a compute node running on bare metal.

First thing you will notice right away after deploying Microstack is that command line openstack commands do not work unless you preface them with:

microstack.openstack

Another thing are file paths, specifically in this example we will focus on uploading qcow2 images to Glance.

Lets say you have a image named “FedoraCloudx86.qcow2” that you uploaded to your users home directory.

First move the image to a place where Microstack will be able to see it. We can do this with:

mv FedoraCloudx86.qcow2 /var/snap/microstack/common/images/

Now run:

microstack.openstack image create --public --container-format=bare --disk-format=qcow2 --file /var/snap/microstack/common/images/FedoraCloudx86.qcow2 FedoraCloudx86

That should do it!

-Carmine

Aliens? Any thoughts?

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