4

Does anyone know if one can host a website using the VMRole in Windows Azure?

If I have IIS running on the VM can I access that from the outside?

Also, if I scale to multiple instances of the same VM, will that endpoint be automatically load balanced, just like a WebRole?

Note: There are some requirements that I have that cannot be accomplished with the WebRole, so that is why I am not using it. (if you were wondering)

Thanks in advance!

Zoran
  • 844
  • 1
  • 7
  • 15

1 Answers1

4

Yes, you can host a web site in an VM Role. The VM Role must be Windows 2008 R2, which has IIS, so you should have everything you need to support your website. You'll just need to work with HyperV locally to construct the VHD, then prep it with Windows Azure tools, etc.

Just curious: What specific requirements do you have that cannot be accomplished with a Web Role? There are three core use cases for VM Role:

  • The setup process cannot be automated
  • The setup process is not 100% reliable (e.g. installers periodically fail)
  • The setup process takes too long (maybe more than 5 minutes or so)

With startup tasks, you shouldn't have any restrictions on installing software, registering COM controls, modifying the registry, etc.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • That's great. Will multiple instances of the VM be automatically load balanced? Also, do I have to use HyperV, can I just use VirtualPC or something like that? I cannot discuss the project in detail, but there are a lot of dynamic components that need to be rebuilt on the fly and as far as I know with the web role I have to do it locally and then publish to azure. – Zoran Dec 09 '11 at 14:46
  • The load balancer will, indeed, load-balance between your VM Role instances, just like with Web Roles and Worker Roles. You'll need to externalize any type of shared content like session state. And yes, you must use HyperV, not VirtualPC. – David Makogon Dec 09 '11 at 14:55
  • Fantastic. Thank you for such a detailed answer! – Zoran Dec 09 '11 at 15:06
  • You can still add dynamic components with a web role, but you may find yourself deep in IIS configuration! – Richard Astbury Dec 09 '11 at 22:00
  • I created a VM in Azure. Suppose I access RDP using this address "xxxx1.cloudapp.net:1234", how can I access the website that I hosted in IIS of that VM. – Sreekumar P Mar 08 '13 at 13:54
  • @Sreekumar - please ask this in a separate question, as to not bury an answer here. Also, I'm not sure if you're asking about VM Role or the newer Virtual Machines (I'd suggest being explicit about that in your new question). – David Makogon Mar 22 '13 at 01:07