C Sébastien Han

Stacker! Cepher! What's next?

Download a Glance Image From RBD

| Comments

Quick tip.

If you want to download a glance image stored in a RBD backend.

First choose the image you want to export:

1
2
3
4
5
6
7
$ nova image-list
+--------------------------------------+----------------------+--------+--------------------------------------+
|                  ID                  |         Name         | Status |                Server                |
+--------------------------------------+----------------------+--------+--------------------------------------+
| 60beab84-81a7-46d1-bb4a-19947937dfe3 | precise-ceph         | ACTIVE |                                      |
| e5d3c6dc-37b3-41e8-b375-987fe7935080 | cloud-pipe-template  | ACTIVE |                                      |
+--------------------------------------+----------------------+--------+--------------------------------------+

And export it with the following command:

1
2
3
4
5
6
7
8
9
10
11
12
13
$ rbd export --pool=images e5d3c6dc-37b3-41e8-b375-987fe7935080 cloud-pipe-template.img
writing 8388608 bytes at ofs 0
writing 8388608 bytes at ofs 8388608
writing 8388608 bytes at ofs 16777216
writing 8388608 bytes at ofs 25165824
writing 8388608 bytes at ofs 33554432
writing 8388608 bytes at ofs 67108864
writing 8388608 bytes at ofs 75497472
writing 8388608 bytes at ofs 83886080
writing 8388608 bytes at ofs 92274688
...
...
Exporting image: 100% complete...done.

Check your image size:

1
2
$ du -h cloud-pipe-template.img
879M  cloud-pipe-template.img

Et voilà!

Comments