How to increase size of an ubuntu cloud image











up vote
3
down vote

favorite
1












I have been trying to start a VM using ubuntu cloud images. Now, the image size is very less, I am getting around only 2GB of space. Is there any way to increase the size? I tried qemu-img resize, but it doesn't work, as I am not able to reallocate the space from inside the VM.



TIA.










share|improve this question


























    up vote
    3
    down vote

    favorite
    1












    I have been trying to start a VM using ubuntu cloud images. Now, the image size is very less, I am getting around only 2GB of space. Is there any way to increase the size? I tried qemu-img resize, but it doesn't work, as I am not able to reallocate the space from inside the VM.



    TIA.










    share|improve this question
























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I have been trying to start a VM using ubuntu cloud images. Now, the image size is very less, I am getting around only 2GB of space. Is there any way to increase the size? I tried qemu-img resize, but it doesn't work, as I am not able to reallocate the space from inside the VM.



      TIA.










      share|improve this question













      I have been trying to start a VM using ubuntu cloud images. Now, the image size is very less, I am getting around only 2GB of space. Is there any way to increase the size? I tried qemu-img resize, but it doesn't work, as I am not able to reallocate the space from inside the VM.



      TIA.







      ubuntu disk-image cloud qemu virsh






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 5 '16 at 10:38









      Pensu

      278139




      278139






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          The growroot package is designed to do exactly that. http://packages.ubuntu.com/fr/trusty/admin/cloud-initramfs-growroot



          If not already installed, add it with apt-get install cloud-initramfs-growroot and reboot your instance. The root partition will be expanded to the full size of your virtual disk (the one that you extended using qemu-img).






          share|improve this answer























          • For me it says "Unsupported platform on EFI system, doing nothing".
            – Serge Rogatch
            Nov 4 '16 at 18:00










          • This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
            – AlanObject
            Jun 6 '17 at 17:23


















          up vote
          0
          down vote













          I will be talking based on some quick QEMU experiments along the following setup: https://askubuntu.com/questions/281763/is-there-any-prebuilt-qemu-ubuntu-image32bit-online/1081171#1081171



          qemu-img



          As of 18.04, the cloud images are already in qcow2 format, so the following seemed to work:



          qemu-img resize ubuntu-18.04-server-cloudimg-arm64.img +128G


          The guest appeared to immediately pick this new size up.



          growpart



          This script claims to make a given partition fill up as much space as possible and might be of use:



          sudo apt-get install cloud-guest-utils
          sudo growpart /dev/vda 1


          It seems to run happily even though /dev/vda1 was mounted at /.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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',
            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%2fsuperuser.com%2fquestions%2f1022019%2fhow-to-increase-size-of-an-ubuntu-cloud-image%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








            up vote
            2
            down vote













            The growroot package is designed to do exactly that. http://packages.ubuntu.com/fr/trusty/admin/cloud-initramfs-growroot



            If not already installed, add it with apt-get install cloud-initramfs-growroot and reboot your instance. The root partition will be expanded to the full size of your virtual disk (the one that you extended using qemu-img).






            share|improve this answer























            • For me it says "Unsupported platform on EFI system, doing nothing".
              – Serge Rogatch
              Nov 4 '16 at 18:00










            • This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
              – AlanObject
              Jun 6 '17 at 17:23















            up vote
            2
            down vote













            The growroot package is designed to do exactly that. http://packages.ubuntu.com/fr/trusty/admin/cloud-initramfs-growroot



            If not already installed, add it with apt-get install cloud-initramfs-growroot and reboot your instance. The root partition will be expanded to the full size of your virtual disk (the one that you extended using qemu-img).






            share|improve this answer























            • For me it says "Unsupported platform on EFI system, doing nothing".
              – Serge Rogatch
              Nov 4 '16 at 18:00










            • This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
              – AlanObject
              Jun 6 '17 at 17:23













            up vote
            2
            down vote










            up vote
            2
            down vote









            The growroot package is designed to do exactly that. http://packages.ubuntu.com/fr/trusty/admin/cloud-initramfs-growroot



            If not already installed, add it with apt-get install cloud-initramfs-growroot and reboot your instance. The root partition will be expanded to the full size of your virtual disk (the one that you extended using qemu-img).






            share|improve this answer














            The growroot package is designed to do exactly that. http://packages.ubuntu.com/fr/trusty/admin/cloud-initramfs-growroot



            If not already installed, add it with apt-get install cloud-initramfs-growroot and reboot your instance. The root partition will be expanded to the full size of your virtual disk (the one that you extended using qemu-img).







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 15 at 15:37









            Community

            1




            1










            answered Mar 8 '16 at 11:56









            Antoine Coetsier

            312




            312












            • For me it says "Unsupported platform on EFI system, doing nothing".
              – Serge Rogatch
              Nov 4 '16 at 18:00










            • This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
              – AlanObject
              Jun 6 '17 at 17:23


















            • For me it says "Unsupported platform on EFI system, doing nothing".
              – Serge Rogatch
              Nov 4 '16 at 18:00










            • This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
              – AlanObject
              Jun 6 '17 at 17:23
















            For me it says "Unsupported platform on EFI system, doing nothing".
            – Serge Rogatch
            Nov 4 '16 at 18:00




            For me it says "Unsupported platform on EFI system, doing nothing".
            – Serge Rogatch
            Nov 4 '16 at 18:00












            This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
            – AlanObject
            Jun 6 '17 at 17:23




            This seems to be already installed on the Ubuntu 16.04 cloud image. At least it worked for me and I didn't have to do any apt install.
            – AlanObject
            Jun 6 '17 at 17:23












            up vote
            0
            down vote













            I will be talking based on some quick QEMU experiments along the following setup: https://askubuntu.com/questions/281763/is-there-any-prebuilt-qemu-ubuntu-image32bit-online/1081171#1081171



            qemu-img



            As of 18.04, the cloud images are already in qcow2 format, so the following seemed to work:



            qemu-img resize ubuntu-18.04-server-cloudimg-arm64.img +128G


            The guest appeared to immediately pick this new size up.



            growpart



            This script claims to make a given partition fill up as much space as possible and might be of use:



            sudo apt-get install cloud-guest-utils
            sudo growpart /dev/vda 1


            It seems to run happily even though /dev/vda1 was mounted at /.






            share|improve this answer

























              up vote
              0
              down vote













              I will be talking based on some quick QEMU experiments along the following setup: https://askubuntu.com/questions/281763/is-there-any-prebuilt-qemu-ubuntu-image32bit-online/1081171#1081171



              qemu-img



              As of 18.04, the cloud images are already in qcow2 format, so the following seemed to work:



              qemu-img resize ubuntu-18.04-server-cloudimg-arm64.img +128G


              The guest appeared to immediately pick this new size up.



              growpart



              This script claims to make a given partition fill up as much space as possible and might be of use:



              sudo apt-get install cloud-guest-utils
              sudo growpart /dev/vda 1


              It seems to run happily even though /dev/vda1 was mounted at /.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                I will be talking based on some quick QEMU experiments along the following setup: https://askubuntu.com/questions/281763/is-there-any-prebuilt-qemu-ubuntu-image32bit-online/1081171#1081171



                qemu-img



                As of 18.04, the cloud images are already in qcow2 format, so the following seemed to work:



                qemu-img resize ubuntu-18.04-server-cloudimg-arm64.img +128G


                The guest appeared to immediately pick this new size up.



                growpart



                This script claims to make a given partition fill up as much space as possible and might be of use:



                sudo apt-get install cloud-guest-utils
                sudo growpart /dev/vda 1


                It seems to run happily even though /dev/vda1 was mounted at /.






                share|improve this answer












                I will be talking based on some quick QEMU experiments along the following setup: https://askubuntu.com/questions/281763/is-there-any-prebuilt-qemu-ubuntu-image32bit-online/1081171#1081171



                qemu-img



                As of 18.04, the cloud images are already in qcow2 format, so the following seemed to work:



                qemu-img resize ubuntu-18.04-server-cloudimg-arm64.img +128G


                The guest appeared to immediately pick this new size up.



                growpart



                This script claims to make a given partition fill up as much space as possible and might be of use:



                sudo apt-get install cloud-guest-utils
                sudo growpart /dev/vda 1


                It seems to run happily even though /dev/vda1 was mounted at /.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 at 8:43









                Ciro Santilli 新疆改造中心 六四事件 法轮功

                3,83622734




                3,83622734






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2fsuperuser.com%2fquestions%2f1022019%2fhow-to-increase-size-of-an-ubuntu-cloud-image%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

                    Сан-Квентин

                    Алькесар

                    Josef Freinademetz