Cannot move primary IP from device to VM or vice versa #8938

Closed
opened 2025-12-29 20:43:06 +01:00 by adam · 1 comment
Owner

Originally created by @devon-mar on GitHub (Dec 10, 2023).

Originally assigned to: @DanSheps on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.6.6

Python Version

3.8

Steps to Reproduce

  1. Add an IP to a device and set it as the device's primary IP address
  2. On a VM interface, assign the IP from step 1 and check "Make this the primary IP for the device/VM"
  3. On save, a ValueError is raised

This bug also works the other way around (VM to Device).

Expected Behavior

The IP address should be assigned to the VM interface.

Observed Behavior

<class 'ValueError'>

'IPAddressForm' has no field named 'assigned_object'.

Python version: 3.8.10
NetBox version: 3.6.6
Plugins: 
  netbox_demo: 0.3.1
Originally created by @devon-mar on GitHub (Dec 10, 2023). Originally assigned to: @DanSheps on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.6.6 ### Python Version 3.8 ### Steps to Reproduce 1. Add an IP to a device and set it as the device's primary IP address 2. On a VM interface, assign the IP from step 1 and check "Make this the primary IP for the device/VM" 3. On save, a `ValueError` is raised This bug also works the other way around (VM to Device). ### Expected Behavior The IP address should be assigned to the VM interface. ### Observed Behavior ``` <class 'ValueError'> 'IPAddressForm' has no field named 'assigned_object'. Python version: 3.8.10 NetBox version: 3.6.6 Plugins: netbox_demo: 0.3.1 ```
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:43:06 +01:00
adam closed this issue 2025-12-29 20:43:07 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 12, 2023):

To be clear, moving the primary IP for a device/VM is not supported. However, attempting to do so should return a validation error rather than raise an exception.

@jeremystretch commented on GitHub (Dec 12, 2023): To be clear, moving the primary IP for a device/VM is *not* supported. However, attempting to do so should return a validation error rather than raise an exception.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8938