3

I am playing with Windows Azure to create an small VM to host a service that almost doesn't take any space.

Windows Azure creates a default 130gb disk, with about 100gb free. That's way too much. I do not need that much space.

I understand that MSFT will charge the storage (ie: the 130gb), so I would like to create the VM smaller (probably 30 or 40gb).

  1. Is it true that MSFT will charge me for the unused space?
  2. Is there a way to create the machine the size I want?
  3. If there is no way to create the machine in the size I want, how to resize? (the option to download the .vhd to my computer, resize locally and upload looks way too much effort to say the less).

1 Answer 1

13

Is it true that MSFT will charge me for the unused space?

Not true. This is because Virtual Machines are essentially Page Blobs and page blobs are charged based on the occupied bytes instead of total size. So even if a 130 GB disk is created for you and let's say you fill it with 30 GB of data, you'll only be charged for 30 GB instead of 130 GB. Please note that for block blobs you're charged for the size of the blob even if it's empty. You can read more about blobs here: http://msdn.microsoft.com/en-us/library/windowsazure/ee691964.aspx.

Is there a way to create the machine the size I want?

Currently no, but given that you're not charged for the unused space I don't see any reason why you would want to do that.

If there is no way to create the machine in the size I want, how to resize?

Page blobs are resizable. Do take a look at this blog post on how to resize a page blob (and thus a VM image): http://blog.maartenballiauw.be/post/2013/01/07/Tales-from-the-trenches-resizing-a-Windows-Azure-virtual-disk-the-smooth-way.aspx

3
  • 1
    Thanks. I'd like to mention that the project to resize disks is in GitHub: github.com/maartenba/WindowsAzureDiskResizer. (this is in the article you included, but just thought a direct link might be useful for somebody).
    – rufo
    Apr 24, 2013 at 14:00
  • BTW: Maarten didn't support shrinking without modifying the project. I forked it to github.com/josea/WindowsAzureDiskResizer and made the changes. I also requested a pull from him.
    – rufo
    Apr 24, 2013 at 15:04
  • If you got exception while running that tools, you may need to update Windows Azure Storage Nuget package to the latest one (for me now is 6.1.0).
    – Chinh Phan
    Nov 4, 2015 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.