Manage Azure with System Center 2012 R2 Virtual Machine Manager #SCVMM 2012 R2 #UR6   1 comment

With Update Rollup 6 for System Center 2012 R2 Virtual Machine Manager (VMM 2012 R2 UR6) you have the option to manage Azure Virtual machines.

What you can do with this feature
If you already manage your on-premises virtual machines in Virtual Machine Manager, you can use this feature to perform some very basic actions on Azure instances without leaving the VMM console. For example, you can do the following:

  • Add or remove one or more Azure subscriptions by using the VMM console.
  • See a list view of details and statuses of all role instances in all deployments in that subscription.
  • Manually update the list of instances.
  • Perform the following basic actions on the instances:
    • Start
    • Stop
    • Shutdown
    • Restart
    • Connect through RDP

 

image

I tried to get this done all by PowerShell but it failed on me during lack of time to test this.

So basically you need a Azure Management Certificate

image

What you need to do is create a Certificate We use makecert and as you need the whole studio for just the makecert you can download the file from my onedrive http://1drv.ms/1GMrelk

What we need is just a display name , azure Subscription ID and a Certificate.

image

In my example you will need the Azure PowerShell Module.

You can download and install the Azure PowerShell modules by running the Microsoft Web Platform Installer. When prompted, click Run. The Web Platform Installer installs the Azure PowerShell modules and all dependencies. Follow the prompts to complete the installation.

First we make a self signed Certificate.

c:\makecert -sky exchange -r -n "CN=clustermvpazureFake" -pe -a sha1 -len 2048 -ss My "c:\clustermvpazureFake.cer"

Now that I have a Certificate I can upload this in my personal store.

Import-Certificate -FilePath "c:\clustermvpazureFake.cer" -CertStoreLocation ‘Cert:\currentuser\My’ -Verbose

image

sure you can do this manually but this is faster.

the next step is get my subscription ID

The basic steps to get my subscription is always the same get my publish file an list all my subscriptions

Import-Module Azure
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1"
Get-AzurePublishSettingsFile
Import-AzurePublishSettingsFile "c:\azureapril.publishsettings"
Get-AzureSubscription

Selecting my Subscription.

Select-AzureSubscription "MVP-Cluster"

 

Getting my ID in just some easy steps I get my ID

$getauzsub= Get-AzureSubscription | Where-Object {$_.Subscriptionname  -eq "MVP-Cluster"}
$azuresubid = $getauzsub.SubscriptionId
$azuresubid

This ID You can copy past this from the PowerShell into the GUI and selecting my certificate that we just created and imported in the store.

 

image

 

image

And As you will get a warning : The Subscription could not be authenticated by azure. Ensure that your Certificate and Subscription ID are valid.

image

We forgot to Upload the Certificate to Azure.

As there are many post on the web to upload the management certificate with PowerShell it all failed on me. So we upload the certificate by hand.

Set-AzureSubscription -SubscriptionName $azuresubname -SubscriptionId $azuresubid -Certificate $getCert

 

Uploading the just created Certificate to Azure.

In the Azure portal go to settings on the bottom and select management Certificates

image

And on the bottom there is an upload option you can select the Certificate and the subscription just make sure this will be the same as in the VMM console

image image

Now that the certificate is uploaded we go back to the VMM console and press finish and in a few seconds the Azure content is loaded in the VMM Console.

and Easy starting and stopping with the RDP is there real handy one step closer a a real hybrid Cloud.

image

 

Happy clustering

Robert Smit

follow me : @clusterMVP

https://robertsmit.wordpress.com

MVP Profile : http://mvp.microsoft.com

Advertisements

One response to “Manage Azure with System Center 2012 R2 Virtual Machine Manager #SCVMM 2012 R2 #UR6

Subscribe to comments with RSS.

  1. Pingback: Add your Azure Subscription v1 only to System Center Virtual Machine manager 2016 #SCVMM #Azure #MSCloud | The Windows Server HA Blog

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

  • Twitter

  • %d bloggers like this: