import pynetbox
vm_name='vm1'
nb = pynetbox.api('http://my-netbox-instance.com', token='my-token')
print(nb.virtualization.virtual_machines.all())
nb.virtualization.virtual_machines.create(name='TestVM',cluster='Generic')
quit()
['vm1', 'vm2', 'vm3']import pynetboxfrom config import *
vm_name='vmtest'
nb = pynetbox.api(NETBOX_URL, token=NETBOX_TOKEN)
nb.virtualization.virtual_machines.create(name=vm_name,status=1,cluster='12',address='173.3.3.1')1. Create the VM
2. Create an interface and associate it to the VM (using the VM id)
3. Create an IP address and associate it with the interface (using the interface id)