Windows Azure:如何检查服务的虚拟IP



我具有执行Web刮擦的工作角色。我需要确定在Azure部署时起作用的IP。我该怎么做?

如果您需要从Windows Azure Management Portal获得的公共VIP地址。它在选定的云服务的仪表板上(右侧约一半)。

您可以使用RoleInstanceInstanceEndpoints属性...您可以通过使用RoleEnvironment类获得所有角色实例,然后找到您感兴趣的角色。

roolinstance.instanceendpoints属性 - 有一个样本显示所有这些。

使用Azure PowerShell您可以这样使用 -

Get-AzureRole -ServiceName "abc" -Slot "production" -InstanceDetails | select {$_.InstanceEndpoints[0].VIP }