<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>GrandpaRoach</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/grandparoach/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/grandparoach/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:26:34 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to configure an SMB file share for Azure based HPC compute nodes</title>
      <link>https://docs.microsoft.com/archive/blogs/grandparoach/how-to-configure-an-smb-file-share-for-azure-based-hpc-compute-nodes</link>
      <pubDate>Mon, 30 Apr 2012 13:03:00 GMT</pubDate>
      <dc:creator><![CDATA[SteveRoach]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/grandparoach/2012/04/30/how-to-configure-an-smb-file-share-for-azure-based-hpc-compute-nodes/</guid>
      <description><![CDATA[For the last few weeks, I have been working with one of our major ISV applications to enable it to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;">For the last few weeks, I have been working with one of our major ISV applications to enable it to &ldquo;cloud burst&rdquo; from an on-premises HPC cluster to Azure compute nodes.&nbsp; One of the key capabilities introduced with Service Pack 1 (SP1) for Windows Server 2008 R2 is the ability to provision compute nodes on Windows Azure as a supplement to an on-premise cluster. For more information, see <a href="https://technet.microsoft.com/en-us/library/gg481749(v=ws.10).aspx">Deploying Azure Worker Nodes in Windows HPC Server 2008 R2 SP1 Step-by-Step Guide</a>.&nbsp;</span></p>
<p><span style="font-size: small;">Like many HPC applications, this one utilizes an SMB file share to enable all of the compute nodes to access common data and executable code.&nbsp; At first, I simply created a file share on the (on-premises) HPC head node and set-up an Azure Connect group to allow all of the compute nodes to access it.&nbsp; However, the performance was not acceptable. &nbsp;So, I decided to create a file share on Azure to remove the Azure Connect bottleneck. &nbsp;</span></p>
<p><span style="font-size: small;">It is possible to set up an SMB file share using an Azure worker role as described in this article:</span></p>
<p><span style="font-size: small;"><a href="https://blogs.msdn.com/b/windowsazurestorage/archive/2011/04/16/using-smb-to-share-a-windows-azure-drive-among-multiple-role-instances.aspx">https://blogs.msdn.com/b/windowsazurestorage/archive/2011/04/16/using-smb-to-share-a-windows-azure-drive-among-multiple-role-instances.aspx</a></span></p>
<p><span style="font-size: small;">However, I found that I could not use these guidelines for HPC managed Azure compute nodes, because the .csdef and .cscfg files are not accessible for customization.&nbsp; The purpose of this blog entry is to document an approach for configuring one of the HPC Azure compute nodes to function as an SMB file share for all the others.</span></p>
<p><span style="font-size: small;"><b>NOTE: There is nothing persistent about this file share (hence the name, &ldquo;scratch&rdquo;).&nbsp; In fact, it may not even last the duration of a long running job, depending on the whim of the Azure fabric controller. But if you like to live dangerously, this will work.</b></span></p>
<p><span style="font-size: small;">The Azure based compute nodes that are provisioned by the on-premises HPC head node already have the File Services Role and the File Server Role Service installed, and port 445 is open by default on the internal endpoint.&nbsp; So, all that is necessary is to run the following commands:</span></p>
<table style="width: 582px; height: 484px;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="229">
<p style="padding-left: 30px;"><span style="font-size: small;">mkdir c:\scratch</span></p>
</td>
<td valign="top" width="409">
<p style="padding-left: 30px;"><span style="font-size: small;">Create the directory to be shared</span></p>
</td>
</tr>
<tr>
<td valign="top" width="229">
<p style="padding-left: 30px;"><span style="font-size: small;">net user guest /active:yes</span></p>
</td>
<td valign="top" width="409">
<p style="padding-left: 30px;"><span style="font-size: small;">Enable the Guest user.&nbsp; I found&nbsp;that this was necessary, because the HPC job scheduler creates a local user on the Azure compute nodes which is not part of the AD domain that the head node belongs to.&nbsp; So, if the head node&nbsp;</span><span style="font-size: small;">is going to access the file share, the guest user needs to be enabled and</span><span style="font-size: small;"> have permissions for that directory.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="229">
<p style="padding-left: 30px;"><span style="font-size: small;">netsh firewall set service type=fileandprint mode=enable scope=all</span></p>
</td>
<td valign="top" width="409">
<p style="padding-left: 30px;"><span style="font-size: small;">I took this command from the article referenced above.&nbsp; It will return a warning message about the&nbsp;command being deprecated, but it still works.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="229">
<p style="padding-left: 30px;"><span style="font-size: small;">icacls c:\scratch&nbsp;/grant guest:F /t</span></p>
</td>
<td valign="top" width="409">
<p style="padding-left: 30px;"><span style="font-size: small;">This is the command that gives full permissions to the guest user.&nbsp; This might normally be a security concern, but the internal endpoints on the Azure compute nodes are only accessible from other nodes in that same Hosted Service or through the IPsec connection that Azure Connect provides.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="229">
<p style="padding-left: 30px;"><span style="font-size: small;">net share scratch=c:\scratch /grant:everyone,FULL</span></p>
</td>
<td valign="top" width="409">
<p style="padding-left: 30px;"><span style="font-size: small;">This was taken from the article above as well, except that I am giving full permissions to everyone.</span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size: small;">If the on-premises head node does not need to access the </span><span style="font-size: small;">file share, then this is all that is necessary. &nbsp;If the head node does need to access the file </span><span style="font-size: small;">share, as was the case for this application, then a couple of other steps are </span><span style="font-size: small;">required.&nbsp; First, you need to make sure </span><span style="font-size: small;">that Azure Connect is configured between the Head node and the Azure file server </span><span style="font-size: small;">node.&nbsp; Since most applications use a UNC </span><span style="font-size: small;">path to access the file share (\\AzureCN-0006\scratch), all of the nodes need </span><span style="font-size: small;">to be able to resolve the name to an IP Address.&nbsp;&nbsp;The AzureCN-xxxx node names are managed by </span><span style="font-size: small;">HPC and are maintained in the hosts files on each of the compute nodes.&nbsp; However, since the head node communicates </span><span style="font-size: small;">with the Azure compute nodes through a proxy, it does not have an entry in </span><span style="font-size: small;">either DNS or its hosts file which references the AzureCN-xxxx name. &nbsp;So, we need to add an entry in the hosts file on </span><span style="font-size: small;">the head node which maps the IPv6 address that Azure Connect established to the </span><span style="font-size: small;">AzureCN-xxxx name. &nbsp;&nbsp;You can do that </span><span style="font-size: small;">manually by using the "clusrun /nodes:AuzreCN-xxxx ipconfig" command to discover </span><span style="font-size: small;">the IPv6 address for the PPP connection.&nbsp;</span><br /><span style="font-size: small;">Then, you need to add a row to the c:\windows\system32\drivers\etc\hosts </span><span style="font-size: small;">file for that address and hostname combination.</span></p>
<p><span style="font-size: small;">When I worked through this process the first several times, </span><span style="font-size: small;">I entered all of the commands manually, but then, I realized it would be simple </span><span style="font-size: small;">to automate the entire process by submitting a job to the HPC scheduler.&nbsp; So, I wrote this PowerShell script:</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">$an = Read-Host "Please enter the name of the Azure node </span><span style="font-size: small;">to use for the file server"</span><br /><br /><span style="font-size: small;">$job = New-HpcJob -Name "Create a File Share" -RequestedNodes $an</span><br /><br /><span style="font-size: small;">$job | Add-HpcTask -Name "Create Folder" -Command "mkdir </span><span style="font-size: small;">c:\scratch"</span><br /><br /><span style="font-size: small;">$job | Add-HpcTask -Name "Enable Guest User" -Command "net user </span><span style="font-size: small;">guest /active:yes"</span><br /><br /><span style="font-size: small;">$job | Add-HpcTask -Name "Enable Firewall" -Command "netsh </span><span style="font-size: small;">firewall set service type=fileandprint mode=enable scope=all"</span><br /><br /><span style="font-size: small;">$job | Add-HpcTask -Name "Grant Full Permissions to Guest" -Command </span><span style="font-size: small;">"icacls c:\scratch&nbsp;/grant guest:F /t"</span><br /><br /><span style="font-size: small;">$job | Add-HpcTask -Name "Share Folder" -Command "net share </span><span style="font-size: small;">scratch=c:\scratch /grant:everyone,FULL"</span><br /><br /><span style="font-size: small;">submit-hpcJob -Job $job</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"># Get the IPv6 address of the node</span><br /><br /><span style="font-size: small;">$IPConfiginfo = clusrun /nodes:$an ipconfig</span><br /><br /><span style="font-size: small;">$Addressline = $IPConfiginfo -match "IPv6"</span><br /><br /><span style="font-size: small;">$Addressline[1] -match</span><br /><span style="font-size: small;">"[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}"</span><br /><br /><span style="font-size: small;">$hostsfileentry = $matches[0] + "&nbsp;&nbsp; </span><span style="font-size: small;">" + $an</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"># Insert new row into hosts file with AzureCN name</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">$hosts = "c:\windows\System32\Drivers\etc\hosts"</span><br /><br /><span style="font-size: small;">(gc $hosts) -replace "true", "$&amp;`r`n$hostsfileentry" | </span><span style="font-size: small;">sc $hosts</span></p>
<p><span style="font-size: small;">If you try this and have any problems, please let me know.</span></p>
<p><br />&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Use of a differencing VHD can cause the Windows Azure VM Role to not start</title>
      <link>https://docs.microsoft.com/archive/blogs/grandparoach/use-of-a-differencing-vhd-can-cause-the-windows-azure-vm-role-to-not-start</link>
      <pubDate>Thu, 09 Feb 2012 14:22:00 GMT</pubDate>
      <dc:creator><![CDATA[SteveRoach]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/grandparoach/2012/02/09/use-of-a-differencing-vhd-can-cause-the-windows-azure-vm-role-to-not-start/</guid>
      <description><![CDATA[If the parent VHD size is already at the maximum limit, then using a child differencing disk will...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: medium;">If the parent VHD size is already at the maximum limit, then using a child differencing disk will cause the VM Role to not start.&nbsp; I don't have any official confirmation, but my assumption is that the use of the differencing disk is causing the "effective" disk size to exceed the upper limit. </span></p>
<p><span style="font-size: medium;">Recently, I was helping one of my clients build a VHD image for use as a VM Role on Windows Azure, and we discovered that the VM Role would not start.&nbsp; We had decided to use a combination of base + differencing disk as per the recommendation from section 4.6 on this <a href="https://technet.microsoft.com/en-us/library/hh184311(WS.10).aspx" target="_blank">TechNet article</a>:</span></p>
<p style="padding-left: 30px;"><span style="font-size: medium;">If you will be frequently updating an application running on the VM nodes or changing the configuration of the operating system, you may want to upload a base VHD to Windows Azure on which the application is not installed. Then, you can use Hyper-V Manager and the base VHD to create a differencing VHD that contains the application updates and other configuration changes. When you need to update the Windows Azure VM nodes, you can upload the differencing VHD. For step-by-step procedures, see <a id="ctl00_MTCS_main_ctl62_ctl00_ctl01" href="https://go.microsoft.com/fwlink/p/?LinkId=217131" target="blank">How to Change a Server Image for a VM Role by Using a Differencing VHD</a> (<a href="https://go.microsoft.com/fwlink/p/?LinkId=217131">https://go.microsoft.com/fwlink/p/?LinkId=217131</a>).</span></p>
<p><span style="font-size: medium;">Initially, we tried to keep the image as small as possible (to reduce the upload time), because we assumed that we would be able to expand it later if necessary.&nbsp; However, when we ran out of space and ran the "Edit Disk" wizard from the Hyper-V management console, we discovered this warning message:</span></p>
<p style="padding-left: 30px;"><span style="font-size: medium;">Do not edit a virtual hard disk when it is used by a virtual machine that has snapshots, or when it is associated with a differencing virtual hard disk.&nbsp; Otherwise, data loss may occur.</span></p>
<p><span style="font-size: medium;">So, we had to throw away all of the updates and applications we had installed on the differencing disk, expand the parent disk, create a new differencing disk, and re-do all the application installation and configuration work.&nbsp; When we ran out of space, we noticed that even with the differencing disk, the size of the C:\ drive on the Virtual Machine was still the same as on the parent VHD, so we assumed that the differencing disk did not increase the size of the disk.&nbsp; We didn't want to run out of space and have to repeat that process again, so we decided to expand the parent disk 65GB which is the maximum size specified for Medium, Large, and Extra Large Azure instances.&nbsp; We ran sysprep and used the csupload utility to upload the parent VHD image (65GB) to the Azure storage.&nbsp; We then created a differencing disk, installed all the applications, etc., sysprepped, and uploaded that image (9GB). </span></p>
<p><span style="font-size: medium;">We then ran a PowerShell script to provision several VM Roles based on the differencing disk.&nbsp; After about 30 minutes, the status message on the Azure portal said , "Failed to Start".&nbsp; There was no indication of what the problem was.</span></p>
<p><span style="font-size: medium;">So, we changed the .cscfg file to specify the parent VHD instead of the differencing VHD and ran the provisioning script again.&nbsp; This time, the nodes all provisioned successfully with no problems. Because this worked, we went back to the Hyper-V "Edit Disk" and ran the Merge command to incorporate all of the changes from the differencing disk onto the parent.&nbsp; We then uploaded the new merged image and were able to successfully provision the VM Roles.</span></p>
<p><span style="font-size: medium;">I have seen VM Roles which were based on differencing VHD's get provisioned successfully, but it will not work if the parent VHD is already at the maximum size limit.</span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>More Lessons Learned with VHD's</title>
      <link>https://docs.microsoft.com/archive/blogs/grandparoach/more-lessons-learned-with-vhds</link>
      <pubDate>Wed, 07 Dec 2011 11:58:59 GMT</pubDate>
      <dc:creator><![CDATA[SteveRoach]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/grandparoach/2011/12/07/more-lessons-learned-with-vhds/</guid>
      <description><![CDATA[After I installed the v1.6 Azure SDK, I discovered a problem while attempting to upload a VHD to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">After I installed the v1.6 Azure SDK, I discovered a problem while </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">attempting to upload a VHD to Azure.&nbsp; &nbsp;I followed all of the steps for creating the </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">VMRole, including installing the WaIntegrationComponents-x64.msi from the</span></span><br /><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">wavmroleic.iso, but when I ran the csupload command, after it mounted the VHD </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">for the verification step, it failed with this message:</span></span></p>
<p><span style="color: #ff0000; font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">Cannot find the VM Role Agent.<br /></span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Failed the Verification tests.<br /></span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Cannot prepare VHD e:\VMRole.vhd</span></span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">Thinking that I might have installed the wrong Azure Integration </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Components, I fired up the Virtual Machine, uninstalled the Azure Integration </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Components, and then re-installed them after double checking that I was using</span></span><br /><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">the latest (v1.6) version.&nbsp; I ran sysprep </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">again and tried the csupload again but received the same error.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">Next, I decided to try uploading the VHD using the HPC management </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">console rather than the csupload utility. </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">The upload was successful, but I was not able to provision a VMRole </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">using that VHD.&nbsp; After spinning for an</span></span><br /><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">hour, the Azure Management Portal displayed an error message indicating that it </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">could not connect and that the integration components might be missing.&nbsp; So, the csupload utility actually did a </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">better job verifying the image than the HPC image upload wizard did.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">At </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">this point, I was ready to give up on trying to use VMRoles altogether.&nbsp; However, in my research, I discovered a blurb </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">on <a href="https://msdn.microsoft.com/en-us/library/windowsazure/hh134847.aspx">this website</a>&nbsp;which stated:</span></span></p>
<p style="padding-left: 30px;"><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><strong>Window Azure Integration Components incompatible with Web Server Edition of Windows Server 2008 R2</strong></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;"><strong>Applies to</strong>: </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Windows Azure SDK 1.3 and later</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;"><strong>Symptom</strong>: VM </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Roles based in Window Web Server Edition are stuck with a status &ldquo;Setting Up&rdquo; </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">in the Windows Azure Portal.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;"><strong>Cause</strong>: The Windows Azure </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Integration Components depend on a system assembly which is not available in </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Windows Web Server 2008 R2</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;"><strong>Resolution</strong>: Use </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Windows Server 2008 R2 <span style="background-color: #ffff00;">Enterprise </span></span><span style="font-family: tahoma,arial,helvetica,sans-serif;">instead of Windows Web Server 2008 R2.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">I had not used Web </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Server Edition when I built my VHD, I had used Standard Edition.&nbsp; But since the resolution advice did not recommend </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">the Standard edition, I wondered if there might be an incompatibility there as</span></span><br /><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">well, even though on <a href="https://technet.microsoft.com/en-us/library/hh184311(WS.10).aspx">this site</a> it says Standard should work.</span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">So, I started from </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">scratch and created a new VHD using the Enterprise edition of the OS and the </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">integration components from the v1.6 Azure SDK.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">The new image passed the </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">validation step, uploaded and successfully spun up as a VMRole in Azure.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: tahoma,arial,helvetica,sans-serif;">This may not be a new </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">condition.&nbsp; I have deleted my old VHD&rsquo;s </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">so I cannot say for sure whether the old images that worked in the past were </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">built on Standard or Enterprise.&nbsp; The </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">bottom line is that there seems to be an incompatibility between the v1.6 Azure </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">SDK and the Standard edition of the OS, so I will be using the Enterprise </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Edition as the base for all of my VMRoles in the future.</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>More fun with Certificates</title>
      <link>https://docs.microsoft.com/archive/blogs/grandparoach/more-fun-with-certificates</link>
      <pubDate>Tue, 01 Nov 2011 13:07:00 GMT</pubDate>
      <dc:creator><![CDATA[SteveRoach]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/grandparoach/2011/11/01/more-fun-with-certificates/</guid>
      <description><![CDATA[I ran across another problem while trying to upload another VHD to Azure. I had decided to upgrade...]]></description>
      <content:encoded><![CDATA[<p>I ran across another problem while trying to upload another VHD to Azure. I had decided to upgrade my HPC head node to Service Pack 3 (the Release Candidate is available on <a href="https://connect.microsoft.com/hpc">https://connect.microsoft.com/hpc</a>) and when I tried to spin up the Azure VMRole compute nodes based on the VHD that I had uploaded previously, I discovered that they would never finish provisioning. An hour after the provisioning log indicated that the Azure operation succeeded - and the status of all the nodes in the Management Portal indicated "Ready", the provisioning log stated "Node AZURE\AzureCN-001 never became available, and the state changed to "Offline".</p>
<p>I realized that the problem was probably the mismatch between SP2 on the VMRole nodes and SP3 on the HPC head node. So, I created a differencing VHD and fired up a new Virtual Machine, uninstalled the HPC Pack, and installed the HPC Pack with SP3. After running sysprep, I tried to upload the new VHD to Azure storage using the csupload utility, but I encountered this error:</p>
<p><span style="color: #ff0000;">Cannot contact server Could not establish secure channel for SSL/TLS with authority 'management.core.windows.net'.</span></p>
<p>After scratching my head for some time, it dawned on me that I might have a problem with the certificate, even though the connection parameter specified the same certificate that I had used successfully in the past.</p>
<p>I have also been working on some of the learning exercises in the Windows HPC with Burst to Windows Azure Training Course available here:</p>
<p><a href="https://msdn.microsoft.com/en-us/HPCAzureBurstTrainingCourse">https://msdn.microsoft.com/en-us/HPCAzureBurstTrainingCourse</a></p>
<p>A couple of those examples leverage the REST API's for submitting jobs to the HPC scheduler. As part of that setup, there is a step where I was given a choice to select a certificate for binding to port 443, and I can&rsquo;t remember which certificate I chose, but it was obviously not the same one that I had been using for the Azure connections.</p>
<p>So,I opened a command prompt and ran this command to determine which certificate was bound to port 443:</p>
<p>netsh http show sslcert</p>
<p>I then opened up the MMC console, and learned a new trick.&nbsp; I added the Certificate snap-in twice &ndash; once for the Local Machine, and once for the Current User.&nbsp; This saved me having to do an export from one and import to the other as I described in <a href="https://blogs.technet.com/b/grandparoach/archive/2011/10/06/lessons-learned-while-uploading-a-vhd-to-windows-azure.aspx" target="_blank">my earlier blog post</a>.&nbsp; After I located the certificate in the Trusted Root section of the Local Machine store, I exported it to the desktop so that I could add it to my Azure Management certificates then simply dragged it to the<br />Personal section of the Current User store.</p>
<p>Once I added it to my Management Certificates through the Azure Management Portal, I ran the</p>
<p>csupload Set-Connection</p>
<p>command to specify the new certificate, then I was able to upload the new VHD with no other problems.</p>
<p>The moral to the story is &ndash; Make sure that the same certificate is being used for both the REST SSL port binding and the csupload connection.</p>]]></content:encoded>
    </item>
    <item>
      <title>Lessons learned while uploading a VHD to Windows Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/grandparoach/lessons-learned-while-uploading-a-vhd-to-windows-azure</link>
      <pubDate>Thu, 06 Oct 2011 13:39:26 GMT</pubDate>
      <dc:creator><![CDATA[SteveRoach]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/grandparoach/2011/10/06/lessons-learned-while-uploading-a-vhd-to-windows-azure/</guid>
      <description><![CDATA[Recently, while attempting to upload a VHD to Windows Azure, I encountered a few perplexing road...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Recently, while attempting to upload a VHD to Windows Azure, I encountered a few perplexing road blocks.&nbsp; Because it took significant research as well as trial and error&nbsp;to determine a work around, I'm posting my findings so that others can avoid those roadblocks.</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">I set out to&nbsp;deploy a Windows Azure VM node in Windows HPC Server 2008 R2.&nbsp; I followed the Step-by-Step Guide&nbsp;in this TechNet article:</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><a href="https://technet.microsoft.com/en-us/library/hh184325(WS.10).aspx">https://technet.microsoft.com/en-us/library/hh184325(WS.10).aspx</a>&nbsp;</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><strong>Roadblock #1 - Could&nbsp;not import the&nbsp;VHD&nbsp;to HPC image store</strong></span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Everything worked as expected until I got to Step 5 - Upload a VHD to Windows Azure.&nbsp; Before uploading the file to Azure, the HPC process requires that the image be imported into the HPC image repository.&nbsp; I started this process, but it never finished.&nbsp; There were no error messages - it just ran forever.&nbsp; My research revealed that the root cause of the problem was that there was not enough space on the HPC head node c: drive.&nbsp; Since HPC requires that all the images that it manages reside on the c: drive, if there is not enough space, there is no work around right now.&nbsp; </span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">So, I gave up&nbsp;trying to use the HPC tools&nbsp;for the upload and turned instead to the Azure command line utility, csupload.&nbsp; I found a link which describes How to Upload a VHD to Windows Azure using this utility:</span></p>
<p><span style="color: black; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><a href="https://msdn.microsoft.com/en-us/library/windowsazure/gg465385.aspx">https://msdn.microsoft.com/en-us/library/windowsazure/gg465385.aspx</a></span></p>
<p><span style="color: black; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">I had already sucessfully configured the management certificate to enable&nbsp;HPC to provision Worker Roles on Azure by exporting the Default Microsoft HPC Azure Management certificate (which gets automatically added to the Trusted Root Certification Authorities&nbsp;store when the HPC Pack is installed)&nbsp;and adding it&nbsp;to my Azure subscription.&nbsp; Consequently, when I read the note on step 3 that states, "The&nbsp;certificate that you use must be installed in the certificate store", I assumed that it already was.&nbsp; </span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><strong><span style="color: black;">Roadblock #2 - Error with certificate</span></strong></span></p>
<p><span style="color: black; font-size: small;">But when I tried to run the Set-Connection command, I received this error message:</span></p>
<p style="padding-left: 30px;"><span style="color: #ff0000; font-family: terminal,monaco; font-size: small;">Cannot access the certificate specified in the connection string. Verify that the certificate is installed and accessible.<br /></span><span style="color: #ff0000; font-family: terminal,monaco; font-size: small;">The syntax for the connection string 'SubscriptionId=abcdef01-2345-6789-abcd-ef0123456789;CertificateThumbprint=abcdef0123456789abcdef0123456789abcdef01'</span><br /><span style="color: #ff0000; font-family: terminal,monaco; font-size: small;">is not &nbsp;valid.</span></p>
<p><span style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">This was very confusing since I had already used this combination of Subscription ID and Certificate in a node template to add Azure nodes to the HPC cluster with no problems.&nbsp; After much research, I discovered a discussion forum where it was&nbsp;explained that the certificate had to be in the User Account as well as the Computer Account.&nbsp; So, I opened up the MMC and added the Certificates snap-in, specified&nbsp;the Computer Account and&nbsp;navigated to the Trusted Root Certification Authorities store.&nbsp; I did a right-click on the Default Microsoft HPC Azure Management certificate and selected All Tasks, then Export.&nbsp; I saved the .cer file to the desktop.&nbsp; I then closed the MMC without saving the settings, and reopened it again.&nbsp; This time, when I added the Certificates snap-in, I specified My User Account.&nbsp; I imported the .cer file from the desktop to both the Personal and the Trusted Root Certification Authorities stores.&nbsp; I probably didn't need to do both, but I wanted to make sure I covered all the options.&nbsp; Then, I retried the Set-Connection command and it ran with no errors.</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"><strong><span style="color: #000000;">Roadblock #3 - Cut and Paste from web site resulted in errors</span></strong></span></p>
<p><span style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">For each of the steps in the upload process, the web site has code snippets which can be copied to the clip board for pasting into the command shell.&nbsp; When I tried this on step 4, I received the following error message:</span></p>
<p style="padding-left: 30px;"><span style="color: #ff0000; font-family: terminal,monaco; font-size: small;">Too many arguments for command Add-VMImage expects 0 argument(s) found 6.<br /></span><span style="color: #ff0000; font-family: terminal,monaco; font-size: small;">Found: '-LiteralPath', 'VMRole.vhd', '-Location', 'SouthCentral US', '-Name', 'VMrole.vhd'<br /></span><span style="color: #ff0000; font-family: terminal,monaco; font-size: small;">Named parameter "-LiteralPath &lt;string&gt;" missing for command Add-VMImage.</span></p>
<p><span style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">This one was especially difficult to debug, because everything was specified exactly as it should have been.&nbsp; I tried several times to modify the command with fewer parameters to see what the different error messages would say.&nbsp; I finally decided to&nbsp;type in the command rather than paste it from the web site.&nbsp; That fixed the problem.&nbsp; The command worked and I was able to upload the VHD.</span></p>
<p><span style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">I hope these insights will help others to work around these roadblocks without killing as much time as I did.</span></p>
<p><span style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;"></span></p>
<p><span style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">&nbsp;</span></p>
<p><span style="color: #000000;"></span></p>
<p><span style="color: black; font-family: 'Tahoma','sans-serif'; font-size: 10pt;"><o:p></o:p></span>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>