Hello, could you pls help me with network configuration of Ubuntu 20.04 VM via Rest API ? I need to permanently set IP for network interface ens18, tried it like this:
1) curl POST api2/json/nodes/<node_name>/qemu/<vm_id>/config {"ipconfig0": "name=ens18,ip=XXX.XXX.XXX.XXX/24,gw=XXX.XXX.XXX.XXX"} -> response 200 but no change of IP ...kinda expected
2) curl POST api2/json/nodes/<node_name>/qemu/<vm_id>/config {"net0": "virtio=XX:XX:XX:XX:XX:XX,bridge=vmbr0,firewall=1,ip=XXX.XXX.XXX.XXX/24"}
-> "net0":"invalid format - format error\nnet0.ip: property is not defined in schema ...
What is the proper way to achieve permanent change of IP ?
1) curl POST api2/json/nodes/<node_name>/qemu/<vm_id>/config {"ipconfig0": "name=ens18,ip=XXX.XXX.XXX.XXX/24,gw=XXX.XXX.XXX.XXX"} -> response 200 but no change of IP ...kinda expected
2) curl POST api2/json/nodes/<node_name>/qemu/<vm_id>/config {"net0": "virtio=XX:XX:XX:XX:XX:XX,bridge=vmbr0,firewall=1,ip=XXX.XXX.XXX.XXX/24"}
-> "net0":"invalid format - format error\nnet0.ip: property is not defined in schema ...
What is the proper way to achieve permanent change of IP ?