Create Azure BizTalk Virtual Machine using Powershell

Hi today, I Will share a little snippet that allow you to create a virtual machine that host BizTalk 2010 R2 CTP.

Once you’ve installed the Windows Azure Management Cmdlets, you can start using Powerhsell.

You’ve two options to launch the Windows Azure Management Cmdlets :

  • Use the shortcut on the start Menu

image

  • Import manualy the Module using the following command :
Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1'

The next steps consist in :

  • configuring the subscription
  • configuring the storage
  • Provisioning the Virtual Machine

All these steps are well described in the post of Michael Washam

I will scope the creation of a new BizTalk Server 2010 R2 Virtual Machine. The commandline to quickly create a VM is :

 
New-AzureQuickVM [-AffinityGroup ] [-AvailabilitySetName ] [-Certificates ] [-DnsSettings ] [-HostCaching ] [-InstanceSize ] [-Location ] [-MediaLocation ] [-Name ] [-SubnetNames ] [-VNetName ] -ImageName -Password -ServiceName -Windows [] [] 

New-AzureQuickVM [-AffinityGroup ] [-AvailabilitySetName ] [-DnsSettings ] [-HostCaching ] [-InstanceSize ] [-Location ] [-MediaLocation ] [-Name ] [-SSHKeyPairs ] [-SSHPublicKeys ] [-SubnetNames ] [-VNetName ] -ImageName -Linux [] -LinuxUser -Password -ServiceName [] 

DESCRIPTION 
The New-AzureQuickVM sets the configuration for a new virtual machine and creates the virtual machine. It can create a new Windows Azure service, or deploy the new virtual machine into an existing service if neither -Location or -AffinityGroup is specified. 

PARAMETERS 

-AffinityGroup Specifies the Windows Azure affinity group the virtual machine will reside in. Only valid for a new cloud service. 

-AvailabilitySetName Specify the availability set to use. -Certificates Specifies a certificate list to use for creating the service. 

-DnsSettings Specifies a DNS Server object that defines the DNS settings for the new deployment. Use New-AzureDNS to create the DNS server object. -HostCaching Specifies the host caching mode to use. Supported options are: "ReadOnly" and "ReadWrite". 

-ImageName Specifies the name of the operating system image to use to create the operating system disk. 

-InstanceSize Specifies the size of the instance. Supported values are "ExtraSmall", "Small", "Medium", "Large", and "ExtraLarge". 

-Linux [] Specify to create a Linux virtual machine. 

-LinuxUser Specifies the Linux administrative account name to create. 

-Location Specifies the Windows Azure data center location that will host the virtual machine. When specified, New-AzureQuickVM will create a new Windows Azure service in the specified location. Only valid for a new cloud service. 

-MediaLocation Specifies the Windows Azure storage location to use for the virtual machines disks. 

-Name Specifies the name of the virtual machine. 

-Password Specifies the password for the administrative account. 

-ServiceName Specifies the new or existing service name. 

-SSHKeyPairs Specifies a list of SSH key pairs already deployed in the subscription to deploy in the virtual machine. 

-SSHPublicKeys Specifies a list of SSH public keys already deployed in the subscription to deploy in the virtual machine. 

-SubnetNames Specifies a list of subnet names the virtual machine will use. 

-VNetName Specifies the name of a virtual network the virtual machine will use. 

-Windows [] Include to create a Windows virtual machine.
 

So basically, we need :

  • a service name (the dns of the vm)
  • a name (the name of the vm)
  • a ImageName –> the link to the VHD that is required to create the VM
  • a password for the admin account
  • a location (West Europe in our example)

the difficulty was for me to know the image name, a commandlet is available for this :

Get-AzureVMImage | select ImageName
--------
CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd
MSFT__Win2K8R2SP1-Datacenter-201208.01-en.us-30GB.vhd
MSFT__BizTalk-Server-2010R2-CTP-3.10.77.0-07162012-en-us-50GB.vhd
MSFT__Windows-Server-2012-Datacenter-201208.01-en.us-30GB.vhd
MSFT__Sql-Server-11EVAL-11.0.2215.0-08022012-en-us-30GB.vhd
MSFT__Win2K8R2SP1-Datacenter-201207.01-en.us-30GB.vhd
OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd
SUSE__openSUSE-12-1-20120603-en-us-30GB.vhd
SUSE__SUSE-Linux-Enterprise-Server-11SP2-20120601-en-us-30GB.vhd

And magically, we can see the right image name to use :

 
New-AzureQuickVM –Windows -ServiceName "BTS2010R2Custom" -name "BTS2010R2Custom" -ImageName "MSFT__BizTalk-Server-2010R2-CTP-3.10.77.0-07162012-en-us-50GB.vhd" -Password "P@ssword1" -Location "West Europe" 
OperationDescription                    OperationId                             OperationStatus
--------------------                    -----------                             ---------------
New-AzureQuickVM - Create Cloud Service 858d9000-edec-4121-859a-dbd63abf97b2    Succeeded
New-AzureQuickVM - Create Deployment... c12504a6-6729-4052-9121-ee594ef36c4f    Succeeded 

after few minutes, the cloud service appears in the management Portal.

You can connect to this machine using the RDP with the username : Administrator and the password defined in the commandline.

This entry was posted in Azure, BizTalk, English and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s