Automation: Migrates a Azure Virtual Machine to another subscription or data centre

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

A new year’s initiative to bookmark and maintain interesting scripts and Gists. Today, I have added an excellent Github Gist by Scott Scovell, to migrate an Azure VM to another subscription or data centre. The script automates and simply the overall process.

Script automates as following,

  1. Shutdown the source VM
  2. Exports the VM configuration to a temporary file
  3. Loops through all Azure disks attached to the source VM
  4. Schedules an asynchronous copy of the underlying VHD to the destination storage account
    • optionally overwrites existing VHD in destination if it exists
  5. Waits for all copy jobs to complete
  6. Adds Azure disks in the target subscription for every disk copied
    • optionally removes the existing Azure Disk if it exists
  7. Restores VM in the destination cloud service
  8. Starts the migrated VM


Preview: Initial thoughts on Azure DevTest Lab

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

Recently, I looked at the Azure DevTest Labs Public Preview, features are impressive and can see through the how fast it could change Ops and automation. With DevTest Labs, development teams and test teams can create a self-provisioning mechanism to deploy test environments (Windows or Linux) into Azure Cloud.


Comparison: Difference between an Azure Web Apps and an Azure Web Role

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

A frequent question for many client meetings, workshops and training. It is a valid question, and one of the reasons for the confusion is official documentation and community content. So, I tried to put some together.


Configuration: How to Create Virtual Directory in the Azure Web Role

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

There are few ways to create a Virtual Directory in the Azure Web Role instance and assign the physical path. I recommend through configuring basic service definition configuration.


Engineering: Set MachineKey on Azure Web App (Azure Website)

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

An Azure deployment may rewrite your machineKey and there is an excellent reason for that. machineKey plays critical role enforcing authorization and authentication particularly Form Authentication. Additionally, the MVC framework make use of machineKey for Anti-Forgery Tokens .

Still, there are some genuine reasons for having granular control over machineKey. The blog post the following code would help to reset or rewrite machineKey upon Application_Start event.


Automation: Simplified TeamCity CI Deploy Azure PowerShell Script

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

When it comes to programming handyman’s toolkit, there is nothing better than Gist. I thought it might be a good idea to arrange and share to the wider community. I am hoping to find some time and repost them as a blog post.

An excellent Gist that I came across for simplified TeamCity CI Deployment to Microsoft Azure.


Automation: Using Startup Task to manage Application Pool Settings in Azure Web Role

Posted by Nilay Parikh and last modified on Tue Jun 12, 2018.

Follow the simple steps to gain granular control over Web Role process.