1
votes

I've just installed the latest Azure PowerShell 1.1 and I am following this blog entry to add reverse DNS to an existing Linux VM that I am running:

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

When I try to run the Set-AzureService or Get-AzureService commands,

eg. Get-AzureService "vmname"

or

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

where my VM is at vmname.cloudapp.net, I get an error like:

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

But I know my VM is there - if I run Get-AzureRmResource I see:

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

I'm guessing something has changed since that documentation came out. Anyone know?

1

1 Answers

0
votes

Solved - looks like my VM was associated with my Visual Studio Premium account, but I had set my default subscription to Visual Studio Enterprise. After switching the default subscription, the Get/Set-AzureService commands worked perfectly.

For additional details, see my other related question

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