【问题标题】:Add Reserved IP to existing VM on azure将保留 IP 添加到 Azure 上的现有 VM
【发布时间】:2017-08-31 05:44:17
【问题描述】:

我有资源组“cbp.resourcegroup.neu”,我的保留 IP 和 VM 都在同一个资源组中 我保留的 IP 名称是 CBPIP-Dev-NEU 我的机器 VM 的服务名称是 testmachine,我已将其作为 DNS 名称“testmachine.northeurope.cloudapp.azure.com”的第一部分

当我运行以下命令将保留的 ip 添加到 VM 时

Set-AzureReservedIPAssociation -ReservedIPName Group cbp.resourcegroup.neu 
CBPIP-Dev-NEU -ServiceName portrtestmachine

我收到以下错误。

Set-AzureReservedIPAssociation : Cannot validate argument on parameter 
'Slot'. The argument "CBPIP-Dev-NEU" does not belong to the set 
"Staging,Production" specified by the ValidateSet attribute. Supply an 
argument that is in 
the set and then try the command again.
At line:1 char:76
+ ... ion -ReservedIPName Group cbp.resourcegroup.neu CBPIP-Dev-NEU -Servic 
...
+                                                     ~~~~~~~~~~~~~
+ CategoryInfo          : InvalidData: (:) [Set-AzureReservedIPAssociation], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.SetAzureReservedIPAssociationCmdlet

我的命令中有什么遗漏吗?我使用powershell来做到这一点。

【问题讨论】:

    标签: powershell azure powershell-3.0 azure-powershell


    【解决方案1】:
    Group cbp.resourcegroup.neu CBPIP-Dev-NEU
    

    空格使命令认为您正在使用位置参数,因此“CBPIP-Dev-NEU”被传递给 -Slot 参数,这不是有效值。

    试试这个

    Set-AzureReservedIPAssociation -ReservedIPName "CBPIP-Dev-NEU" -ServiceName "portrtestmachine"
    

    【讨论】:

    • 不,它没有用。这是错误。“Set-AzureReservedIPAssociation:ResourceNotFound:未找到部署。”
    • 这只是意味着您给命令提供了错误的名称,请仔细检查资源的名称,但该命令是正确的。
    【解决方案2】:

    Azure 保留 IP 只能分配给已部署的 PRODUCTION 实例。

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

    我们应该检查云服务,确保没有静态公共 IP 地址。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-17
      • 1970-01-01
      • 2021-05-02
      • 1970-01-01
      相关资源
      最近更新 更多