by stephen-w-thomas | Nov 14, 2012 | Stephen's BizTalk and Integration Blog
I noticed today that the Platform Images for Windows Azure Virtual Machines has been updated to include a Windows Server 2008 R2 and Windows Server 2012 Image for October.
The great news is I re-tested installing BizTalk Server 2013 Beta on the new Windows Server 2012 Image and everything installed and is running without issues! This time I used a Medium Virtual Machine as compared to the Small to do the initial software installation. I noticed a huge difference in performance and installation time. Since I am not using the VM now, I have bumped it down to an extra-small that costs just over $0.01 per hour.
If you want to get BizTalk 2013 running before the official image is available, make sure you use the October Images. Best of luck.
by stephen-w-thomas | Nov 12, 2012 | Stephen's BizTalk and Integration Blog
A few days ago BizTalk 2013 Beta was announced and released for download. The plan is to make this available as a Windows Azure Virtual Machine Image just like the CTP but it has not yet been released.
Since the prebuilt image is not available, I wanted to try to manually install BizTalk Server 2013 Beta on a Windows Azure Virtual Machine. I did the same thing with the BizTalk 2010 R2 CTP without any issues. Below is a quick overview of BizTalk 2013 and my experience trying to get this running in an Azure Virtual Machine.
Some of the top improvements I am excited about with BizTalk 2013 include:
- Slick and clean integration with Windows Azure Service Bus including the ability to follow meta data across the exchange
- Easy ESB installation (I am already counting the hours per developer this will save in the future)
- New adapters for calling and exposing REST Services and SFTP
- Dependency tracking through BizTalk Admin Console
Below is what the Dependency Tracking looks like. It is somewhat basic but will be very helpful for someone new looking at an Application for the first time.

Below is my experience trying to get BizTalk 2013 running in a Windows Azure Virtual Machine.
Issues with Windows Server 2012 – End Result: Failure
I started off trying to get BizTalk 2013 to run on a Windows Server 2012 Image provided in the Image Gallery. While I admit I am still totally lost on the new Windows layout I figured no better way to learn than just jumping in.
I got SQL 2012 and Visual Studios 2012 installed without any issues. I installed and configured BizTalk 2013 Beta and also installed the ESB 2.2 from the main menu. Everything seemed fine, except the ESB 2.2 installation gave me a silent completion. That is, the install box just went away. I never got confirmation it was complete or if it had any errors.
I did not know anything was wrong until I tried to create my first project inside Visual Studios. Visual Studios was unable to find the BizTalk Template to create the project although the BizTalk Project was available as a selection. I have seen this in the past with other versions of BizTalk. I then went into the BizTalk Server Admin Console and got an error that it was unable to load the MMC.
I tried to do a BizTalk Repair, but that did not fix the issues, in fact I do not think it ever completed. I deleted the Virtual Machine and associated Virtual Hard Disk. I will give it a try again later when I have more time.
Issues with Windows Server 2008 R2 – End Result: Success, after fixing the issue
After already being in a down mood after my Windows 2012 experience I set out to try installing BizTalk on a Windows Server 2008 R2 Image. Like before, everything installed and configured fine. This time, I was able to create a new BizTalk project in Visual Studios. I was even able to deploy.
I ran into an issue when I tried to create a new Receive Port inside the BizTalk Admin Console. I received an error that pointed me to the Enterprise Single Sign-on Service. Sure enough, it was not started. I tried to start it and received the following error message. The error message was from source SideBySide:
“ Activation context generation failed for "C:\Program Files\Common Files\Enterprise Single Sign-On\ENTSSO.exe".Error in manifest or policy file "C:\Windows\WinSxS\manifests\amd64_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.6195_none_8a1dd9552ed7f8d8.manifest" on line 5. Component identity found in manifest does not match the identity of the component requested. Reference is Microsoft.VC80.ATL,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195". Definition is Microsoft.VC80.ATL,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.42". Please use sxstrace.exe for detailed diagnosis.”
I was able to find the file named amd64_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.6195_none_8a1dd9552ed7f8d8.manifest inside the above directory but the file was blank. This seems to be related to something in Visual Studios 2005. After an hour or two of research I found Johan fixed a similar issue related to SQL. I followed the same process to fix this issue.
To fix this issue I did the following :
1. From a command prompt I ran:
dropown C:\Windows\WinSxS\manifests\amd64_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.6195_none_8a1dd9552ed7f8d8.manifest
icacls C:\Windows\WinSxS\manifests\amd64_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.6195_none_8a1dd9552ed7f8d8.manifest /grant Administrators:F
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
2. Open the file and update as follows – I got this from a virtual machine running BizTalk Server 2010.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright %u00a9 1981-2001 Microsoft Corporation -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable/>
<assemblyIdentity type="win32" name="Microsoft.VC80.ATL" version="8.0.50727.6195" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"/>
<file name="ATL80.dll" hash="c7e340d6abcbb023cbfd848a292f6583f4227105" hashalg="SHA1"/>
</assembly>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
I am now up and running with BizTalk Server 2013 Beta on a Windows Azure Virtual Machine!
Has anyone else tried to install the new BizTalk 2013 Beta on a Windows 2008 R2 or Windows 2012 Azure Virtual Machine?
I would love to hear about your experience.
by stephen-w-thomas | Nov 6, 2012 | Stephen's BizTalk and Integration Blog
Over the past few months I have been blogging a lot about the new Windows Azure Virtual Machines. That is because I can see the huge impact on projects for having this type of infrastructure available literally at your fingertips – for pennies an hour.
Just yesterday I setup a full windows domain with 4 servers accessible worldwide in a matter of an hour or two.
I wanted to highlight the general complexity I see at many client related to setting up a new Virtual Machine. I created a video and entered it into the Windows Azure Makes Me FAST Contest. The video is called “The Story of your Life – Mr. Virtual Machine”. It is a “remake” of the old TV Show This Is Your Life well at least that was the goal.
Take a look at the video below and vote for it if you like what you see!
Step 1: Got to http://www.meetwindowsazure.com/fast and find my video. The videos are in the middle of the page. You might have to click the right arrow to see it.

Step 2: Look for video titled “The Story of your Life – Mr. Virtual Machine by Stephen W. Thomas”.

Step 3: Watch it and Vote for it if you like it.

Of course, if you do not like the video please do not vote for it. This website has a lot of other interesting videos. The coolest, next to mine of course, is the one by Alan Smith – “Rapid Massive On-Demand Scalability Makes Me Fast!”. It is well worth a watch.
by stephen-w-thomas | Oct 11, 2012 | Stephen's BizTalk and Integration Blog
Currently the Windows Azure Management Portal is having some difficulty using the UI to create an Image from an existing Virtual Machine.
You have two different options to create an Image without using the UI. The two options are using the REST API or PowerShell. The details of each approach our outlined below. I have tested both approaches and was able to create an Image and use that Image to create a new Virtual Machine.
Options 1: Using Windows Azure REST API
1. Sysprep the Virtual Machine and ensure it is shut down according to the instructions here.
2. Download my REST API Helper Tool or use your own.
3. Update the VM-CaptureImage.xml file to have the label name as the name of the Virtual Machine (it can really be anything) and the Image Name as the name of your output image.
4. Set your Management Certificate, Subscription ID, and working folder path inside the App.config file as outlined in the blog post.
5. Make an HTTP POST to: https://management.core.windows.net/<Subscription-ID>/services/hostedservices/<VM-Name>/deployments/<VM-Name>/roleInstances/<VM-Name>/Operations (assumes the Service Name and VM Name are the same).
6. Select the updated VM-CreateImage.xml as the POST Body.
7. This is an Async call and the tool will return an Operations Request ID and auto populate the ability to check the status of that request.
8. In about 3 to 5 minutes click on “Make REST Service Call” to check the status of the Async Request created above. You will eventually see a HttpStatusCode 200 and Status Succeeded (rather than Status In Progress).
Options 2: Using Windows Azure PowerShell
1. Sysprep the Virtual Machine and ensure it is shut down according to the instructions here.
2. Setup and configure PowerShell as outlined here. This takes about 10 minutes.
3. Run the following command: Save-AzureVMImage -ServiceName <Service-Name / Usually VM Name> -Name <Vm-Name> -NewImageName <New-Image-Name> -NewImageLabel <SomeLabel>
4. In about 3 to 5 minutes the screen will update to show the process was successful.
Keep in mind that Windows Azure Virtual Machines are a Preview Feature so from time to time things like this will happen. I am sure the Portal will be corrected soon to allow Images via the UI. Never the less, it is always good to know how to do them programmatically. Enjoy.
by stephen-w-thomas | Oct 8, 2012 | Stephen's BizTalk and Integration Blog
Some enhancements were made this weekend to the Windows Azure Preview Portal. With these enhancements is the addition of Service Bus features and I think the ability to create Containers inside a Storage Account. I do not remember that being in place before.
As it relates to Virtual Machines I noticed the following two changes:
1. When you Capture An Image from an existing Virtual Machine you get a notice saying the Virtual Machine will be deleted.
2. When you delete a DISK you are now giving the option to also delete the underlying blob storage vhd associated with that DISK. This is a nice, money saving feature.
On a side note, it seems the ability to create and capture an Image is no longer working. I have been trying since Friday with no luck. It was working a few weeks ago. So if you are trying to create an Image you may run into issues.
by stephen-w-thomas | Oct 8, 2012 | Stephen's BizTalk and Integration Blog
Windows Azure has a rich Management REST API for working with all types of artifacts.
Continuing on with my current theme of working with the Windows Azure Virtual Machines in Preview mode I came across some details of the REST API that might be helpful to others. While the documentation seem to say for GET and DELETE requests you need something like the following:
https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roles/<role-name>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
The only way I have been able to get GET and DELTET requests to work is using “deploymentslots” rather than “deployments”. Below are some samples of REST API URLs that I was able to get working. For POST requests, the below URL was used for sending in a Request Body with additional XML payload details.
The Service Name listed below is the Virtual Machine Name witch is usually the same as the underlying Service (although it does not have to be). When deleting, the Hosted Service used by the Virtual Machine may also need to be deleted.
To Get Virtual Machine Details – HTTP GET
https://management.core.windows.net/<Subscription-ID>/services/hostedservices/<Service-Name>/deploymentslots/Production
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
To Delete a Virtual Machine – HTTP DELETE
https://management.core.windows.net/<Subscription-ID>/services/hostedservices/<Service-Name>/deploymentslots/Production
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
Make sure to clean up the Service – HTTP DELETE
https://management.core.windows.net/<Subscription-ID>/services/hostedservices/<Service-Name>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
To Import a VM State (exported using PowerShell): – HTTP POST with Post Body
https://management.core.windows.net/<Subscription-ID>/services/hostedservices/<Service-Name>/deployments
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
To use Quick Create or Create a New Virtual Machine: – HTTP POST with Post Body
https://management.core.windows.net/<Subscription-ID>/services/hostedservices/<Service-Name>/deployments
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
Hope this helps someone else trying to use the Windows Azure REST API with Virtual Machines.
by stephen-w-thomas | Oct 5, 2012 | Stephen's BizTalk and Integration Blog
Recently I was looking at a forum question of someone trying to add a disk to the Azure Virtual Machines using the Windows Azure REST API.
You have two types of Disks. You have a Data Disk that do not have an operating system and are used to store user files. You also have OS Disks. The OS Disks contain the operation system and is the main disk used when creating an Azure Virtual Machine.
These can be created using the REST API, PowerShell, or the Management Portal.
The REST API documentation outlines the following body for the post to create a new disk.
<Disk xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HasOperatingSystem>true|false</HasOperatingSystem>
<Label>disk-description</Label>
<MediaLink>uri-of-the-containing-blob</MediaLink>
<Name>disk-mame</Name>
<OS>Linux|Windows</OS>
</Disk>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
While these are the right items to send to create the Disk, the order matters if you want to create an OS Disk. I found that the OS Element needed to be first in order to create an OS Disk vs. a Data Disk.
The correct body for the post to create an OS Disk should be:
<Disk xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<OS>Linux|Windows</OS>
<HasOperatingSystem>true|false</HasOperatingSystem>
<Label>disk-description</Label>
<MediaLink>uri-of-the-containing-blob</MediaLink>
<Name>disk-mame</Name>
</Disk>
Hope this helps someone out. More to come in the next few days on working with the Windows Azure REST API.
by stephen-w-thomas | Sep 26, 2012 | Stephen's BizTalk and Integration Blog
Recently the Windows Azure Storage API’s were updated to include the ability to do cross account, asynchronous blob transfers. This means it was no longer necessary to download the blob in order to upload it to a different Windows Azure account. You can read all about this here.
Over the past few weeks I have been working with the Windows Azure Virtual Machine feature that is currently in preview mode. I talked in a past blog post and video about using the Gallery to create a BizTalk 2010 R2 CTP Virtual Machine.
I am working on proving out and understanding the scenario of creating a Master Image (or Master VHD for non-domain Virtual Machines) and sharing it with a large team of developers. Why? Because on past projects we have spent considerable time and resources (i.e. money) creating, maintaining, and provisioning developer images. For example on a recent project an urgent issue arose and we needed a dedicated BizTalk environment to test a cumulative update release. It was requested on Friday morning. Still today on Wednesday it was not created (4 business days later). With Windows Azure Virtual Machines and a pre-built image this would literally be a few minute task and something I could do myself without the involvement of 3 to 5 other people. In total, so much time (i.e. money) can now be saved with Windows Azure Virtual Machines!
This type of example leads me to my tool and why I created it. In my scenario, a Windows Azure Virtual Machine guru would create a master image or vhd for distribution. With the new asynchronous cross account copy, sending an Image or VHD to a new developer is a snap… as long as you know the “rules”. I created, copied, deleted, and destroyed over 100 Virtual Machines at a total cost of around $5.00 across multiple Azure accounts to fully understand how to successfully copy an Image and VHD from one account to another without issues. I put all that into a simple tool that anyone can use to manage vhds and copy them from one account to another. See below for known issues, features of the tool, and quick how to’s.
I welcome all feedback! Please note this tool is an excellent example of why I am NOT a Windows Form guy and in no way should anything done in this tool be considered a best practice. This tool is more about getting the job done and trying to make things easy to understand.
Download: Windows Azure VHD Helper Tool
Basic Steps for Cross Account VHD Copy:
- Shut down your Virtual Machine.
- Delete your Virtual Machine.
- Delete the associated Image or Disk inside the Virtual Machine Portal. This does not remove the underlying blob of the vhd.
- Copy the blob from one storage account to another.
- Add your vhd back and recreate the virtual machine.
Issues (per my research) with VHD Copying as a Preview Feature– make sure you understand these issues and limitations. I assume most are related to preview issues and this process will get simpler with time.
- If you copy a vhd that is Leased (configured as an Image or Disk inside the Virtual Machine Portal) the Source Disk will become unusable.
- If you copy a vhd that is Leased (configured as an Image or Disk inside the Virtual Machine Portal) the Destination Disk will likely not work. I would say about 75% of the time they do not work. I just re-tested this tonight and they worked.
- Copying from one data center to another seems to be as slow as downloading the file.
- When downloading the file, make sure you do not close the form or the download will stop.
- Copy Status does not seem to be working. I either get NULL or Pending all the time. Probably a user error on my part…. The best way to find out if the copy is complete is to check the file size on the destination. It is 0 MB until the copy is complete.
Features:
- Visual view of vhds contained inside a Storage Account
- Simple, one click Delete of vhds
- Simple, one click Lease Break of vhds (for orphaned vhds – see more here)
- One click download of a vhd, tested to work with Hyper-V (downloads at a rate of about 3 MB/sec)
- Support for easily making a copy of a VHD within the same Azure account
- Support for making a vhd copy across Window Azure Accounts within the same region within a few seconds
- Support for making a vhd copy to any account in any region (slow when out of region)
- Prevents you from making a copy of a vhd with an existing Lease
- Uses the Windows Azure Storage API version 1.7.1 (github)
Advanced Features (with REST API Management Certificate):
- Visual view of all vhds contained inside a single Windows Azure Account
- See a “***” by vhds inside the Source storage account
- List all custom user images inside a single Windows Azure Account
Missing Features (i.e. items I hope to add later):
- Ability to upload a vhd
- Ability to get details on an Image
Quick How-To’s:
How to work with just one Storage Account:
Set just a Source Configuration inside the app.config file. I also have a check box for “source only” that will try to auto determine what you want to do. The default is Source Only.
How to Copy a vhd into the same account:
Inside the app.config file for the tool, set the Source and Destination to the same Storage Account.
How to Copy a vhd into another account in the same region (inter-account or cross-account):
Inside the app.config file for the tool, set the Source to the Storage Account that has the source vhd and set Destination to Storage Account that you want for the Destination. The destination container vhds does not need to exist. The tool will create it for you. Click “Copy”. The Destination list should refresh and the copy already be compete. You will know it is complete when the size of the vhd is not 0.
How to Copy a vhd cross region:
Inside the app.config file for the tool, set the Source to the Storage Account that has the source VHD and set Destination to Storage Account that you want for the Destination. The destination container vhds does not need to exist. The tool will create it for you. Select a vhd in the List box that is not lease. Change the vhd name if you wish. Click “Copy”. Click on “List All VHDS” on the top right until you see the file size of the Destination change from 0 to the size of the VHD. This will take a long time, up to 8 hours. I would not close the form until I have confirmed it was completed.
How to Download a Source vhd:
Inside the app.config file for the tool, set the Source to the Storage Account that has the source VHD. Click on “List All VHDS”. Select the VHD you want to download inside the List Box. Click on “Download”. You will be prompted for the download location. Make sure you have enough disk space. Leave the tool open until you see a Completed notice on the top right of the tool. This will take up to 8 hours. Do not close the form or the download will stop.
How to Break a Lease or Delete a vhd on the Source or Destination:
Inside the app.config file for the tool, set the Source and Destination to the Storage Accounts that has the VHDS. Click on “List All VHDS”. Using the List Box, select a single vhd from the list. Click on “Break VHD Lease” to break the existing lease or “Delete VHD” to delete the vhd. Note: this operations are not undoable. Using these incorrectly can result in loss of data or vhds.
I would like to thank the following references:
– How not to throw an exception using CreateIfNotExists on a container – http://blog.smarx.com/posts/testing-existence-of-a-windows-azure-blob
– How to do an Azure REST API Service call – http://msdn.microsoft.com/en-us/library/windowsazure/ee460782.aspx
– How to have a 2nd thread update the main windows form – http://stackoverflow.com/questions/10775367/cross-thread-operation-not-valid-control-textbox1-accessed-from-a-thread-othe
– Async across copy with SDK 1.7.1 – http://blogs.msdn.com/b/windowsazurestorage/archive/2012/06/12/introducing-asynchronous-cross-account-copy-blob.aspx
Download: Windows Azure VHD Helper Tool
by stephen-w-thomas | Sep 19, 2012 | Stephen's BizTalk and Integration Blog
I have been spending a lot of time the past few weeks working with the Windows Azure Virtual Machines that are currently available as a Preview Feature.
The ability to be up and running with a custom hosted Virtual Machine in a matter of minutes without any extra onsite hardware costs still amazes me, although this concept has been around for a while now. It is ever better that I can use the Virtual Machine for a few hours and then throw it away at a net cost to me of only a few cents.
As part for creating and removing over 50 Windows Azure Virtual Machines I ran into two main issues. I wanted to share those issues and the work around I have found for them.
Issue 1: Orphaned Windows Azure Virtual Machine Disks. These are listed under the Virtual Machines area of the preview portal, under Disks. These are Disks that say they are attached to a Virtual Machine that has already been deleted. I see this happen in about 1 in 15 Virtual Machines that I create and then delete.
FIX: The best way to deal with orphaned disks is to use PowerShell to delete them.
Install and configure Azure PowerShell according to this article. At a high level, you will need to download Azure PowerShell, create a management certificate, upload the certificate, download your account publishing settings, and install them into Azure PowerShell. It might sound like a lot of work but it takes less than 10 minutes.
Once complete, open PowerShell and run Get-AzureDisk. This will lists all the Virtual Machine Disks in your account. It uses your account details from the publishing settings file you imported and authentication is done via the management certificate.
To remote the orphaned disks, run Remove-AzureDisk yourDiskName as shown below.

Issue 2: When you try to delete a vhd blob you receive the following error: “A lease conflict occurred with the blob https://StorageName.blob.core.windows.net/vhds/YourVHDName.vhd”.
FIX: This is talked about in the forms and they list a PowerShell script for taking care of this issue. I was unable to get the PowerShell script to work but was able to get the lease broken using the Azure SDK 1.7.1 (on github).
Once you have a reference to the Azure SDK 1.7.1, it has a method called BreakLease on the CloudBlob class. The code to break the lease in C# is shown below. See the form post above for more details on VB and how to use the Azure SDK 1.7.1.
// Create the blob client using the Accounts details in App.Config
CloudStorageAccount sourceStorageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("SourceStorageConnection"));
// Create the blob client using the Accounts above
CloudBlobClient sourceBlobClient = sourceStorageAccount.CreateCloudBlobClient();
// Retrieve reference to a previously created container
// Rename "vhds" as needed. Can be used to read from any container.
CloudBlobContainer sourceContainer = sourceBlobClient.GetContainerReference("vhds");
CloudBlob sourceBlob = sourceContainer.GetBlobReference(VHDNAME.vhd);
// Create Timespan to allow the Lease to remain, in this case 1 second
TimeSpan breakTime = new TimeSpan(0, 0, 1);
// Call BreakLease (Available in 1.7.1)
sourceBlob.BreakLease(breakTime);
Use caution though, make sure you remove the Lease on the right blob otherwise bad and unexpected things will happen. At the very least, you will need to re-create the Virtual Machine from scratch.
I am working on a simple tool that will help copy, move, and delete VHDs as well as breaks the lease if you wish. This tool will be available in the next few days.
by stephen-w-thomas | Sep 19, 2012 | Stephen's BizTalk and Integration Blog
I have been working with Windows Azure Virtual Machines for a few weeks now. As of this blog post, the preview feature is running six locations currently: West US, East US, East Asia, Southeast Asia, North Europe, and West Europe.
One of the things I like about Windows Azure is the world-wide presence. When I select Quick Create for a Virtual Machine, I am able to decide what location to host my Virtual Machine so I can ensure this is some place close to me. Today I might be in Seattle but tomorrow I might be in London. I have the option to select what works best for me at any given time.
Here are a few items I think are worth pointing out.
I found that when using Quick Create to create a new Virtual Machine, I am not able to specify a storage location in the event that I have an existing location I would like to use to store the VHD. A new storage location in the format of portalvhds* will be created for me. The plus side is if you have an auto created location already, all other Quick Create Virtual Machines will use that location. The name of the auto created storage account is not the same across regions.
When using From Gallery, I have a few more options. For Microsoft supplied Images, I have the ability to use a pre-created storage account or have a new one created for me.
If I select Use Automatically Generated Storage Account, I then have the ability to select the Region (i.e. the datacenter) to host the Virtual Machine and Storage Account.
If I select an existing Storage Account, I no longer have the ability to select the Region.
I have been creating and using custom images for a while now and always wondered when I went to use a custom image, why I cannot change the Region I want the Virtual Machine to run at.
And now it all makes total sense!
You cannot create a Virtual Machine in a different Region than your storage container used for the Image or VHD. When selecting an existing storage account in the Gallery, using an existing custom image, or an existing VHD – in these cases the location of the Virtual Machine depends on the location of the underlying storage account.
The location of the Image or Disk is shown on the screen when selecting the image using the From Gallery creation option.
How to ensure you are running in the region / datacenter you want to be running in?
If you want your Virtual Machine to be running in a different region you will need to move the Image or VHD to that region first before creating a Virtual Machine using that resource. Either download and re-upload or copy it to via the API’s. Watch out, at 30 GB to 50 GB a piece this can get “expensive” quickly (for 50 GB VHD Zone 1 – $6.00 US to download). Inside the same datacenter, even across accounts, moving VHD currently do not have bandwidth charged.
Watch for more to come related to moving VHD from one location to another for use with Virtual Machines. I have a tool in the works that should help with this process.