[PVE-User] setting NET config via API

Guy guy at britewhite.net
Mon Jul 15 23:28:41 CEST 2013


so a little more on this....

pvesh set /nodes/proxmox/qemu/20026/config/ --net0 e1000,bridge=vmbr20

works just fine..

however if I try the same via CURL..

curl -s -k -XPOST -H 'CSRFPreventionToken:$CSRFPreventionToken' '$host/api2/json/nodes/proxmox02/qemu/20011/config' -b 'PVEAuthCookie=$key' -d 'net0=e1000,bridge=vmbr20'

Then it fails with the error:

{"errors":{"net0":"invalid format - unable to parse network options\n"},"data":null}



On 15 Jul 2013, at 17:43, Guy <guy at britewhite.net> wrote:

> Hi All,
> 
> In version 2.x I was able to set the network configuration of my virtuals using the API with this string...
> 
> 
> net0='e1000,bridge=vmbr20'
> 
> or 
> 
> net0='e1000,bridge=vmbr10,tag=120'
> 
> this as I say was working just fine... however I've now upgraded to 3.0 and it's failing every time.
> 
> has something changed... or was I just lucky before.. and if so how should I be setting this... I really don't want to specify the MAC address here.. I'd rather proxmox made it up for me.
> 
> cheers,
> 
> ---Guy
> 
> Sent from my iPad_______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user




More information about the pve-user mailing list