Azure virtual machine pattern-based discovery

  • Release version: Yokohama
  • Updated March 12, 2026
  • 5 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Azure virtual machine pattern-based discovery

    The Azure virtual machine pattern-based discovery in ServiceNow enables automated detection and population of Azure virtual machines (VMs) and related cloud resources into the CMDB. This pattern works within the Discovery and Service Mapping Patterns application (Yokohama release) and requires meeting Microsoft Azure discovery prerequisites. It helps customers maintain an accurate and up-to-date inventory of Azure VMs and their components without needing to run IP-based discovery.

    Show full answer Show less

    Key Features

    • Pattern-based discovery of Azure VMs: Detects VMs and collects detailed configuration data such as VM name, unique Azure object IDs, power state, memory, CPUs, attached disks and network adapters.
    • Support for scale sets and storage components: Discovers VM scale set instances, managed disks, disk endpoints, NICs, and virtual network interface endpoints, storing these as separate CI classes with unique identifiers.
    • Cloud-specific tables: Supports use of Cloud Image and Cloud Hardware Type tables to avoid excessive records in OS image and hardware type data.
    • Comprehensive CI relationships: Automatically creates relationships between VMs, scale sets, datacenters, storage volumes, network interfaces, resource groups, availability zones, and images to model Azure infrastructure accurately.
    • Tag discovery: Collects Azure tags and stores them as key-value pairs linked to the corresponding VM CI.
    • BYOL license detection: Identifies Windows and Red Hat Enterprise Linux VM license types (Bring Your Own License or License Included) and stores them in the key-value table.
    • Optional exclusion of temporary Azure Databricks VMs: Reduces noise by excluding short-lived Databricks VMs from discovery records.
    • Server CI creation without IP-based discovery: Starting with version 1.31.0, Server CIs can be generated during cloud discovery without running additional IP discovery scans.

    Practical Benefits for ServiceNow Customers

    • Accurate Azure CMDB: Automatically gathers detailed VM and related infrastructure data, enabling better cloud asset visibility and management.
    • Efficient discovery process: Reduces unnecessary data by excluding temporary Azure Databricks VMs and eliminates the need for IP discovery in some cases, saving time and resources.
    • Improved cloud governance: Tag and license information helps in cost tracking, compliance, and license management of Azure VMs.
    • Consistent data model: Use of cloud-specific tables and CI relationships ensures scalable and clean CMDB data for cloud environments.

    Implementation Notes

    • Ensure Microsoft Azure discovery prerequisites are met before use.
    • Update to the latest Discovery and Service Mapping Patterns application from the ServiceNow Store to access the newest features.
    • Consider enabling Cloud OS Image and Cloud Hardware Type classes for efficient management of OS images and hardware types.
    • Leverage optional features like exclusion of temporary Databricks VMs and server CI population without IP discovery based on your environment needs.

    Discovery and Service Mapping Patterns finds Azure virtual machines (VMs) on your cloud environment. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.

    Pattern-based discovery and mapping requirements

    Verify the Microsoft Azure discovery prerequisites
    For more information, see the prerequisites section in Microsoft Azure Cloud components discovery using patterns.
    (Optional) Exclude temporary Azure Databricks VMs
    Starting with Discovery and Service Mapping Patterns version 1.30.2, you can reduce short-lived configuration item (CI) records by excluding temporary Azure Databricks VMs. For more information, see Exclude temporary Azure Databricks virtual machines.
    Create Server CIs during cloud discovery without running IP-based discovery
    Starting with Discovery and Service Mapping Patterns version 1.31.0, you can create Server CIs during cloud discovery without running IP-based discovery. For more information, see Server CI population during cloud discovery.

    Data collected by Discovery during horizontal discovery

    Discovery populates the data in the CMDB when running the Azure - Virtual Machine (LP) pattern.

    Table 1. Virtual Machine Instance [cmdb_ci_vm_instance]
    Field Description
    Name [name] Name of the virtual machine.
    Object ID [object_id] A unique identifier allocated by Azure for this virtual machine.
    VM Instance ID [vm_inst_id] The unique virtual machine identifier assigned by Azure.
    State [state] Power state of the virtual machine.

    Possible values include: On, Off, or Terminated.

    Memory (MB) [memory] Memory capacity of the virtual machine in megabytes (MB).
    CPUs [cpus] Number of virtual CPUs (vCPUs) allocated to the virtual machine.
    Disks [disks] Total number of disks attached to the virtual machine, including OS disk and data disks.
    Disk size [disks_size] Total size of all disks attached to the virtual machine in gigabytes (GB).
    Network adapters [nics] Number of network interface cards (NICs) attached to the virtual machine.
    Install Status [install_status] Install status of the resource. Default value is Installed.
    Table 2. Instance Scale Set [cmdb_ci_instance_scale_set]
    Field Description
    Object ID [object_id] A unique identifier allocated by Azure for this Virtual Machine Scale Set instance.
    Table 3. Storage Volume [cmdb_ci_storage_volume]
    Field Description
    Object ID [object_id] A unique identifier for the managed disk.
    Name [name] Name of the managed disk.
    Table 4. Block Endpoint [cmdb_ci_endpoint_block]
    Field Description
    Object ID [object_id] A unique identifier for the disk endpoint.
    Name [name] Name of the disk endpoint.
    Host [host] The virtual machine object ID to which this disk endpoint is attached.
    Table 5. Cloud Mgmt Network Interface [cmdb_ci_nic]
    Field Description
    Object ID [object_id] A unique identifier for the NIC.
    Primary [primary] Indicates whether this NIC is the primary network interface.
    Table 6. VNIC Endpoint [cmdb_ci_endpoint_vnic]
    Field Description
    Object ID [object_id] A unique identifier for the virtual network interface endpoint.
    Name [name] Name of the virtual network interface endpoint.
    Table 7. Availability Zone [cmdb_ci_availability_zone]
    Field Description
    Object ID [object_id] A unique identifier for the availability zone in the format: region-zone.
    Name [name] A unique identifier for the availability zone in the format: region-zone.
    Install Status [install_status] Install status of the resource. Default value is Installed.
    Table 8. Image [cmdb_ci_os_template] or Cloud Image [cmdb_ci_cloud_os_image]
    Field Description
    Object ID [object_id] A unique identifier for the OS image or custom image.
    Name [name] Name of the OS image or custom image.
    Provider [provider] Cloud provider. The value is set to AZURE.

    This field is only populated in the Cloud Image [cmdb_ci_cloud_os_image] table.

    Note:
    When using the Image [cmdb_ci_os_template] table to store Cloud OS images, you may notice an unusually large number of records. To avoid this issue, you can store the discovered OS images in the Cloud Image [cmdb_ci_cloud_os_image] table. For more information, see Enable Cloud OS Image discovery.
    Table 9. Hardware Type [cmdb_ci_compute_template] or Cloud Hardware Type [cmdb_ci_cloud_hardware_type]
    Field Description
    Object ID [object_id] The VM size Stock Keeping Unit (SKU) name.
    Provider [provider] Cloud provider. The value is set to AZURE.

    This field is only populated in the Cloud Hardware Type [cmdb_ci_cloud_hardware_type] table.

    Note:
    When using the Hardware Type [cmdb_ci_compute_template] table to store the hardware types, you may notice an unusually large number of records. To avoid this issue, you can store the discovered hardware types in the Cloud Hardware Type [cmdb_ci_cloud_hardware_type] table. For more information, see Enable the Cloud Hardware Type class extension.

    CI relationships

    The Azure - Virtual Machine (LP) pattern creates these relationships to support Azure VM discovery.

    CI Relationship CI
    Virtual Machine Instance [cmdb_ci_vm_instance] Managed by::Manages Instance Scale Set [cmdb_ci_instance_scale_set]
    Virtual Machine Instance [cmdb_ci_vm_instance] Hosted on::Hosts Azure Datacenter [cmdb_ci_azure_datacenter]
    Virtual Machine Instance [cmdb_ci_vm_instance] Provisioned From::Provisioned Hardware Type [cmdb_ci_compute_template] or Cloud Hardware Type [cmdb_ci_cloud_hardware_type]
    Storage Volume [cmdb_ci_storage_volume] Hosted on::Hosts Azure Datacenter [cmdb_ci_azure_datacenter]
    Block Endpoint [cmdb_ci_endpoint_block] Implement End Point To::Implement End Point From Storage Volume [cmdb_ci_storage_volume]
    Virtual Machine Instance [cmdb_ci_vm_instance] Use End Point To::Use End Point From Block Endpoint [cmdb_ci_endpoint_block]
    Virtual Machine Instance [cmdb_ci_vm_instance] Use End Point To::Use End Point From VNIC Endpoint [cmdb_ci_endpoint_vnic]
    VNIC Endpoint [cmdb_ci_endpoint_vnic] Implement End Point To::Implement End Point From Cloud Mgmt Network Interface [cmdb_ci_nic]
    Resource Group [cmdb_ci_resource_group] Contains::Contained by Virtual Machine Instance [cmdb_ci_vm_instance]
    Virtual Machine Instance [cmdb_ci_vm_instance] Provisioned From::Provisioned Image [cmdb_ci_os_template] or Cloud Image [cmdb_ci_cloud_os_image]
    Image [cmdb_ci_os_template] or Cloud Image [cmdb_ci_cloud_os_image] Hosted on::Hosts Azure Datacenter [cmdb_ci_azure_datacenter]
    Availability Zone [cmdb_ci_availability_zone] Contains::Contained by Virtual Machine Instance [cmdb_ci_vm_instance]
    Azure Datacenter [cmdb_ci_azure_datacenter] Contains::Contained by Availability Zone [cmdb_ci_availability_zone]
    Availability Set [cmdb_ci_availability_set] Contains::Contained by Virtual Machine Instance [cmdb_ci_vm_instance]
    Key Value [cmdb_key_value] References Virtual Machine Instance [cmdb_ci_vm_instance]

    Azure Tag discovery

    The Azure - Virtual Machine (LP) pattern collects tags and populates them in the Key Value [cmdb_key_value] table.

    Table 10. Key Value [cmdb_key_value]
    Field Description
    Key [key] Tag name.
    Value [value] Tag value.
    Configuration item [configuration_item] References the Virtual Machine Instance [cmdb_ci_vm_instance] table.

    Azure BYOL discovery

    The pattern extension section discovers the following license types for Windows and Red Hat Enterprise Linux (RHEL) VMs:
    • Bring Your Own License (BYOL)
    • License included
    The pattern stores the license type and model in the Key Value [cmdb_key_value] table.
    Note:
    • For Windows VM using a custom image, Discovery populates key values only when the primary OS disk details are available.
    • For RHEL VMs, Discovery populates information only for VMs that use Marketplace images.
    Table 11. Key Value [cmdb_key_value]
    Field Description
    Key [key] The license type key, which is one of the following:
    • Windows_OS_License_Type_automatic
    • RHEL_OS_License_Type_automatic
    Value [value] The license model, which is one of the following:
    • BYOL
    • License Included
    Configuration item [configuration_item] References the Virtual Machine Instance [cmdb_ci_vm_instance] table.