Proxmox API - POST lxc - Error code 400

Cubix Gamer

New Member
Jun 17, 2022
10
0
1
Hello,
I am sending api requests and my tool returned this error:
Code:
net0.ip: invalid format - value does not look like a valid ipv4 network configuration

net0 has this information: (I just removed the gw6)
Code:
name=vmbr0, ip6=auto, gw6=hide, gw=10.0.0.1, ip=10.0.0.21, rate=100

And I don't understand because 10.0.0.21 is a valid ip normally.

If anyone can help me please
 
Hey,

this is the regex the net config has to match [1]
Code:
name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]
the netmask is missing in your IP(it probably is /24, but that depends on your network setup).

[1] https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/lxc
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!