Allow the assignment of virtual machines directly to sites #4238

Closed
opened 2025-12-29 18:34:11 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Nov 3, 2020).

Environment

  • Python version: 3.6.9
  • NetBox version: 2.9.8

Proposed Functionality

Allow the creation of a virtual machine without designating a cluster. Allow virtual machines to be assigned to sites directly, with the optional election of assignment to a cluster within that site. This would largely mirror the ability to assign a device to a site and, optionally, to a rack within that site.

Use Case

Allows for simplified modeling of virtual machines by obviating the need to define clusters, and allows for optimized filtering of virtual machines by site.

Database Changes

  • Add a site ForeignKey field to the VirtualMachine model
  • Make the cluster field optional
  • Extend model validation to prohibit the assignment of a VM to a cluster outside its site

External Dependencies

None

Originally created by @jeremystretch on GitHub (Nov 3, 2020). ### Environment * Python version: 3.6.9 * NetBox version: 2.9.8 ### Proposed Functionality Allow the creation of a virtual machine without designating a cluster. Allow virtual machines to be assigned to sites directly, with the optional election of assignment to a cluster within that site. This would largely mirror the ability to assign a device to a site and, optionally, to a rack within that site. ### Use Case Allows for simplified modeling of virtual machines by obviating the need to define clusters, and allows for optimized filtering of virtual machines by site. ### Database Changes * Add a `site` ForeignKey field to the VirtualMachine model * Make the `cluster` field optional * Extend model validation to prohibit the assignment of a VM to a cluster outside its site ### External Dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 18:34:11 +01:00
adam closed this issue 2025-12-29 18:34:11 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4238