【问题标题】:Unable to find "ServiceName" on Azure Free Trial在 Azure 免费试用版中找不到“ServiceName”
【发布时间】:2016-05-09 15:26:22
【问题描述】:

我目前正在进行 Azure 免费试用并尝试设置反向 DNS PTR 记录。 我已经通过证书登录,使用:Get-AzurePublishSettingsFile 下载了文件。我还使用Import-AzurePublishSettingsFile C:certs<SubscriptionName>-credentials.publishsettings 导入了文件。

但是,当我运行 Get-AzureService | fl ServiceName 时,我没有列出任何服务。

当我尝试运行Set-AzureService –ServiceName "my hostname" –Description "Reverse DNS" –ReverseDnsFqdn "mail.my domain."

我得到托管服务名称不存在。

免费试用是否存在不允许设置的限制?

【问题讨论】:

    标签: azure


    【解决方案1】:

    导入后...添加

    Select-AzureSubscription -SubscriptionName "nameofyoursubscription"
    

    仅导入您的订阅发布设置文件不会选择您需要的订阅。

    UPD:我无法重现该问题。请尝试执行:

    $subscr = "subscriptionid"
    $csname = "mytestcloudservice14"
    Select-AzureSubscription -SubscriptionId $subscr –Current
    New-AzureService -ServiceName $csname -Location "Central US" -Label "mytestcloudservice"
    Set-AzureService –ServiceName $csname –Description "Reverse DNS" –ReverseDnsFqdn "mytestcloudservice14.cloudapp.net."
    Get-AzureService -ServiceName $csname
    

    我刚刚创建了试用帐户并进行了测试。

    【讨论】:

    • 抱歉,忘了补充说我也用过。当我运行该命令时,它只是返回到命令提示符。
    • 也试过重新运行“Get-AzureService | fl ServiceName”,也恢复正常提示。
    • 如果我然后运行“Set-AzureService –ServiceName“我的主机名” –描述“反向 DNS” –ReverseDnsFqdn“mail.my 域。”我仍然收到相同的错误消息“托管服务名称确实不存在”。
    • 是的,它应该让您返回到 Azure Powershell 命令提示符,但没有输出。您是否可以尝试使用 Add-AzureAccount 而不是发布设置文件并使用您的管理员凭据登录?
    • 谢谢。试过了,但 Get_AzureService 仍然没有返回任何东西,只是回到提示符
    【解决方案2】:

    正如Get-AzureService 的描述所说,它返回一个包含有关当前订阅的云服务信息的对象,这意味着它仅对Azure 云服务 进行操作,Set-AzureService 为好。

    因此,如果您没有部署任何云服务,Get-AzureService 肯定不会列出任何内容,如果您的“我的主机名”不是云服务,难怪您会收到错误消息 The hosted service does not exist.

    此外,Azure 网站不支持反向 DNS。 Azure PaaS 角色和 IaaS 虚拟机支持反向 DNS。

    【讨论】:

    • 为我的无知道歉,Windows VM 不是云服务吗?
    • 没有,只有classic portal中左侧导航云服务下的这些。
    • 所以当我在新的虚拟机服务下的新门户portal.azure.com 中创建我的时,这不支持反向DNS?
    • 要在 VM 上配置反向 DNS,您需要在公共 IP 地址资源上设置反向 DNS 属性,该属性可以通过 Azure CLI cmdlet azure network public-ip set -g <resource group> -n <public IP> -f <reverse fqdn> 实现
    • 通过samrobertson.co.uk/blog/2016/02/…的Powershell配置
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    • 1970-01-01
    • 2012-09-01
    • 2017-07-14
    • 2016-10-29
    • 2020-08-03
    相关资源
    最近更新 更多