How to convert a snapshot to a snapshot to an Image in Openstack?












0















It seems that snapshots and instances are very similar (e.g. https://serverfault.com/questions/527449/why-does-openstack-distinguish-images-from-snapshots).



However, I've been unable to share snapshots publicly globally (i.e. across all projects). Note, I'm a user of the OpenStack installation, not an administrator of the installation.



Assuming that Images don't suffer the same limitation of Snapshots, is there a procedure for convert a snapshot to an image? If not, maybe I should ask a separate question, but my cloud admin tells me it needs to be an image.










share|improve this question



























    0















    It seems that snapshots and instances are very similar (e.g. https://serverfault.com/questions/527449/why-does-openstack-distinguish-images-from-snapshots).



    However, I've been unable to share snapshots publicly globally (i.e. across all projects). Note, I'm a user of the OpenStack installation, not an administrator of the installation.



    Assuming that Images don't suffer the same limitation of Snapshots, is there a procedure for convert a snapshot to an image? If not, maybe I should ask a separate question, but my cloud admin tells me it needs to be an image.










    share|improve this question

























      0












      0








      0


      0






      It seems that snapshots and instances are very similar (e.g. https://serverfault.com/questions/527449/why-does-openstack-distinguish-images-from-snapshots).



      However, I've been unable to share snapshots publicly globally (i.e. across all projects). Note, I'm a user of the OpenStack installation, not an administrator of the installation.



      Assuming that Images don't suffer the same limitation of Snapshots, is there a procedure for convert a snapshot to an image? If not, maybe I should ask a separate question, but my cloud admin tells me it needs to be an image.










      share|improve this question














      It seems that snapshots and instances are very similar (e.g. https://serverfault.com/questions/527449/why-does-openstack-distinguish-images-from-snapshots).



      However, I've been unable to share snapshots publicly globally (i.e. across all projects). Note, I'm a user of the OpenStack installation, not an administrator of the installation.



      Assuming that Images don't suffer the same limitation of Snapshots, is there a procedure for convert a snapshot to an image? If not, maybe I should ask a separate question, but my cloud admin tells me it needs to be an image.







      openstack openstack-nova






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 '18 at 21:29









      bbarkerbbarker

      1,64621526




      1,64621526
























          2 Answers
          2






          active

          oldest

          votes


















          1














          for download



          glance-image download






          share|improve this answer


























          • I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

            – bbarker
            Dec 10 '18 at 16:26













          • are you using which backend, did you booted instance with volume?

            – Eranachandran E
            Dec 26 '18 at 13:16



















          0














          Initially I tried this:



          openstack image save --file NixOS.qcow2 5426bbcf-06b3-42f3-b117-37395e7dde83


          However, the reported size of NixOS.qcow2 was always 0 bytes. Not good. Well, the issue was apparently related to the fact that is is also what was reported in OpenStack and Horizon for the size of the Snapshot. So something weird was going on, but functionally, I could still use the snapshot to create instances without issue.



          I then created a volume of a snapshot in horizon (when shut off, couldn't create a volume when shelved), then used this command to create an image from the newly created volume (NixSnapVol):



          openstack image create --volume NixSnapVol NixSnapVol-img 


          Interestingly the reported size went from 41GB to 45GB, maybe that was part of the issue. Anyway, seems to work now, and bonus is that it is now RAW type instead of qcow2, so I don't need to do the conversion (our system largely benefits from using RAW as we have a ceph backend).






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382911%2fhow-to-convert-a-snapshot-to-a-snapshot-to-an-image-in-openstack%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            for download



            glance-image download






            share|improve this answer


























            • I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

              – bbarker
              Dec 10 '18 at 16:26













            • are you using which backend, did you booted instance with volume?

              – Eranachandran E
              Dec 26 '18 at 13:16
















            1














            for download



            glance-image download






            share|improve this answer


























            • I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

              – bbarker
              Dec 10 '18 at 16:26













            • are you using which backend, did you booted instance with volume?

              – Eranachandran E
              Dec 26 '18 at 13:16














            1












            1








            1







            for download



            glance-image download






            share|improve this answer















            for download



            glance-image download







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 22 '18 at 12:35

























            answered Nov 21 '18 at 7:17









            Eranachandran EEranachandran E

            114




            114













            • I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

              – bbarker
              Dec 10 '18 at 16:26













            • are you using which backend, did you booted instance with volume?

              – Eranachandran E
              Dec 26 '18 at 13:16



















            • I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

              – bbarker
              Dec 10 '18 at 16:26













            • are you using which backend, did you booted instance with volume?

              – Eranachandran E
              Dec 26 '18 at 13:16

















            I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

            – bbarker
            Dec 10 '18 at 16:26







            I didn't actually try this, but it is basically the same as what I did try, just using another tool that we've been using (the openstack python cli). Unfortunately, I don't think it would work for me, I kept getting errors with the analogous command because for some reason the snapshot was showing size 0 when I tried. I'll document in another answer.

            – bbarker
            Dec 10 '18 at 16:26















            are you using which backend, did you booted instance with volume?

            – Eranachandran E
            Dec 26 '18 at 13:16





            are you using which backend, did you booted instance with volume?

            – Eranachandran E
            Dec 26 '18 at 13:16













            0














            Initially I tried this:



            openstack image save --file NixOS.qcow2 5426bbcf-06b3-42f3-b117-37395e7dde83


            However, the reported size of NixOS.qcow2 was always 0 bytes. Not good. Well, the issue was apparently related to the fact that is is also what was reported in OpenStack and Horizon for the size of the Snapshot. So something weird was going on, but functionally, I could still use the snapshot to create instances without issue.



            I then created a volume of a snapshot in horizon (when shut off, couldn't create a volume when shelved), then used this command to create an image from the newly created volume (NixSnapVol):



            openstack image create --volume NixSnapVol NixSnapVol-img 


            Interestingly the reported size went from 41GB to 45GB, maybe that was part of the issue. Anyway, seems to work now, and bonus is that it is now RAW type instead of qcow2, so I don't need to do the conversion (our system largely benefits from using RAW as we have a ceph backend).






            share|improve this answer




























              0














              Initially I tried this:



              openstack image save --file NixOS.qcow2 5426bbcf-06b3-42f3-b117-37395e7dde83


              However, the reported size of NixOS.qcow2 was always 0 bytes. Not good. Well, the issue was apparently related to the fact that is is also what was reported in OpenStack and Horizon for the size of the Snapshot. So something weird was going on, but functionally, I could still use the snapshot to create instances without issue.



              I then created a volume of a snapshot in horizon (when shut off, couldn't create a volume when shelved), then used this command to create an image from the newly created volume (NixSnapVol):



              openstack image create --volume NixSnapVol NixSnapVol-img 


              Interestingly the reported size went from 41GB to 45GB, maybe that was part of the issue. Anyway, seems to work now, and bonus is that it is now RAW type instead of qcow2, so I don't need to do the conversion (our system largely benefits from using RAW as we have a ceph backend).






              share|improve this answer


























                0












                0








                0







                Initially I tried this:



                openstack image save --file NixOS.qcow2 5426bbcf-06b3-42f3-b117-37395e7dde83


                However, the reported size of NixOS.qcow2 was always 0 bytes. Not good. Well, the issue was apparently related to the fact that is is also what was reported in OpenStack and Horizon for the size of the Snapshot. So something weird was going on, but functionally, I could still use the snapshot to create instances without issue.



                I then created a volume of a snapshot in horizon (when shut off, couldn't create a volume when shelved), then used this command to create an image from the newly created volume (NixSnapVol):



                openstack image create --volume NixSnapVol NixSnapVol-img 


                Interestingly the reported size went from 41GB to 45GB, maybe that was part of the issue. Anyway, seems to work now, and bonus is that it is now RAW type instead of qcow2, so I don't need to do the conversion (our system largely benefits from using RAW as we have a ceph backend).






                share|improve this answer













                Initially I tried this:



                openstack image save --file NixOS.qcow2 5426bbcf-06b3-42f3-b117-37395e7dde83


                However, the reported size of NixOS.qcow2 was always 0 bytes. Not good. Well, the issue was apparently related to the fact that is is also what was reported in OpenStack and Horizon for the size of the Snapshot. So something weird was going on, but functionally, I could still use the snapshot to create instances without issue.



                I then created a volume of a snapshot in horizon (when shut off, couldn't create a volume when shelved), then used this command to create an image from the newly created volume (NixSnapVol):



                openstack image create --volume NixSnapVol NixSnapVol-img 


                Interestingly the reported size went from 41GB to 45GB, maybe that was part of the issue. Anyway, seems to work now, and bonus is that it is now RAW type instead of qcow2, so I don't need to do the conversion (our system largely benefits from using RAW as we have a ceph backend).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 10 '18 at 16:32









                bbarkerbbarker

                1,64621526




                1,64621526






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382911%2fhow-to-convert-a-snapshot-to-a-snapshot-to-an-image-in-openstack%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

                    Npm cannot find a required file even through it is in the searched directory