Installation
If you are on Ubuntu 11.04 or later, Glance can be installed with a simple apt-get:
$ sudo apt-get install glance python-glance-doc
Note
Glance requires a large number of dependencies.
Once installed, it needs to be started with the glance-control utility.
$ sudo glance-control all start
Glance is now ready for uploading and querying of virtual disk images. The glance index command shows all virtual disk images currently in Glance.
$ glance index No public images found.
As you can see from the example above, Glance is currently empty. Let's put a image into it. The glance-upload command puts an image record into the glance-registry and stores the data file in the image store. It requires a the disk format and container format as a minimum set of arguments. In this example, the virtual disk is formatted as an AMI from the Ubuntu Enterprise Cloud image repository.
$ glance-upload natty-server-uec-amd64.img natty-uec --disk-format ami \
--container-format ami
Stored image. Got identifier: {u'checksum': u'b420e097baf54cd32af5970b3f0cb93b',
u'container_format': u'ami',
u'created_at': u'2011-07-06T00:54:23.600181',
u'deleted': False,
u'deleted_at': None,
u'disk_format': u'ami',
u'id': 6,
u'is_public': True,
u'location': u'file:///var/lib/glance/images/6',
u'name': u'natty-uec',
u'properties': {u'type': u'raw'},
u'size': 1476395008,
u'status': u'active',
u'updated_at': u'2011-07-06T00:55:01.901066'}Now that an image has been uploaded, Glance should show it via the glance index command. ...