Virtual Machine Primary IP Management #8992
Replies: 1 comment
-
See issue #1492. You can also use a Custom Script to perform the creation of VM+interface+address in a single step:
I do think it's a reasonable request to be able to do that with a single Save operation on the IP Address, and probably counts as a bug. Raise a bug report on Github giving the exact series of steps to reproduce. You didn't say what version of Netbox you're running though, so if you're not on latest 3.1.x, test it there to see if the problem still exists.
That's true, and it's normally how people use Netbox: the absence of an IP address implies the ability to assign that IP address. You could also write a custom script which:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm relatively new to Netbox, so I am entirely open to the possibility that the answer here is (essentially) that what I'm doing isn't in line with how Netbox was intended to be used.
Currently, I have our IPs configured such that when we deploy a new VM, we can simply search/select the IP:
Other than wishing for Netbox to just add a single default interface to the VM, this workflow is really what I was hoping for and it works well. This method makes it so our team members can create a VM and select an existing IP address without having to create the IP address from scratch.
The problem comes in when I go to decommission that VM.
Because the IP address is listed as the Primary IP of the VM, I have to:
If I try to both Un-check "Make this the primary IP" AND click x next to Virtual Machine and Interface names, it throws an error saying that it can't disconnect the IP because it is the primary. That is why I'm doing the extra step of editing the interface twice.
If I simply delete the VM, it deletes the IP address as well (instead of just disassociating it, leaving the IP available/searchable for reassignment later on).
I'm wondering if there is a way to do one of two things (or both):
Or, if there is another way to configure the IP addresses so that they are searchable when assigning them to a VM's interface (such that we wouldn't have to re-create the IP address object to keep it searchable after deleting the VM), then that would be fine as well.
Beta Was this translation helpful? Give feedback.
All reactions