Can not create virtual machine with primary_ip4 parameter #607
-
Hello Everyone. I try to create a new virtual machine specifing the IP4-address via the parameter primary_ip4. I created the ip adress via the netbox.netbox.netbox_ip_address module successfully. I use the adress value (e. g. 10.0.2.4/24) here for the parameter value. ID of the IP-address is not being recognized, only IP-address itself is working. But then, the creation fails with the error The specified IP address (10.0.2.4/24) is not assigned to this VM. But this is the correct IP address as detected by Ansible via the ansible_default_ipv4.address fact. Quick help is needed, as relating VM and IP is very helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So this is an example playbook which works (just tested it):
So as the error message implies you have to assign the IP address to the VM, and it is done through adding it to a VM interface. |
Beta Was this translation helpful? Give feedback.
So this is an example playbook which works (just tested it):