Increase virtual machine "name" field maximum length from 64 characters #4567

Closed
opened 2025-12-29 18:37:44 +01:00 by adam · 6 comments
Owner

Originally created by @jrbeilke on GitHub (Feb 15, 2021).

Environment

  • Python version: 3.6.11
  • NetBox version: 2.10.4

Proposed Functionality

Tracking AWS EC2 instances in Netbox, but AWS allows Name tags up to 256 characters and Netbox only allows 64 characters:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions

Ideally the limit in Netbox would be increased to allow for tracking EC2 instances with their full Name.

Use Case

EC2 instance with name longer than 64 characters cannot be easily tracked in Netbox, and causes conflicts with tracking other EC2 instances/Netbox vms if the 256 character name shortened to 64 characters is not unique.

Database Changes

Increase character limit for Name field on Virtual Machine model to 256 characters

External Dependencies

N/A

Originally created by @jrbeilke on GitHub (Feb 15, 2021). ### Environment * Python version: 3.6.11 * NetBox version: 2.10.4 ### Proposed Functionality Tracking AWS EC2 instances in Netbox, but AWS allows `Name` tags up to 256 characters and Netbox only allows 64 characters: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions Ideally the limit in Netbox would be increased to allow for tracking EC2 instances with their full `Name`. ### Use Case EC2 instance with name longer than 64 characters cannot be easily tracked in Netbox, and causes conflicts with tracking other EC2 instances/Netbox vms if the 256 character name shortened to 64 characters is not unique. ### Database Changes Increase character limit for Name field on Virtual Machine model to 256 characters ### External Dependencies N/A
adam added the type: featurepending closure labels 2025-12-29 18:37:44 +01:00
adam closed this issue 2025-12-29 18:37:44 +01:00
Author
Owner

@Joezeppe commented on GitHub (Apr 2, 2021):

Increasing the max_length parameter of the name field in the Virtual Machine model to 255 looks like a solution to this issue. I

@Joezeppe commented on GitHub (Apr 2, 2021): Increasing the max_length parameter of the name field in the Virtual Machine model to 255 looks like a solution to this issue. I
Author
Owner

@jeremystretch commented on GitHub (Apr 14, 2021):

Is this truly needed? Do you have virtual machines with names greater than 64 characters in length?

This entire sentence is 64 characters long, counting the period. The limit exists today because DNS labels are limited to 63 characters.

@jeremystretch commented on GitHub (Apr 14, 2021): Is this truly needed? Do you have virtual machines with **names** greater than 64 characters in length? This entire sentence is 64 characters long, counting the period. The limit exists today because DNS labels are limited to 63 characters.
Author
Owner

@Joezeppe commented on GitHub (Apr 15, 2021):

If there are virtual machines with names greater than 64, I have already changed the max_length here 7ebd9a4e51.

@Joezeppe commented on GitHub (Apr 15, 2021): If there are virtual machines with names greater than 64, I have already changed the max_length here https://github.com/Joezeppe/netbox/commit/7ebd9a4e51670ac197f69cd5b4e00e53c3b32fe7.
Author
Owner

@jeremystretch commented on GitHub (Apr 15, 2021):

@Joezeppe FYI introducing a custom migration will break future upgrades. If you want to go that route, you'll definitely want to fork the whole project.

@jeremystretch commented on GitHub (Apr 15, 2021): @Joezeppe FYI introducing a custom migration will break future upgrades. If you want to go that route, you'll definitely want to fork the whole project.
Author
Owner

@Joezeppe commented on GitHub (Apr 15, 2021):

@jeremystretch I will not customize existing migration files if that's what you mean. I will add a new migration file. FYI, I have already forked the whole project.

@Joezeppe commented on GitHub (Apr 15, 2021): @jeremystretch I will not customize existing migration files if that's what you mean. I will add a new migration file. FYI, I have already forked the whole project.
Author
Owner

@github-actions[bot] commented on GitHub (May 22, 2021):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (May 22, 2021): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4567