title: Cloudinit, Proxmox, Ubuntu & Static Routes
body: <p>I'm creating instances on a development proxmox setup. To configure the networking inside the instance I am using Cloudinit and snippets. On Ubuntu distributions it appears I need to set up a static route to the gateway but, I can't figure out a way to do this that persists across reboots.</p>
  <p>When the instance is configured, My cloud-init drive gets the correct IP and gateway and this is configured inside the instance but I have to manually specify a route using</p>
  <pre><code>IP route add gateway_ip dev eth0
  IP route add default via gateway_ip
  </code></pre>
  <p>If I reboot the instance the routes are lost and I am back to square one. How can I ensure when an instance is configured the routes are also there. I thought about creating an OS template with the routes already configured but this does not work, they are wiped out on reboot too.</p>
  <p>Can anyone suggest a way I can do this?</p>