Create or extend functional roles for virtual machines #1230

Closed
opened 2025-12-29 16:30:24 +01:00 by adam · 4 comments
Owner

Originally created by @candlerb on GitHub (Sep 15, 2017).

Issue type

[X] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: v2.2-beta1

Description

I would like Virtual Machines to have a "Role", just like Devices. They can be taken from the same set of Device Roles.

Use case:

  • Being able to tag each VM that its primary role is "Database", "Web server", "Storage server", "Firewall" etc
Originally created by @candlerb on GitHub (Sep 15, 2017). ### Issue type [X] Feature request <!-- Requesting the implementation of a new feature --> [ ] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: v2.2-beta1 ### Description I would like Virtual Machines to have a "Role", just like Devices. They can be taken from the same set of Device Roles. Use case: * Being able to tag each VM that its primary role is "Database", "Web server", "Storage server", "Firewall" etc
adam added the type: feature label 2025-12-29 16:30:24 +01:00
adam closed this issue 2025-12-29 16:30:24 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 15, 2017):

Does it make sense to use the same set of roles for VMs as for devices though? You wouldn't assign a VM the role of PDU, NAS, console server, etc.

We could either create a separate set of roles only for VMs, or we could extend the existing role model to include a boolean field indicating whether it's applicable for VMs.

@jeremystretch commented on GitHub (Sep 15, 2017): Does it make sense to use the same set of roles for VMs as for devices though? You wouldn't assign a VM the role of PDU, NAS, console server, etc. We could either create a separate set of roles only for VMs, or we could extend the existing role model to include a boolean field indicating whether it's applicable for VMs.
Author
Owner

@lampwins commented on GitHub (Sep 15, 2017):

I like the boolean option on the existing model and I think it should also be extended to the platform model as the same argument could be made there.

@lampwins commented on GitHub (Sep 15, 2017): I like the boolean option on the existing model and I think it should also be extended to the platform model as the same argument could be made there.
Author
Owner

@darkstar commented on GitHub (Sep 18, 2017):

At least a NAS could very well be a VM (some hyperconverged solutions use VMs to serve CIFS/NFS to the outside world, and there are clustered and virtualized storage systems that provide multi-tenant capable isolated virtual NAS/SAN instances)

@darkstar commented on GitHub (Sep 18, 2017): At least a NAS could very well be a VM (some hyperconverged solutions use VMs to serve CIFS/NFS to the outside world, and there are clustered and virtualized storage systems that provide multi-tenant capable isolated virtual NAS/SAN instances)
Author
Owner

@jeremystretch commented on GitHub (Sep 29, 2017):

Implemented the base relationship in 6243fbf. Will experiment with adding per-model flags to the DeviceRole model shortly.

@jeremystretch commented on GitHub (Sep 29, 2017): Implemented the base relationship in 6243fbf. Will experiment with adding per-model flags to the DeviceRole model shortly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1230