我刚刚安装了最新的Azure PowerShell 1.1,我正在关注此博客条目,将反向DNS添加到我正在运行的现有Linux VM中:
https://azure.microsoft.com/en-us/blog/announcing-reverse-dns-for-azure-cloud-services/
当我尝试运行Set-AzureService
或Get-AzureService
命令时,
例如。 Get-AzureService "vmname"
或
Set-AzureService –ServiceName “vmname” –Description “VM with Reverse DNS” –ReverseDnsFqdn “vmname.cloudapp.net.”
我的VM位于vmname.cloudapp.net,我收到如下错误:
“Get-AzureService:ResourceNotFound:托管服务没有 存在。“
但我知道我的VM就在那里 - 如果我运行Get-AzureRmResource
,我会看到:
名称:portalXXXXXXXXXXXXXXXXX ResourceId: /订阅/ XXXXXXXXXXXX-XXXXXXXX-XXXXXXXXXXXX / resourceGroups /默认-存储-WestUS /提供商 /Microsoft.ClassicStorage/storageAccounts/portalXXXXXXXXXXXXXXXXX ResourceName:portalXXXXXXXXXXXXXXXXX ResourceType: Microsoft.ClassicStorage / storageAccounts ResourceGroupName: Default-Storage-WestUS位置:westus SubscriptionId: XXXXXXXXXXXX-XXXXXXXX-XXXXXXXXXXXX
名称:vmname ResourceId: /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/vmname/providers/Microsoft.Classi cCompute / domainNames / vmname ResourceName:vmname ResourceType:Microsoft.ClassicCompute / domainNames ResourceGroupName:vmname位置:westus SubscriptionId
:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX名称:vmname ResourceId: /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/vmname/providers/Microsoft.Classi cCompute / virtualMachines / vmname ResourceName:vmname ResourceType:Microsoft.ClassicCompute / virtualMachines ResourceGroupName:vmname位置:westus SubscriptionId
:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
我猜这些文件出来之后发生了一些变化。有人知道吗?
答案 0 :(得分:0)
已解决 - 看起来我的VM与我的Visual Studio Premium帐户相关联,但我已将默认订阅设置为Visual Studio Enterprise。切换默认订阅后,Get / Set-AzureService命令完美运行。
有关其他详细信息,请参阅我的其他相关问题
Azure powershell Select-AzureSubscription - error: the subscription name doesn't exist