How to use cloud-init to set up a VM or container static IP

vm1 | RUNNING | 10.226.52.19 (enp5s0)
vm4 | RUNNING | 10.226.52.56 (enp5s0)
I want vm1 gateway set 10.226.52.56 dns 10.226.52.56 set up a route table in vm1 can be accessed after reboot The route table set will disappear

In your case, you’re looking at the network config data part (bottom of the page).

1 Like