gpt4 book ai didi

powershell - Azure PowerShell 设置-AzureService/获取-AzureService -错误 : the hosted service does not exist

转载 作者:行者123 更新时间:2023-12-03 04:32:18 25 4
gpt4 key购买 nike

我刚刚安装了最新的 Azure PowerShell 1.1,并且正在按照此博客条目将反向 DNS 添加到我正在运行的现有 Linux VM:

https://azure.microsoft.com/en-us/blog/announcing-reverse-dns-for-azure-cloud-services/

当我尝试运行 Set-AzureServiceGet-AzureService 命令时,

例如。 获取-AzureService“vmname”

Set-AzureService –ServiceName“vmname” –描述“具有反向 DNS 的虚拟机” –ReverseDnsFqdn“vmname.cloudapp.net”。

我的虚拟机位于 vmname.cloudapp.net,我收到如下错误:

"Get-AzureService : ResourceNotFound: The hosted service does not exist."

但我知道我的虚拟机在那里 - 如果我运行 Get-AzureRmResource 我会看到:

Name : portalXXXXXXXXXXXXXXXXX ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/Default-Storage-WestUS/providers /Microsoft.ClassicStorage/storageAccounts/portalXXXXXXXXXXXXXXXXX ResourceName : portalXXXXXXXXXXXXXXXXX ResourceType : Microsoft.ClassicStorage/storageAccounts ResourceGroupName : Default-Storage-WestUS Location : westus SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Name : vmname ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/vmname/providers/Microsoft.Classi cCompute/domainNames/vmname ResourceName : vmname ResourceType : Microsoft.ClassicCompute/domainNames ResourceGroupName : vmname Location : westus SubscriptionId
: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Name : vmname ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/vmname/providers/Microsoft.Classi cCompute/virtualMachines/vmname ResourceName : vmname ResourceType : Microsoft.ClassicCompute/virtualMachines ResourceGroupName : vmname Location : westus SubscriptionId
: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

我猜自从该文档发布以来,有些事情已经发生了变化。有人知道吗?

最佳答案

已解决 - 看起来我的 VM 与我的 Visual Studio Premium 帐户关联,但我已将默认订阅设置为 Visual Studio Enterprise。切换默认订阅后,Get/Set-AzureService 命令完美运行。

有关更多详细信息,请参阅我的其他相关问题

Azure powershell Select-AzureSubscription - error: the subscription name doesn't exist

关于powershell - Azure PowerShell 设置-AzureService/获取-AzureService -错误 : the hosted service does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34967419/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com