Skip to main content

Finding only physical devices (exclude virtual firewalls)

  • Oct 29, 2026 9:54 AM UTC
  • 0 replies
  • 4 views
  • Translate All

Mullers
Employee
Forum|alt.badge.img+4

Just a quick note here for future reference:

Out of the box, Inventory+ shows both physical and virtual firewalls.  For example, a Fortigate with five VDOMs will probably result in 6 inventory items.

If you want an inventory of just your hardware devices, you can achieve that by comparing the device.system.physicalName with the device.name.  If there is a difference we can assume that this device is a virtual one running on a physical firewall host.

 

 

 

Here is the code for convenience:

 

/**
* @intent Find only physical devices for inventory
* @description This script checks to see if the device.system.physicalName is
* different to device.name. If there is a difference we can be fairly certain
* that this is a virtual device (e.g. virtual firewall on a physical piece of hardware)
*/

foreach device in network.devices

let isVirtual = isPresent(device.system.physicalName)
&& device.system.physicalName != device.name

select {
Device: device.name,
Type: if isVirtual then "Virtual device" else "Physical device"
}