Search code examples
azureazure-vm-role

Windows Azure VM role upload


This question is related to Azure VM Role. As I read in some blogs, to host a VM Role we need to create a Virtual Machine image (VHD) with Windows Server 2008 r2 installed in it.

1.) So what will be the size of the VHD file (roughly)?

2.) I guess it will be in GBs for sure. So can it be avoided with any other methods so that we can create it on fly, I mean in the cloud environment itself. So that uploading such a huge file is avoided.


Solution

  • This is how it works today: You create your VHD in Hyper-V locally, then upload the image, which is subsequently used for VM Role deployment and scaling. It's hard to predict the actual VHD size, as this largely depends on what you're installing on your VM. I'm sure you can easily create images upward of 10+ GB.

    Once you have your image uploaded, you don't need to re-upload the entire image if, say, you patch your VM. You can upload a differencing disk, which would be considerably smaller.

    One thing to remember: Any change you make to the VM at runtime in Windows Azure will be non-persistent. For instance, if the VM crashes and has to be rebuilt, it is rebuilt from your originally-uploaded VHD.

    Now... having said all that: You should carefully consider using a VM Role over Web and Worker roles (which are essentially Windows Server 2008 with and without IIS running, respectively). With startup tasks that may run with elevated permissions, you can install nearly anything that you'd normally install on Windows Server. There are three primary reasons to go with VM Role:

    • You have software to install, but the installation cannot be automated
    • You can automate the install, but it takes too long (say, more than 5-10 minutes)
    • You can automate the install, but it's an unreliable install

    If you can avoid VM Role, you can avoid the VM upload and subsequent VM maintenance, and outsource OS management to Windows Azure.