静态IP地址,在Windows Azure中的角色? [英] Static IP address for Role in Windows Azure?

查看:259
本文介绍了静态IP地址,在Windows Azure中的角色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如果在Windows Azure上一个Web或辅助角色获取静态IP地址(可能只在私人测试版)?

Does anyone knows if obtaining a static IP address for a Web or Worker Role on Windows Azure is possible (possibly only in private beta)?

推荐答案

几年后,现在的Azure可以让你的虚拟机和云服务(Web和工人角色)保留的IP地址。然而,这仅仅是从PowerShell中为是时(这将在未来改变,显然)

A few years later, Azure now lets you reserve IP addresses for VMs and cloud services (Web and Worker roles). However, it is only accessible from PowerShell for the time being (this will change in the future, apparently).

前五的静态IP地址都是免费的。要创建一个IP,你需要确保你有最新版本的 Azure的PowerShell命令行接口并也链接到Azure中的PowerShell您的Azure帐户(这篇文章的范围,但并不难)。

The first five static IP addresses are free. To create an IP you will need to make sure you have the latest version of the Azure PowerShell command-line interface and also have your Azure account linked to Azure PowerShell (outside the scope of this post but not hard).

要在PowerShell中一个新的IP:

$ReservedIP = New-AzureReservedIP -ReservedIPName "FirewallIP" -Label "WebAppFirewallIP" -Location "Japan West"

将它与虚拟机相关联:

New-AzureVMConfig -Name "WebAppVM" -InstanceSize Small -ImageName $images[60].ImageName | Add-AzureProvisioningConfig -Windows -AdminUsername cloudguy -Password Abc123 | New-AzureVM -ServiceName "WebApp" –ReservedIPName $ReservedIP -Location "Japan West"

要插入新的IP到Web或工作者角色(如果工作者角色有一个外部端点),添加以下ServiceConfiguration.Cloud.cscfg:

<ServiceConfiguration>
  <NetworkConfiguration>
    <AddressAssignments>
      <ReservedIPs>
        <ReservedIP name="<reserved-ip-name>"/>
      </ReservedIPs>
    </AddressAssignments>
  </NetworkConfiguration>
</ServiceConfiguration>

要随时查看IP:

Get-AzureReservedIP -ReservedIPName "FirewallIP"

来源:文档

这篇关于静态IP地址,在Windows Azure中的角色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆