none
Providing larger VM OS Disk sizes local to Azure without need to csupload VHD

    Question

  • Would it be possible for MS to supply larger guest OS Disk sizes from a blob store in Azure that is shared with authorised accounts?

    I know you can upload you own VHDs but from regions not located close to Azure data centers this is very difficult, previous attempts to upload 10gb VHDs have been unsuccessful due the time required to allow the upload.

    Any assistance provisioning OS disks in the Azure datacenters would be appreciated.


    Nikolai Blackie Adaptiv Integration

    Wednesday, June 13, 2012 8:27 PM

Answers

  • An alternative, although not exceptionally pretty, is to extend a VHD that is already in your account. Using this method you can work entirely with the disks in Azure.

    The operation will require one VM to create a base image from the platform image, and then a second VM to modify the 30GB image to something larger.

    1. Deploy 2 VMs using Windows Server 2008 R2 image
      • VM1: Imaging VM
      • VM2: Worker VM
    2. On VM1 – Imaging VM
      • Connect to VM1 as administrator
      • Run sysprep to generalize the image:  sysprep.exe /generalize /oobe /shutdown
    3. From Azure Portal
      • Note the URL to the VHD for VM1 (from portal under Virtual Machines à Disks)
      • Delete VM1
      • Delete the disk object in the portal for VM1. (This is needed to release the lease on the blob that contains the VHD for VM1)
      • Attach data drive to VM2 that will be used to process the VHD image. This drive should be large enough to hold the original image and the expanded image that you will create. The commands to create an empty data disk are: Virtual Machines à Select VM à Attach à Attach empty disk
    4. On VM2 – Worker VM
      • Connect to VM as administrator
      • Format the data disk
      • Install CloudXplorer or other Windows Azure storage management tool. You will also need to install .NET 3.5 on the VM before installing CloudXplorer.
      • Download the VHD as noted in step 3 above
      • Install a VHD Utility such as VMResizer
      • Use VHD management tool to extend the VHD to the desired size
      • Mount the expanded VHD on VM2 using Disk Management: Disk Management MMC à Action à Attach VHD à Enter path to expanded VHD
      • Use Disk Management MMC to extend the volume to fill out the entire disk.
      • Detach the expanded VHD using the commands: Disk Management MMC à Right-click on disk à Detach VHD
      • Upload the extended VHD back to the blob store as a PAGE BLOB. You could also use CSUpload for this step. CSUpload will be faster, but it is yet another tool that you would need to install on VM2.
    5. From Azure Portal
      • Shutdown VM2
      • Detach both data disks that were attached to VM2
      • Delete the disk object in the portal for both the extended image and the data disk
      • Add the extended image back as an image using the commands:  Virtual Machines à Images à Create Image
    6. Cleanup all VMs and VHDs other than the extended image

    Messages posted to this forum are provided "AS IS" with no warranties

    Thursday, June 14, 2012 8:18 AM

All replies

  • Hello Nikolai,

    I believe you are talking about the OS VHD we provide in Image Gallery. Is that right?

    During Preview schedule the OS VHD available in Virtual Machine Gallery are all ~30GB. While during preview we are using only 30GB OS VHD however your feedback is very helpful for us to make further decision.

    As you already know that you can upload a larger Page Blob VHD and use with your Windows Azure Virtual Machine so you can keep doing now and if you see problem uploading VHD please share your findings and we will help you.

    Regards,


    Avkash Chauhan | Microsoft

    Wednesday, June 13, 2012 10:00 PM
  • Or you could create one for partners participating heavily in the preview and share via blob storage to make things easier for us =)


    Nikolai Blackie Adaptiv Integration


    • Edited by Nikolai Thursday, June 14, 2012 8:32 AM
    Wednesday, June 13, 2012 10:04 PM
  • An alternative, although not exceptionally pretty, is to extend a VHD that is already in your account. Using this method you can work entirely with the disks in Azure.

    The operation will require one VM to create a base image from the platform image, and then a second VM to modify the 30GB image to something larger.

    1. Deploy 2 VMs using Windows Server 2008 R2 image
      • VM1: Imaging VM
      • VM2: Worker VM
    2. On VM1 – Imaging VM
      • Connect to VM1 as administrator
      • Run sysprep to generalize the image:  sysprep.exe /generalize /oobe /shutdown
    3. From Azure Portal
      • Note the URL to the VHD for VM1 (from portal under Virtual Machines à Disks)
      • Delete VM1
      • Delete the disk object in the portal for VM1. (This is needed to release the lease on the blob that contains the VHD for VM1)
      • Attach data drive to VM2 that will be used to process the VHD image. This drive should be large enough to hold the original image and the expanded image that you will create. The commands to create an empty data disk are: Virtual Machines à Select VM à Attach à Attach empty disk
    4. On VM2 – Worker VM
      • Connect to VM as administrator
      • Format the data disk
      • Install CloudXplorer or other Windows Azure storage management tool. You will also need to install .NET 3.5 on the VM before installing CloudXplorer.
      • Download the VHD as noted in step 3 above
      • Install a VHD Utility such as VMResizer
      • Use VHD management tool to extend the VHD to the desired size
      • Mount the expanded VHD on VM2 using Disk Management: Disk Management MMC à Action à Attach VHD à Enter path to expanded VHD
      • Use Disk Management MMC to extend the volume to fill out the entire disk.
      • Detach the expanded VHD using the commands: Disk Management MMC à Right-click on disk à Detach VHD
      • Upload the extended VHD back to the blob store as a PAGE BLOB. You could also use CSUpload for this step. CSUpload will be faster, but it is yet another tool that you would need to install on VM2.
    5. From Azure Portal
      • Shutdown VM2
      • Detach both data disks that were attached to VM2
      • Delete the disk object in the portal for both the extended image and the data disk
      • Add the extended image back as an image using the commands:  Virtual Machines à Images à Create Image
    6. Cleanup all VMs and VHDs other than the extended image

    Messages posted to this forum are provided "AS IS" with no warranties

    Thursday, June 14, 2012 8:18 AM
  • Thank you very much Drew for such a detailed response.

    We will try this immediately and report on the results.


    Nikolai Blackie Adaptiv Integration

    Thursday, June 14, 2012 8:23 AM
  • We plan to use Azure Virtual Machines as a build server so we need to install large software like Visual Studio, SQL Server, Windows SDK and other development tools into it and 30GB system disk is really small. Having at least 50GB system disk would be much better, but I think users should be able to choose the size of the VM system disk on their own.

    Or provide a simple way to expand the VHD through management portal even after the VM was created.

    Sunday, June 24, 2012 1:09 PM
  • Hey Jozef,

    Thanks for the feedback on this point. We will definitely look at the best way to address this request in an easy way for customers and partners.

    Corey

    Monday, June 25, 2012 12:41 PM
  • +1 for the request.
    Monday, June 25, 2012 3:51 PM
  • Well, the solution that can be made is pretty simple (As Amazon Web Service does):

    1) Snapshot your OS disk

    2) Detach it

    3) Create a new one informing the new size

    4) Apply the snapshot into the new disk.

    5) Go to windows and expand the unusable size.

    Should work something like that....

    +1 for the request.

    • Edited by Saeger Wednesday, July 11, 2012 1:02 AM request
    Wednesday, July 11, 2012 1:02 AM
  • Drew's solution is indeed ugly but I can confirm actually works beautifully! Didn’t take as long as I expected either – about 4 hours most of which was unattended. Went from a 30GB VM to 50GB.

    Thanks for taking the time to post such a comprehensive step-by-step.

    Thursday, August 30, 2012 11:59 AM
  • Here's another suggestion: please make it possible to upload a dynamic VHD and then convert to fixed, or just avoid the requirement of a fixed VHD at all.

    I just used VBoxManage to move my VDIs to VHDs, and they all went dynamic. I uploaded a nice 1.3G dynamic VHD only to find out that it needed to be a page blob. I reuploaded, only to find out that it needed to be a fixed VHD. I converted do fixed (8G) and now it's pretty difficult to upload the 8G.

    Making it possible to upload the dynamic VHD and change to fixed would make my life about 6.15x easier.

    Thanks, and keep up the good work!

    Saturday, September 01, 2012 2:39 PM
  • I think Microsoft should provide an easy way to do this. If you want Azure VM to become popular. Amazon does a much better job with this. You can't expect every admin to do a 100 steps to do a simple task as this.

    Sean

    Saturday, December 15, 2012 2:50 AM
  • Totally agree with SK1024

    30GB is not enough, just the OS installation takes half of that.

    • Proposed as answer by ShahinKohan Wednesday, May 29, 2013 2:58 AM
    • Unproposed as answer by ShahinKohan Wednesday, May 29, 2013 2:58 AM
    Monday, January 14, 2013 7:35 PM
  • I have found a utility that makes this much easier. I was shocked no one had this posted

    See the following blog

    http://blog.maartenballiauw.be/post/2013/01/07/Tales-from-the-trenches-resizing-a-Windows-Azure-virtual-disk-the-smooth-way.aspx

    After resize just extend the disk in Disk Manager Windows Server 2012

    I have tried this and it works and it took few min. No need to download. Also there seems to be a 127 GIG limit to the maximum size for the OS.

    You would think our friends in MS would have given us this information.


    Sean

    • Proposed as answer by ShahinKohan Saturday, February 02, 2013 11:00 PM
    Saturday, February 02, 2013 3:59 AM
  • This is a great step by step. Just wanted to agree with this thread. We need a better tool to do this. Amazon does a better job but I think Azure can make it even easier. Extending any disk size from the portal should be a slider to easily grow it. Also please think of load balancing and easy IP assignment.

    Thanks

    Saturday, February 09, 2013 6:47 PM
  • +1 for the request.
    Wednesday, February 20, 2013 9:36 PM
  • +1 from me too.

    Thanks


    Alan Mosley - ThatsIT Solutions

    Saturday, May 11, 2013 4:44 PM
  • Our B.I. solution hosted on an Azure VM went down due to a lack of remaining disk space.

    I am really grateful for Drew taking the time to give us a step by step solution but increasing the size of the OS VHD should be as easy as moving a slider on the Management Portal.

    Wednesday, May 29, 2013 2:52 AM
  • CloudXplorer 2.18 added the ability to Expand Virtual Disk.

    http://clumsyleaf.com/products/cloudxplorer/history

    This allows you to increase the VHD size in-place in Azure. But you must first remove the VM and the disks, choosing the option to Retain the associated VHD. That is under Virtual Machines, under the Disks section at the top. Then go into CloudXplorer and right-click the VHD and select Expand Virtual Disk.

    For a data disk, you wouldn't have to remove the VM, you can just detach the data disk, remove the disk (specifying Retain the associated VHD), expand it with CloudXplorer, then add it back as a disk, then add it as a data disk to the VM again.

    Thanks,
    Craig

    Wednesday, October 16, 2013 10:23 PM
  • I am trying to do this, but can't figure it out. Could you do a more detailed walk-through of this process? It would be greatly appreciated
    Friday, May 02, 2014 9:28 PM