Categories
OpenStack Ubuntu 14 Installation

Glance image

Here are the commands you can use to upload and download glance images to your could.

Get into juju external:

$ export JUJU_HOME=~/.cloud-install/juju

Get to juju internal:

$ juju ssh landscape/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u landscape -E bash'

List glance images:

$ glance --os-username admin --os-tenant-name admin --os-auth-url http://10.1.1.145:5000/v2.0 --os-password mXeuyCb8qP3MdhA image-list

Download glance image:

$ glance --os-username admin --os-tenant-name admin --os-auth-url http://10.1.1.145:5000/v2.0 --os-password mXeuyCb8qP3MdhA image-download --file /tmp/websnap.img 23666943-3422-4c89-8225-859339e6d28c

scp image to another machine:

$ scp /tmp/websnap.img chris@192.168.1.150:/tmp/websnap.img

Create glance image from a file you downloaded:

$ glance --os-username admin --os-tenant-name admin --os-auth-url http://10.1.1.145:5000/v2.0 --os-password mXeuyCb8qP3MdhA image-create --name='web' --is-public=true --container-format=bare --disk-format=qcow2 < /tmp/websnap.img