<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike Plate &#187; Cloud</title>
	<atom:link href="http://www.mikeplate.com/tag/cloud/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikeplate.com</link>
	<description>Freelance web and mobile developer</description>
	<lastBuildDate>Tue, 17 Aug 2010 20:12:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>First investigation of Windows Azure</title>
		<link>http://www.mikeplate.com/first-investigation-of-windows-azure/</link>
		<comments>http://www.mikeplate.com/first-investigation-of-windows-azure/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 20:01:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.mikeplate.com/?p=152</guid>
		<description><![CDATA[So I have finally found some time to experiment with Windows Azure. My starting-point is that I&#8217;m a freelance developer that needs hosting services in order to try out several different ideas of my own. I first wanted to get a better understanding of what a virtual machine looks like in Windows Azure. What is [...]]]></description>
			<content:encoded><![CDATA[<p>So I have finally found some time to experiment with Windows Azure. My starting-point is that I&#8217;m a freelance developer that needs hosting services in order to try out several different ideas of my own.</p>
<p>I first wanted to get a better understanding of what a virtual machine looks like in Windows Azure. What is it exactly? I know it&#8217;s a Microsoft Windows Server box running on Hyper-V, at least that is what Microsoft has told me. But then what? Read on to discover some of my findings. Note, however, that I&#8217;m not an expert and I&#8217;m sure that some of my findings and questions could be answered by reading documentation somewhere but I like to get my hands dirty by looking under the hood.<span id="more-152"></span></p>
<h2>Operating System Environment</h2>
<p>My virtual machine (vm) in Windows Azure is running the following version of Windows::</p>
<p style="padding-left: 30px;">Microsoft Windows NT 6.0.6002 Service Pack 2</p>
<p>Which translate to the marketing name of &#8220;Windows Server 2008&#8243;, that is NOT R2 (yet, anyway).</p>
<p>Also, it is running:</p>
<p style="padding-left: 30px;">Microsoft.NET version 2.0.50727.4016</p>
<p>I have a <a href="http://msdn.microsoft.com/en-us/library/ee814754.aspx">Small VM</a> and therefore should have 1,7 Gb of memory in total, which I also verified and got the exact number back:</p>
<p style="padding-left: 30px;">1,877,766,144 bytes of total memory</p>
<p>Not that it matters but I also found my machine name to be &#8220;RD00155D3141A4&#8243; and part of the domain &#8220;CIS&#8221;.</p>
<h2>File System Organization</h2>
<p>The organization of the file system is more interesting. On a newly created vm and deployed web role I can see three drives:</p>
<p style="padding-left: 30px;">C: has a total of 225 GB of which 218 GB are free<br />
D: has a total of 16 GB of which 8 GB are free<br />
E: has a total of 1 GB of which almost all are free</p>
<p>After investigating their contents I can determine that D: has the installed operating system with the usual &#8220;Program Files&#8221; and &#8220;Windows&#8221; folders. E: has my deployed web role in the E:\approot folder and just some additional support/config folders and files (I assume!).</p>
<p>The C: drive is the stranger drive. It has a &#8220;dumpfile.dmp&#8221; and a &#8220;pagefile.sys&#8221; file which I recognize as Windows files. There are also folders with names such as &#8220;Applications&#8221;, &#8220;Config&#8221;, &#8220;MOSLogs&#8221;, &#8220;OS&#8221;, &#8220;Packages&#8221;, &#8220;Resources&#8221; and the known &#8220;System Volume Information&#8221;. Some are empty but not all (I&#8217;ll get back to that.</p>
<p>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.</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/ee814754.aspx">different vm sizes</a> specifies that I should have 250 Gb of storage for &#8220;Disk Space for Local Storage Resources&#8221; so this must be the C drive. I don&#8217;t have write access to all of it though, but I probably just haven&#8217;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.</p>
<h2>Processes</h2>
<p>I have also tried to enumerate all running processes in the machine and I ended up with the following list:</p>
<table border="0">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>path</th>
<th align="right">MB</th>
<th>start time</th>
<th>cpu time</th>
</tr>
</thead>
<tbody>
<tr>
<td>2352</td>
<td>clouddrivesvc</td>
<td>Access is denied</td>
<td align="right">5</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>456</td>
<td>csrss</td>
<td>Access is denied</td>
<td align="right">5</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>496</td>
<td>csrss</td>
<td>Access is denied</td>
<td align="right">5</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>0</td>
<td>Idle</td>
<td>Unable to enumerate the process modules.</td>
<td align="right">0</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1968</td>
<td>LogonUI</td>
<td>Access is denied</td>
<td align="right">15</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>592</td>
<td>lsass</td>
<td>Access is denied</td>
<td align="right">11</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>600</td>
<td>lsm</td>
<td>Access is denied</td>
<td align="right">6</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>2772</td>
<td>MonAgentHost</td>
<td>E:\diagnostics\x64\monitor\MonAgentHost.exe</td>
<td align="right">14</td>
<td>11/29/2009 3:40:48 PM</td>
<td>00:00:00.1718750</td>
</tr>
<tr>
<td>2504</td>
<td>msdtc</td>
<td>Access is denied</td>
<td align="right">8</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1212</td>
<td>osdiag</td>
<td>Access is denied</td>
<td align="right">6</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1876</td>
<td>rdagent</td>
<td>Access is denied</td>
<td align="right">23</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>580</td>
<td>services</td>
<td>Access is denied</td>
<td align="right">6</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>260</td>
<td>SLsvc</td>
<td>Access is denied</td>
<td align="right">11</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>392</td>
<td>smss</td>
<td>Access is denied</td>
<td align="right">1</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1252</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">3</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>2088</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">6</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1360</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">6</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>296</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">8</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1280</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">12</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1376</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">3</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>844</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">7</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>404</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">7</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>940</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">19</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>224</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">13</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>416</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">31</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>776</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">7</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1232</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">6</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>708</td>
<td>svchost</td>
<td>Access is denied</td>
<td align="right">10</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>4</td>
<td>System</td>
<td>Unable to enumerate the process modules.</td>
<td align="right">8</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1808</td>
<td>vds</td>
<td>Access is denied</td>
<td align="right">8</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1164</td>
<td>vmicsvc</td>
<td>Access is denied</td>
<td align="right">5</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>1152</td>
<td>vmicsvc</td>
<td>Access is denied</td>
<td align="right">4</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>2056</td>
<td>WaWebHost</td>
<td>E:\base\x64\WaWebHost.exe</td>
<td align="right">95</td>
<td>11/29/2009 3:40:33 PM</td>
<td>00:00:16.9531250</td>
</tr>
<tr>
<td>504</td>
<td>wininit</td>
<td>Access is denied</td>
<td align="right">5</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
<tr>
<td>532</td>
<td>winlogon</td>
<td>Access is denied</td>
<td align="right">5</td>
<td>Access is denied</td>
<td>Access is denied</td>
</tr>
</tbody>
</table>
<p>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&#8217;m leaving this part of the investigation as it is for now.</p>
<h2>Web Role</h2>
<p>So how is the code in my web role actually run by Azure? I can see these things:</p>
<ul>
<li>The exact code for the built/published web project is stored in E:\approot. There are my Global.asax, Web.config, bin-folder and so on.</li>
<li>The process that has been spawn to run this code is stored in E:\base\x64\WaWebHost.exe. I think this exe file is actually contained in the deployed packade, which means I can control this executable if I so wish?</li>
<li>There is no w3wp.exe process running so it seems that IIS is not doing any work at all to run my code. I&#8217;m guessing though that WaWebHost.exe may be a special version/compilation of w3wp.exe for Azure?</li>
</ul>
<p>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).</p>
<p>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.</p>
<p>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:</p>
<ul>
<li>An Application Pool that is running as &#8220;NetworkService&#8221; (the only one).</li>
<li>A web site with the name &#8220;Role Site&#8221; and a mapping of the root &#8220;/&#8221; to &#8220;E:\approot\&#8221;.</li>
<li>A binding for this site to ip 10.115.141.65 on port 20000 (no host name).</li>
</ul>
<p>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.</p>
<p>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.</p>
<h2>Conclusion about suitable scenario</h2>
<p>One thing I&#8217;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.</p>
<p>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&#8217;ll have to pay for the time between those two events: the launch and the decision.</p>
<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikeplate.com/first-investigation-of-windows-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: www.mikeplate.com @ 2010-09-07 11:59:45 -->