question

BenediktSnow-6183 avatar image
0 Votes"
BenediktSnow-6183 asked kobulloc-MSFT commented

API returns unknown VM's not set up by user

Using the endpoints

/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines?
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ClassicCompute/virtualMachines?

sometimes there are included unknown VMs in the response, not set up by the user. They all have machine names consisting of 32 characters of a blend of lower case letters and numbers.

Any help on where these are coming from and how to filter these out is appreciated!

azure-virtual-machines
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, @BenediktSnow-6183!

I'll have to double check (and I think I'll have to create some resources manually as this isn't typically called out in documentation) but there are a number of services that might create these types of resources on your behalf with the automatic naming convention that you are describing.

  • Does the resource group give any clues? Often autogenerated resources are either in the resource group with the service responsible or have a resource group created by the service with a similar name (and the resources within would give a good indication of why they were created).

  • Are there any services you are using that might have a compute component? DevTest Labs, Azure Kubernetes, Scale Sets, etc.?


0 Votes 0 ·

Hi. Thanks for the response. Sounds like there's a range of possible scenarios with auto generated resources.

I don't have access to the environment in question. But narrowing down the focus a little bit here, is there a universal way of telling if a resource was auto generated? This is for asset management / reporting purposes.

0 Votes 0 ·
kobulloc-MSFT avatar image kobulloc-MSFT BenediktSnow-6183 ·

@BenediktSnow-6183,

No worries! I was hoping to give you a more concrete example but it looks like there are several variables that make this more difficult to reproduce on demand.

Are you able to view the Activity Log? That would be the first step in identifying what created a resource, moving on then to Log Analytics (my query skills are a bit rusty, the Azure Monitor tag might give you better results). This should get you pointed in the right direction:

178904-image.png

0 Votes 0 ·
image.png (113.3 KiB)
Show more comments

0 Answers