Comment 2 for bug 1844642

Revision history for this message
Volker (skydiablo) wrote :

so, this is my workaround to handle the given problem:

# create snapshot (use "--force" if volume is currently in use)
$ openstack volume snapshot create --volume <VOLUME-UID> --force "test - snap"

# list new snapshot
$ openstack volume snapshot list
+--------------------------------------+-------------+-------------+-----------+------+
| ID | Name | Description | Status | Size |
+--------------------------------------+-------------+-------------+-----------+------+
| a940f54f-920c-4f00-8207-5992f290c185 | test - snap | None | available | 20 |
+--------------------------------------+-------------+-------------+-----------+------+

# create new volume from snapshot
$ openstack volume create --snapshot a940f54f-920c-4f00-8207-5992f290c185 "test - snap - vol"

# list new volume
$ openstack volume list
+--------------------------------------+-------------------+-----------+------+-------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+-------------------+-----------+------+-------------+
| 3c9414bb-98bd-45d4-9b38-2b073e958f81 | test - snap - vol | available | 20 | |
+--------------------------------------+-------------------+-----------+------+-------------+

# create image from volume (this will run a longe runing task -> gemu-img)
$ openstack image create --volume 3c9414bb-98bd-45d4-9b38-2b073e958f81 --disk-format qcow2 "test - snap - vol - img"

# list images
$ openstack image list
+--------------------------------------+-------------------------+--------+
| ID | Name | Status |
+--------------------------------------+-------------------------+--------+
| 5394ce72-5bb5-49e7-8bf3-7e3ae472b1da | test - snap - vol - img | saving |
+--------------------------------------+-------------------------+--------+

# wait until "status" is "active"
#----
# save new created image to local disk
$ openstack image save --file "/opt/img-conversions/export/test.qcow2.img" 5394ce72-5bb5-49e7-8bf3-7e3ae472b1da

# check output
$ ll /opt/img-conversions/export/test.qcow2.img
-rw-r--r-- 1 wrsroot wrs 7959085056 Sep 20 12:17 /opt/img-conversions/export/test.qcow2.img

maybe this will help some one else...

greez, volker...