Centralized Comprehensive View of all VM Endpoints in a Cloud Service

July 29, 2014

no comments

This week I was asked if there is a way in the Azure management portal to view all the VM endpoints that belong to a specific cloud service.

First of all, in case you’re not familiar with the Azure terminology:

– VM Endpoint. The public ports (accessible through the Internet) of an Azure VM are known as endpoints. Each endpoint has a public port and a private port (the real port the VM is listening to).

– Cloud Service. When talking about VMs, the cloud service is the mechanism Azure uses to group several VMs under a single DNS address.

– VM Endpoints in a Cloud Service. This is a list of all the public ports accessible for the DNS address. Those ports can be either load-balanced (port that is load-balanced among couple of VMs in the cloud service) or an instance-port (port that is directed to a specific VM in the cloud service).

If you try open the dashboard of such a cloud service, you will see something like this:

image

As you can see, the list shows the endpoints for each VM in the cloud service. That is a concise view, not a comprehensive view. To get information such as the private port of each public port, and whether the port is using TCP or UDP, you will need to go to each individual VM in the cloud service, and open its Endpoint tab. This of course is not what the user wanted – they wanted a centralized view.

So how to do it in the portal? It can’t be done.

So how can we do it? With PowerShell of course (with the Azure Cmdlets).

But how can we see it graphically? With the Out-GridView Cmdlet.

So to make a long story short, here’s the command:

Get-AzureVm -ServiceName $serviceName | select Name -ExpandProperty VM | select Name -ExpandProperty ConfigurationSets | select @{Name=”VmName”;Expression={$_.”Name”}} -ExpandProperty InputEndpoints | Out-GridView

(don’t forget to set the $serviceName variable to the name of your cloud service).

And this was the result:

image

Enjoy.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*