Score:0

How do I copy image in OpenStack under a second name

in flag

Say I have an image named org-image-name, I want to create a new image that will be identical but have a different name (say new-image-name). How can I do it using CLI? Or maybe there is an aliases feature?

pt flag
Barring other solutions you can download the image (`openstack image save ...`) and then upload it using a new name (`openstack image create ...`).
vvv444 avatar
in flag
@larsks, yeah, thanks! I hoped there is a better way though.
Score:2
us flag

This worked in my test environment, too:

root@control01:~# openstack image save <IMAGE> | openstack image create --public <NEW_IMAGE>

If you don't specifiy a file name to the "save" command it goes to stdout, which you can read from in the image create command. Because it's quite an important remark, I'll add Gerald's comment to the answer:

Note that this will literally download and reupload the image to and from the machine where you are running this command on. Depending on the connection between the machine and the OpenStack API server and the size of the image this might not be desirable.

in flag
Note that this will literally download and reupload the image to and from the machine where you are running this command on. Depending on the connection between the machine and the OpenStack API server and the size of the image this might not be desirable.
Score:1
in flag

There is no way to directly clone an image. You could create a volume from the image and then create another image from that volume.

openstack volume create --image myimage tempvol
openstack image create --volume tempvol cloned-image
openstack volume delete tempvol

The speed however depends on your storage backend. With the proper backend (for example ceph) and the proper hardware the create operations should be nearly instantaneous.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.