2016-01-23 43 views
1

我刚刚安装了最新的Azure PowerShell 1.1,我正在关注此博客条目以将反向DNS添加到现有的Linux VM运行:Azure PowerShell Set-AzureService/Get-AzureService -error:托管服务不存在

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

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

如。 Get-AzureService "vmname"

Set-AzureService –ServiceName “vmname” –Description “VM with Reverse DNS” –ReverseDnsFqdn “vmname.cloudapp.net.”

在我的VM是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

我猜小号自文档发布以来,事情发生了变化。有人知道吗?

回答