Issues configuring network via API Proxmox VE 8.4

zefletch

New Member
May 23, 2025
3
0
1
While I know the common to allocate resources for VM's is to just use Terraform, it is not the preferred option for my current use case.

As such, I was writing a basic script just using the API to create VM's as per documentation at: https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/qemu

The rest of my configuration works except when I try to specify a network configuration, I get "500 no sdn vnet ID specified", but I do not see anything in the documentation that specifies a parameter for that data.
What does it appear that I am missing?
 
Hi!

Could you provide the complete API call that you make to the create_vm API endpoint? I suspect that the SDN is configured and one of the net* options is either malformed and therefore doesn't provide a correct bridge/vnet, but the whole API call provides more information to investigate here.
 
Sure. I've been using Postman for most of the testing before I translate the parameters into the script.
I've tested multiple things, but here is the current call I'm making with ip, node name, and mac address obfuscated.

Code:
https://<ip>:8006/api2/json/nodes/<node name>/qemu?vmid=113&name=APIVM3&cores=4&hotplug=cpu, memory&onboot=1&memory=4096&numa=1&net0=virtio=<mac address>,bridge=vmbr0,firewall=1&scsi20=local-lvm:4

The above network configuration I tested is replicated from the information of an existing working vm that was created using the proxmox UI.

My eventual goal is for the configuration to generate the MAC like the UI does, as I will then grab that MAC and use it for pxe booting the VM's for installation.

If you need any more information, let me know,
Thanks.
 
The error you described above should only happen if the bridge wasn't specified at all and the SDN is enabled. Could you try again with encoding the parameters in the URL?