Saturday, April 26, 2014

Can not find your azure storage credentials – Windows Azure Storage


I was performing an operation in powershell to copy blob from one storage account to another storage account. But before that I was trying to get the blobs present in container by using powershell command –
Get-AzureStorageBlob -Container vhds
When you fire this command you will receive error stated as below –
“Can not find your azure storage credentials.”
The reason is you have not set the context for current storage operation. The total scripts should be as follows –

Thursday, April 17, 2014

How to create Azure virtual machine using Visual Studio and Azure SDK 2.3


In build 2014 Day 2 keynote, the new capability of visual studio was demonstrated about creating Azure Virtual Machine without login to the Azure management portal. With the release of Azure SDK 2.3, now you can create an Azure Virtual Machine from visual studio itself. Following steps walks you through the same –
Open Server Explorer in visual studio 2012 and right click Virtual Machines option. Then select “Creation Virtual Machine” option as shown below –


A dialog box appears. Sign in to your account and select subscription in which you wish to create Azure Virtual Machine.


Then you can select the image from which you wish to create the virtual image. Either you can use standard image from option Platform Images, or you can choose MSDN images. If you already have images captured from other virtual machines then you can create virtual machine from these captured images as well.

However you cannot create Azure Virtual Machine from “My Disks” option which is available on Azure Management Portal.


Select the image of your choice and click Next. I have chose Windows Server 2008 R2 SP1 for this demo. Enter basic details for selected VM image.


Then select existing cloud service or create new. Based on virtual network configuration for selected cloud service data in Subnet and Virtual network dropdown will populate. If cloud service does not belong to virtual network then these dropdowns will be disabled.


You can modify the existing, add new or delete existing endpoints as shown below –



Click on Create to start creating azure virtual machine. The progress can be viewed from Azure Activity Log in visual studio. However the way we can cancel the ongoing deployment in case of Cloud Service Deployment, Azure VM Cancellation is not supported. Refer below screenshot –


Hope this helps.

Cheers…
Happy Provisioning!!!

Monday, March 31, 2014

Content Type application/soap+xml; charset=utf-8 was not supported by service. The client and service bindings may be mismatched


This is the error I had encountered when I was configuring wshttpbinding with Azure WCF  Web role as per the steps I mentioned here - http://sanganakauthority.blogspot.in/2014/03/azure-wcf-web-role-with-wshttpbinding.html 

This problem is encountered when metadata endpoint is not configured on WCF web config file. So you need to configure mex endpoint and mark httpGetEnabled as true. 

<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 

And in service behaviour mark httpGetenabled=true. This should solve the problem. 

Hope this helps.

Cheers…
Happy Configuring!!!

Tuesday, March 11, 2014

Azure Virtual Machine Provisioning Timed Out problem and solutions


To capture the image of Azure Virtual Machine, you should follow the steps mentioned at the link –

 

This link states to select “Quit” option while performing sysprep so that while provisioning VM based on captured image, it won’t run into timed out error. This is perfectly fine. However what if even after selecting Quit during sysprep you run into Provisioning timed out error while creating VM based on captured image? 

I recently ran into such issue. I had selected Quit option during sysprep, and then I captured the VM image and when I provisioned VM based on this captured image, I got error as “Provisioning Timed Out”.

However interesting fact was that, I was able to make RDP to the machine and all installed application was working fine on it. Now if I restart this captured image based Azure VM from Management Portal, VM got into Running status on portal. This was one of the workaround however not a permanent solution. 

Then I raised a support ticket with Microsoft and findings were awesome.

Recently in Feb 2014, Azure Team technical blog posted that, VM agent is now by default installed on Azure virtual Machines. And guess what, VM agent was the problem behind Provisioning timed out error for Azure VM.

This new VM agent was installed on Azure VM that I was using to capture the image. Then when I created a new virtual machine based on captured image by default VM agent tries to get installed again, but as it is already installed may be monitoring servers will never receive the status as “installation complete” which they are waiting for  and hence after certain time interval status of VM becomes Provisioning Timed Out.

To fix this problem of Provisioning Timed Out, while creating VM’s remember to uncheck the option “Install the VM agent”.

That’s it you are done and problem of Provisioning timed out error resolved.
 
MSDN link here -

Hope this helps.

Cheers…

Happy Provisioning!!!