locked
Optimize size for the captured VM image RRS feed

  • Question

  • Hi,

    It seems that when I capture a VM to an image, the image size is the same as the VM's OS disk size. Is there a way to optimize it? E.g. the VM's OS disk is 128 GB, but only 75 GB is actually used. Is there a way to get an image from this VM with size 75 GB instead of 128 GB?

    Regards,

    Julie

    Thursday, September 15, 2016 4:08 AM

Answers

  • If you have initially created the VM from gallery then its on a fixed size i.e 127GB. There are some external tools available which will help you( i.e manually getting the disk from storage then trimming it and then converting it back to VHD, not recommended unless you know what you are doing.)

    So in-short as of now there is no way to trim it so you will download 127GB.


    Rahber
    @Rahber

    Thursday, September 15, 2016 5:05 PM

All replies

  • Hello,

    Thank you for posting on the Azure forums!

     image includes the operating system disk and any data disks that are attached to the virtual machine and its dedicated to particular gb.

    Go through this document which describes how to capture image of Vm :

    https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-classic-capture-image/

    Hope this helps!

    Regards,

    Monika

    ----------------------------------------------------------------------------------------------------

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer so that other customers can benefit from it.

    Thursday, September 15, 2016 9:36 AM
  • Thanks for your answer, Monika. But it doesn't answer my question. My question is whether there's a way to optimize the shrink the size of images captured from a VM, since the VM OS disks have a lot of empty spaces. I know how to capture a VM in general. And the VM I'm using is not Classic. 
    Thursday, September 15, 2016 3:38 PM
  • If you have initially created the VM from gallery then its on a fixed size i.e 127GB. There are some external tools available which will help you( i.e manually getting the disk from storage then trimming it and then converting it back to VHD, not recommended unless you know what you are doing.)

    So in-short as of now there is no way to trim it so you will download 127GB.


    Rahber
    @Rahber

    Thursday, September 15, 2016 5:05 PM