My virtual machine (vm) in Windows Azure is running the following version of Windows::
Microsoft Windows NT 6.0.6002 Service Pack 2
Which translate to the marketing name of “Windows Server 2008”, that is NOT R2 (yet, anyway).
Also, it is running:
Microsoft.NET version 2.0.50727.4016
I have a Small VM and therefore should have 1,7 Gb of memory in total, which I also verified and got the exact number back:
1,877,766,144 bytes of total memory
Not that it matters but I also found my machine name to be “RD00155D3141A4” and part of the domain “CIS”.
The organization of the file system is more interesting. On a newly created vm and deployed web role I can see three drives:
C: has a total of 225 GB of which 218 GB are free
D: has a total of 16 GB of which 8 GB are free
E: has a total of 1 GB of which almost all are free
After investigating their contents I can determine that D: has the installed operating system with the usual “Program Files” and “Windows” folders. E: has my deployed web role in the E:\approot folder and just some additional support/config folders and files (I assume!).
The C: drive is the stranger drive. It has a “dumpfile.dmp” and a “pagefile.sys” file which I recognize as Windows files. There are also folders with names such as “Applications”, “Config”, “MOSLogs”, “OS”, “Packages”, “Resources” and the known “System Volume Information”. Some are empty but not all (I’ll get back to that.
When I upgrade my web role with some changed code, the E: drive is kept an F: drive appears. So it looks like at least a few versions of deployed roles will be kept at different drive letters.
The different vm sizes specifies that I should have 250 Gb of storage for “Disk Space for Local Storage Resources” so this must be the C drive. I don’t have write access to all of it though, but I probably just haven’t found where you are supposed to put such files. In any event, I assume that you must be prepared for that storage to vanish at any given moment. For sure if you delete and recreate your vm.
I have also tried to enumerate all running processes in the machine and I ended up with the following list:
|id||name||path||MB||start time||cpu time|
|2352||clouddrivesvc||Access is denied||5||Access is denied||Access is denied|
|456||csrss||Access is denied||5||Access is denied||Access is denied|
|496||csrss||Access is denied||5||Access is denied||Access is denied|
|0||Idle||Unable to enumerate the process modules.||0||Access is denied||Access is denied|
|1968||LogonUI||Access is denied||15||Access is denied||Access is denied|
|592||lsass||Access is denied||11||Access is denied||Access is denied|
|600||lsm||Access is denied||6||Access is denied||Access is denied|
|2772||MonAgentHost||E:\diagnostics\x64\monitor\MonAgentHost.exe||14||11/29/2009 3:40:48 PM||00:00:00.1718750|
|2504||msdtc||Access is denied||8||Access is denied||Access is denied|
|1212||osdiag||Access is denied||6||Access is denied||Access is denied|
|1876||rdagent||Access is denied||23||Access is denied||Access is denied|
|580||services||Access is denied||6||Access is denied||Access is denied|
|260||SLsvc||Access is denied||11||Access is denied||Access is denied|
|392||smss||Access is denied||1||Access is denied||Access is denied|
|1252||svchost||Access is denied||3||Access is denied||Access is denied|
|2088||svchost||Access is denied||6||Access is denied||Access is denied|
|1360||svchost||Access is denied||6||Access is denied||Access is denied|
|296||svchost||Access is denied||8||Access is denied||Access is denied|
|1280||svchost||Access is denied||12||Access is denied||Access is denied|
|1376||svchost||Access is denied||3||Access is denied||Access is denied|
|844||svchost||Access is denied||7||Access is denied||Access is denied|
|404||svchost||Access is denied||7||Access is denied||Access is denied|
|940||svchost||Access is denied||19||Access is denied||Access is denied|
|224||svchost||Access is denied||13||Access is denied||Access is denied|
|416||svchost||Access is denied||31||Access is denied||Access is denied|
|776||svchost||Access is denied||7||Access is denied||Access is denied|
|1232||svchost||Access is denied||6||Access is denied||Access is denied|
|708||svchost||Access is denied||10||Access is denied||Access is denied|
|4||System||Unable to enumerate the process modules.||8||Access is denied||Access is denied|
|1808||vds||Access is denied||8||Access is denied||Access is denied|
|1164||vmicsvc||Access is denied||5||Access is denied||Access is denied|
|1152||vmicsvc||Access is denied||4||Access is denied||Access is denied|
|2056||WaWebHost||E:\base\x64\WaWebHost.exe||95||11/29/2009 3:40:33 PM||00:00:16.9531250|
|504||wininit||Access is denied||5||Access is denied||Access is denied|
|532||winlogon||Access is denied||5||Access is denied||Access is denied|
Not that interesting perhaps, but I can determine that my deployed web role has spawn the WaWebHost.exe and the MonAgentHost.exe processes. Maybe more information could be read, but I’m leaving this part of the investigation as it is for now.
So how is the code in my web role actually run by Azure? I can see these things:
Now, the most important question I would like to answer in this first investigation is if, and if so how, I can run multiple sites or web projects in a single vm. Knowing IIS, I should go looking for applicationHost.config and see how it points to the web site folders (E:\approot according to the investigation so far).
In fact, I find IIS in its usual place at D:\Windows\System32\inetsrv in my vm. There is also an applicationHost.config in the config sub folder, but it has nothing pointing to E:\approot.
However, I did find the file at C:\Resources\Temp\63a1a1bad2fd41729fe654d54ada5d05.PublicRole (a generated folder name that will look different on other vm:s, for sure). There I can see:
So my vm has a local network address behind Azures load balancer (or gateway or whatever it is called) and it is routing incoming traffic on port 80 to port 20000 on my vm.
The obvious question is if I can change this applicationHost.config file and thereby point it to sub folders in my web role, which would then actually represent different sites or web projects in Visual Studio. I just had to try! Unfortunately nothing happens when I added another site to this file. And since it is in a Temp sub folder I assume it is only used when WaWebHost.exe starts up. I also tried suspending the vm and than starting it again (not sure if this is the same as rebooting the vm?). But then the file is overwritten and my new site info is gone. Too bad, but of course if it was supported there would be an easier way to do it than such a hack.
One thing I’ve come to realize is that Windows Azure (of today, at least) is not a substitute for a VPS or dedicated server of my own. My first attempt was to find out if Windows Azure actually could be the solution to all of my hosting needs, and it is probably not. Even if it would work, it is obviously not designed for handling multiple sites.
Windows Azure is for when one of your ideas or projects has gotten enough attention or quality that it is time to launch to the public and be prepared for both success and failure. You will be able to scale up to any size you need, and you will also be able to shut it down literally within minutes without any additional costs. Of course, you’ll have to pay for the time between those two events: the launch and the decision.
I will keep on investigating this and other matters around Windows Azure. I also have hopes that multiple roles or multiple sites/projects with different host name bindings in a single vm will be possible in the future.