Ability to create Virtual Machine on single node, not cluster #4406

Closed
opened 2025-12-29 18:35:43 +01:00 by adam · 5 comments
Owner

Originally created by @xcdr on GitHub (Dec 24, 2020).

Environment

  • Python version: 3.8.6
  • NetBox version: v2.10.2

Proposed Functionality

Ability to create Virtual Machine on single node, not cluster

Use Case

Very often VM are created on single nodes (vmware, xen, kvm).

We have mixed environment of clusters and separated single nodes that always should be single nodes.

Database Changes

Add device_id to virtual machine model and conditional requirements of cluster_id or device_id.

Device should have boolean field such as "vm_support".

Originally created by @xcdr on GitHub (Dec 24, 2020). ### Environment * Python version: 3.8.6 * NetBox version: v2.10.2 ### Proposed Functionality Ability to create Virtual Machine on single node, not cluster ### Use Case Very often VM are created on single nodes (vmware, xen, kvm). We have mixed environment of clusters and separated single nodes that always should be single nodes. ### Database Changes Add device_id to virtual machine model and conditional requirements of cluster_id or device_id. Device should have boolean field such as "vm_support".
adam closed this issue 2025-12-29 18:35:43 +01:00
Author
Owner

@candlerb commented on GitHub (Jan 4, 2021):

What I do is to create a one-node cluster for each VM host, with name equal to the underlying device.

This does the same as your proposed boolean field "vm_support", except that the cluster object also documents the virtualization type (e.g. vmware, xen, kvm). So if single-node clusters were to be added, adding a nullable "virtualization_type" field would be better.

However this data change doesn't actually enhance the capabilities of Netbox - instead it adds a second way to model something which can already be modelled. Therefore I'd say it increases complexity for little gain.

@candlerb commented on GitHub (Jan 4, 2021): What I do is to create a one-node cluster for each VM host, with name equal to the underlying device. This does the same as your proposed boolean field "vm_support", except that the cluster object also documents the virtualization type (e.g. vmware, xen, kvm). So if single-node clusters were to be added, adding a nullable "virtualization_type" field would be better. However this data change doesn't actually enhance the capabilities of Netbox - instead it adds a second way to model something which can already be modelled. Therefore I'd say it increases complexity for little gain.
Author
Owner

@xcdr commented on GitHub (Jan 5, 2021):

Proposed workaround does not reflect reality, however it works.

Unfortunately, there are many ways to run VMs where configuring them as a cluster is a big abuse.

For example, FreeNAS/TrueNAS node with one or two VM, KVM hypervisor on Cisco Router etc.

It would be better to reflect reality as it is!

@xcdr commented on GitHub (Jan 5, 2021): Proposed workaround does not reflect reality, however it works. Unfortunately, there are many ways to run VMs where configuring them as a cluster is a big abuse. For example, FreeNAS/TrueNAS node with one or two VM, KVM hypervisor on Cisco Router etc. It would be better to reflect reality as it is!
Author
Owner

@jeremystretch commented on GitHub (Jan 5, 2021):

This was discussed at length when support for virtual machines was initially implemented, and the consensus was to always map a VM to a cluster, even when only one physical device exists, for consistency.

@jeremystretch commented on GitHub (Jan 5, 2021): This was discussed at length when support for virtual machines was initially implemented, and the consensus was to always map a VM to a cluster, even when only one physical device exists, for consistency.
Author
Owner

@xcdr commented on GitHub (Jan 15, 2021):

I understand, but still think it's a stretch of reality and confusing for people who want quick overview of infrastructure.

This sounds like: we have that many clusters in our infra? Oh no, these are not clusters but described as clusters :-)

@xcdr commented on GitHub (Jan 15, 2021): I understand, but still think it's a stretch of reality and confusing for people who want quick overview of infrastructure. This sounds like: we have that many clusters in our infra? Oh no, these are not clusters but described as clusters :-)
Author
Owner

@jeremystretch commented on GitHub (Jan 19, 2021):

They are single-host clusters, which is perfectly valid. It also makes adding future much easier. I'm sorry, but this has been considered settled for a long time.

@jeremystretch commented on GitHub (Jan 19, 2021): They are single-host clusters, which is perfectly valid. It also makes adding future _much_ easier. I'm sorry, but this has been considered settled for a long time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4406