Linked virtual devices not counted in Locations #7154

Closed
opened 2025-12-29 20:19:52 +01:00 by adam · 4 comments
Owner

Originally created by @danie-dejager on GitHub (Oct 25, 2022).

NetBox version

v3.3.5

Python version

3.8

Steps to Reproduce

I created a Custom Field to be able to assign Locations to Virtual devices.
image
When I view the Virtual Device I get Location under Custom Fields
image
I assign the Virtual Device to a Location
image

When I go to Locations and filter by the Location, I used to assign the Virtual Device to it is not visibly assigned
image
The 5 devices counted are 5 Non-Racked devices. The "Devices" count on the Locations pages only counts physical devices inside the location and not Virtual devices where I linked the Location to the Device.

I would've expected to see Device assigned to a Location.

Expected Behavior

Locations should count the Virtual and Physical devices assigned to the Location.

Observed Behavior

Only Physical devices are counted towards the device count in Locations.

Originally created by @danie-dejager on GitHub (Oct 25, 2022). ### NetBox version v3.3.5 ### Python version 3.8 ### Steps to Reproduce I created a Custom Field to be able to assign Locations to Virtual devices. ![image](https://user-images.githubusercontent.com/13314239/197787488-c591e9bc-1dc8-4261-811c-62732c9596c1.png) When I view the Virtual Device I get Location under Custom Fields ![image](https://user-images.githubusercontent.com/13314239/197787728-dd8b34b4-420a-4e3f-8edd-55d2f4c922cc.png) I assign the Virtual Device to a Location ![image](https://user-images.githubusercontent.com/13314239/197788342-b4d49dd1-367a-4923-96a4-6492d0a9aa35.png) When I go to Locations and filter by the Location, I used to assign the Virtual Device to it is not visibly assigned ![image](https://user-images.githubusercontent.com/13314239/197788641-426489bf-8fc1-45d0-94d5-283da97fa963.png) The 5 devices counted are 5 Non-Racked devices. The "Devices" count on the Locations pages only counts physical devices inside the location and not Virtual devices where I linked the Location to the Device. I would've expected to see Device assigned to a Location. ### Expected Behavior Locations should count the Virtual and Physical devices assigned to the Location. ### Observed Behavior Only Physical devices are counted towards the device count in Locations.
adam closed this issue 2025-12-29 20:19:53 +01:00
Author
Owner

@danie-dejager commented on GitHub (Oct 25, 2022):

Custom Field added:
image

This correctly gives me the available Locations to choose from and assign to the Virtual Device.

@danie-dejager commented on GitHub (Oct 25, 2022): Custom Field added: ![image](https://user-images.githubusercontent.com/13314239/197762111-e0955680-566b-447a-80f7-bd938f8b560c.png) This correctly gives me the available Locations to choose from and assign to the Virtual Device.
Author
Owner

@jeremystretch commented on GitHub (Oct 25, 2022):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Oct 25, 2022): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@danie-dejager commented on GitHub (Oct 25, 2022):

@jeremystretch I had the same concerns as I would have to redact the contents from my step list and as it is so easy to replicate, I thought for a second that the problem is self-explanatory. I'll put some time in and expand on the screenshots.

@danie-dejager commented on GitHub (Oct 25, 2022): @jeremystretch I had the same concerns as I would have to redact the contents from my step list and as it is so easy to replicate, I thought for a second that the problem is self-explanatory. I'll put some time in and expand on the screenshots.
Author
Owner

@jeremystretch commented on GitHub (Oct 25, 2022):

This is expected behavior. Virtual machines are not devices, nor would the custom field association be considered when counting assigned devices.

@jeremystretch commented on GitHub (Oct 25, 2022): This is expected behavior. Virtual machines are not devices, nor would the custom field association be considered when counting assigned devices.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7154