Having 2 VMs with the same name in 2 different clusters #1621

Closed
opened 2025-12-29 16:33:33 +01:00 by adam · 6 comments
Owner

Originally created by @mabazyar on GitHub (Mar 9, 2018).

Issue type

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

Environment

  • Python version: 3.5.2
  • NetBox version: v2.3.1

Description

A possibility which should be in place is that representing 2 VMs with identical name in two different clusters.

  1. Go to Virtualization > Virtual Machines
  2. Create a VM as "test" in cluser "testcluster1"
  3. repeat step1
  4. Create a VM as "test" in cluster "testcluster2"

It returns:

Virtual machine with this Name already exists.
Originally created by @mabazyar on GitHub (Mar 9, 2018). ### Issue type [] Feature request [X] Bug report [ ] Documentation ### Environment * Python version: 3.5.2 * NetBox version: v2.3.1 ### Description A possibility which should be in place is that representing 2 VMs with identical name in two different clusters. 1) Go to Virtualization > Virtual Machines 2) Create a VM as "test" in cluser "testcluster1" 3) repeat step1 4) Create a VM as "test" in cluster "testcluster2" It returns: ``` Virtual machine with this Name already exists. ```
adam closed this issue 2025-12-29 16:33:33 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 12, 2018):

Like devices, each virtual machine must have a unique name. Removing this constraint would make it very difficult to unique identify virtual machines with the same name from one another. For example, importing IP addresses to be assigned to virtual machines would require specifying the name of each cluster as well as the VM itself.

Edit: And if #1943 is implemented, it will require specifying both the site and cluster name in addition to the VM name.

@jeremystretch commented on GitHub (Mar 12, 2018): Like devices, each virtual machine must have a unique name. Removing this constraint would make it very difficult to unique identify virtual machines with the same name from one another. For example, importing IP addresses to be assigned to virtual machines would require specifying the name of each cluster as well as the VM itself. Edit: And if #1943 is implemented, it will require specifying both the site _and_ cluster name in addition to the VM name.
Author
Owner

@mabazyar commented on GitHub (Mar 15, 2018):

Of use-cases is having a failover cluster contains idetntical VM instances to take over the traffic as needed. It can not be represented in Netbox.

@mabazyar commented on GitHub (Mar 15, 2018): Of use-cases is having a failover cluster contains idetntical VM instances to take over the traffic as needed. It can not be represented in Netbox.
Author
Owner

@pm17788 commented on GitHub (Jun 12, 2018):

I'd like to second that - we run into this issue as well. Currently, I have to cheat a bit and append various things to the name of the VM to reconcile this, but that's clearly not a clean solution.

@pm17788 commented on GitHub (Jun 12, 2018): I'd like to second that - we run into this issue as well. Currently, I have to cheat a bit and append various things to the name of the VM to reconcile this, but that's clearly not a clean solution.
Author
Owner

@mhmaw commented on GitHub (Sep 13, 2018):

We would like this functionality changed aswell. Both our hypervisor platforms allows duplicate names, as these are just labels. VMs are identified by GUIDs instead.
And when there's customer selfservice access to these environments, the chance for multiple VMs called fx. SQL01 increases.

@mhmaw commented on GitHub (Sep 13, 2018): We would like this functionality changed aswell. Both our hypervisor platforms allows duplicate names, as these are just labels. VMs are identified by GUIDs instead. And when there's customer selfservice access to these environments, the chance for multiple VMs called fx. SQL01 increases.
Author
Owner

@Grokzen commented on GitHub (Dec 18, 2018):

We solved this issue internally by adding 2 custom fields, hostname and dnsname. Then we use the name field as more of an asset-tag with the unique name constraint and we can set the same hostname and dnsname for different machines that belongs to different cluters.

@Grokzen commented on GitHub (Dec 18, 2018): We solved this issue internally by adding 2 custom fields, hostname and dnsname. Then we use the name field as more of an asset-tag with the unique name constraint and we can set the same hostname and dnsname for different machines that belongs to different cluters.
Author
Owner

@jeremystretch commented on GitHub (May 3, 2019):

I'm going to wrap this into #2669, since I think it makes sense to ultimately ensure we have a consistent approach to both devices and VMs. I believe we're leaning toward simply removing the uniqueness constraints on device and VM names.

@jeremystretch commented on GitHub (May 3, 2019): I'm going to wrap this into #2669, since I think it makes sense to ultimately ensure we have a consistent approach to both devices and VMs. I believe we're leaning toward simply removing the uniqueness constraints on device and VM names.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1621