IP address assignment to virtual machine #13539
Replies: 1 comment
-
That's correct. You then have to assign the IP address to the interface, and then finally set the "primary IP" of the VM to point to this address.
Can you be more specific? How are you attempting to assign the IP (e.g. are you doing this via the GUI, via the REST API, via CSV upload, or something else?) and what version of Netbox? With current Netbox v3.5.x, in the GUI you will get a dropdown of interfaces, and indeed you will see lots of interfaces called "Ethernet01" (which is confusing), but there is a little button next to it which you can click to filter the list down to a single VM. Of course, deleting and recreating the IP is also fine. You could also create them all the objects at the same time. Here is a custom script which creates a VM, interface and IP address all in one operation: https://github.com/netbox-community/customizations/blob/master/scripts/create_vm.py |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Sorry if this was asked already but I did not find an answer.
I did a IP scan and then an imported all of the IP addresses. I then added in the VMs. I thought I would be able to then link the IP to the VM., but it seems difficult.
It seems I have to add an interface to the VM, which I called Ethernet01. It also seems I can link that but with a generic label on the interface I cannot find and easy way.
Seems to me I should just delete the IP addresses and then add the interface to the VM and then add the IP to the interface and fill it out.
That so far seems to be the easiest and fastest. Any other way is hard and creates a duplicate IP.
Any help is appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions