我正在尝试将保留的 IP 地址分配给 Azure 上新创建的 VM。我正在执行此处指示的步骤:https ://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-public-ip/
这是我正在做的事情以及它引发的错误:
## Create VM Config with a cloned VHD (no issues here)
$migratedVM = New-AzureVMConfig -Name 'IP-CLONE' -DiskName 'TEST-AgendaCondivisa-2014-05-28.vhd' -InstanceSize 'Small'
## Reserve an IP address
$ReservedIP = New-AzureReservedIP -ReservedIPName "IP-CLONE" -Label "IP-CLONE" -Location "Japan West"
##Create VM
New-AzureVM -ServiceName "IP-CLONE" -Location "West Europe" -VMs $migratedVM -ReservedIPName $ReservedIP
OperationDescription OperationId OperationStatus
-------------------- ----------- ---------------
New-AzureVM 933fe90c-e087-bc26-882d-f5c79148f23e Succeeded
New-AzureVM : BadRequest: The Reserved IP **Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ReservedIPContext does not exist.**
At line:1 char:1
+ New-AzureVM -ServiceName "IP-CLONE" -Location "West Europe" -VMs $migratedVM -Re ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand
不用说,如果我不使用“-reservedipname”开关,一切都会正常工作,并且创建的 VM 不会引发错误。
任何想法?