Yes, you can host a website as a virtual machine. The role of the VM should be Windows 2008 R2, which has IIS, so you should have everything you need to support your site. You just need to work with HyperV locally to build VHD, then prepare it using Windows Azure tools, etc.
Just curious: What specific requirements do you have that cannot be met using a web role? There are three main use cases for the VM role:
- The setup process cannot be automated.
- The configuration process is not 100% reliable (for example, installers periodically fail)
- The installation process takes too much time (maybe more than 5 minutes)
With startup tasks, you should not have any restrictions on installing software, registering COM controls, registry changes, etc.
source share