Checking type of vm in activity log

colchon753 41 Reputation points
2021-11-10T13:45:17.967+00:00

Hello,
I'm trying to check the type of virtual machines that I deployed using the activity log. I've found the related logs ('Create or Update Virtual Machine' and 'Delete Virtual Machine') for that vm. However, it's not easy to extract its type from the logs (summary and JSON) as far as I can see. Is this info available in any log or is there any other way to find this out? Thanks.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
0 comments No comments
{count} votes

Answer accepted by question author
  1. SRIJIT-BOSE-MSFT 4,346 Reputation points Microsoft Employee Moderator
    2021-11-11T06:07:23.187+00:00

    @colchon753 , thank you for your question. You can try following these steps:

    1. Navigate to the resource group where the Virtual Machines were created in the Azure Portal.
    2. Select Activity Logs from the left-hand menu and set filters according to your needs. 148481-image.png
    3. Click on the operation you are interested in and select the Change history (Preview) tab on the overlay that appears. Click on the <deleted resource> link from the list of entries. 148458-image.png
    4. In the Old Value section you should be able to see the deleted resource's details as a JSON object. 148425-oldval.png

    Note: Currently changes are covered for upto 14 days.

    ----
    Hope this helps.

    Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.


1 additional answer

Sort by: Most helpful
  1. Alan Kinane 17,356 Reputation points MVP Volunteer Moderator
    2021-11-10T17:35:04.187+00:00

    Hi, you could use the Azure Resource Query service to find out this information. If you search for Azure resource graph explorer then you should see some same queries pop up. Choose the query titled List virtual machines with their network interface and public IP and run the query.

    This will show all VMs including the VM size which I think is what you are looking for. The query can be modified to extract the information that you require.

    Here's the guide on how to use it:
    https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.