1

我使用以下 powershell cmdlet 创建了一个保留 IP 地址:

New-AzureReservedIP “dmz-live” –Label “be-dmz-ip” –Location “North Europe”

我之前创建了一个名为“be-dmz”的虚拟机和一个云服务“be-dmz”,我将其删除并保留了附加磁盘。

然后我尝试重新创建 VM 并为其分配静态保留 ip,如下所示:

New-AzureVMConfig -Name "be-dmz" -InstanceSize "Standard_D11" –ImageName "be-dmz-be-dmz-0-201508101027470734" | New-AzureVM -ServiceName "be-dmz" –ReservedIPName " be-dmz-ip " -Location "North Europe”

但我收到错误:

The reserved IP dmz-live does not exist

如果我使用 powershell cmdlet 显示保留的 IP,如下所示:

ReservedIPName: dmz-live
Address: xxx.xxx.xxx.xxx
Label: be-dmz-ip
Location: North Europe
4

1 回答 1

0

比较晚:

您已命名保留的 ipdmz-live并将其标记be-dmz-ip

链接时,您需要使用名称而不是标签(以及删除空格):

New-AzureVMConfig -Name "be-dmz" -InstanceSize "Standard_D11" 
                  –ImageName "be-dmz-be-dmz-0-201508101027470734" | 
                  New-AzureVM -ServiceName "be-dmz" 
                  –ReservedIPName "dmz-live" -Location "North Europe”
于 2016-06-12T15:35:56.590 回答