0

如标题所述,我无法为我的云服务分配 IP。

我关注了很多论坛和 StackOverflow 文章/帖子,但我仍然有这个问题。

当我尝试跑步时

Set-AzureReservedIPAssociation -ReservedIPName primosguardo365reservedip -ServiceName primosguardo365

我收到这个错误

Set-AzureReservedIPAssociation : ResourceNotFound: No deployments were found.
At line:1 char:1
+ Set-AzureReservedIPAssociation -ReservedIPName primosguardo365reserve ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureReservedIPAssociation], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.SetAzureReservedIPAssociationCmdlet

但是如果我尝试使用相同的名称获取资源

λ  Get-AzureReservedIP

ReservedIPName       : Group Primosguardo365 primosguardo365reservedip
Address              : **.**.**.**
Id                   : ******************
Label                :
Location             : West Europe
State                : Created
InUse                : False
ServiceName          :
DeploymentName       :
VirtualIPName        :
OperationDescription : Get-AzureReservedIP
OperationId          : ************************
OperationStatus      : Succeeded


λ  Get-AzureService "primosguardo365"

ServiceName             : primosguardo365
Url                     : https://management.core.windows.net.................
Label                   : primosguardo365
Description             : primosguardo365
Location                : West Europe
AffinityGroup           :
Status                  : Created
ExtendedProperties      : {[ResourceGroup, Primosguardo365], [ResourceLocation, westeurope], [ProvisioningSource,
                          AzureResourceManager]}
DateModified            : 28/03/2017 12:13:20
DateCreated             : 28/03/2017 11:26:03
ReverseDnsFqdn          :
WebWorkerRoleSizes      : {}
VirtualMachineRoleSizes : {}
OperationDescription    : Get-AzureService
OperationId             : ****************************
OperationStatus         : Succeeded

有人有什么建议吗?

提前致谢!

编辑:

VIP 只能分配给已部署的PRODUCTION实例。

但这没用,因为 CloudServices 已经有静态 IP。

谢谢大家!

4

1 回答 1

1

在我的测试中,我重现了您的错误,我只是通过新门户创建了一个云服务,然后将一个保留的 IP 地址关联到它,错误发生了。

PS C:\Users> Set-AzureReservedIPAssociation -ReservedIPName my9 -ServiceName "jasontest323"
Set-AzureReservedIPAssociation : ResourceNotFound: No deployments were found.
At line:1 char:1
+ Set-AzureReservedIPAssociation -ReservedIPName my9 -ServiceName "jaso ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureReservedIPAssociation], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.SetAzureReservedIPAssociationCmdlet

之后,我创建另一个云服务和一个虚拟机,然后为这个云服务分配一个保留的 IP 地址,它就可以工作了。

PS C:\Users> Set-AzureReservedIPAssociation -ReservedIPName my9 -ServiceName "jasonvm3659"

OperationDescription           OperationId                          OperationStatus
--------------------           -----------                          ---------------
Set-AzureReservedIPAssociation 05ccff35-5642-7cc6-9c6b-b5dfe2d1603d Succeeded

所以,我检查了两个云服务的状态,我发现当生产运行时,命令会起作用。 在此处输入图像描述

在此处输入图像描述

我们可以使用 PowerShell 来检查部署:

PS C:\Users> Get-AzureDeployment -ServiceName jasontest323
Get-AzureDeployment : ResourceNotFound: No deployments were found.
OperationID : '27da300bc3c67a5bbdbc954c1c19e3e7'
At line:1 char:1
+ Get-AzureDeployment -ServiceName jasontest323
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureDeployment], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices.GetAzureDeploymentCommand

PS C:\Users> Get-AzureDeployment -ServiceName jasonvm3659


SdkVersion                :
RollbackAllowed           : False
Slot                      : Production
Name                      : jasonvm3659
DeploymentName            : jasonvm3659
Url                       : http://jasonvm3659.cloudapp.net/
Status                    : Running
CurrentUpgradeDomain      : 0
CurrentUpgradeDomainState :
UpgradeType               :
RoleInstanceList          : {jasonvm}
Configuration             : <ServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
                              <Role name="jasonvm">
                                <Instances count="1" />
                              </Role>
                            </ServiceConfiguration>
DeploymentId              : fc627acb502a4a979b08c42f69cccf72
Label                     : jasonvm3659
VNetName                  : Group jasontest321 jasontest321
DnsSettings               :
OSVersion                 :
RolesConfiguration        : {[jasonvm, Microsoft.WindowsAzure.Commands.ServiceManagement.Model.RoleConfiguration]}
VirtualIPs                : {jasonvm3659ContractContract}
ReservedIPName            : my9
CreatedTime               : 3/29/2017 1:10:28 PM
LastModifiedTime          : 3/29/2017 1:27:42 PM
Locked                    : False
InternalLoadBalancerName  :
LoadBalancers             : {}
ExtensionConfiguration    :
ServiceName               : jasonvm3659
OperationDescription      : Get-AzureDeployment
OperationId               : f8b8xxxx-xxxx-xxxx-xxxx-xxxx2cdc1daa
OperationStatus           : Succeeded

保留 IP 适用于经典模块,仅用于通过 VIP 公开的VM云服务实例角色。

所以我们应该先用powershell检查部署Get-AzureDeployment -ServiceName primosguardo365

于 2017-03-29T05:49:01.063 回答