You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding persistent routes to a virtual router #13347
We're having trouble adding or changing routes on a Virtual Router in an Isolated Network. After rebooting the Virtual Router, all routes are lost and have to be updated manually.
Is there a way to save added or changed routes in the Virtual Router's startup configuration so they don't get lost?
@jeanvetorello I access the Virtual Router via VNC and use ip r del / ip r add to change network routes. I'm not using a VPC. I have an isolated network.
please note, the userdata applies to all VRs, so the userdata should be smart enough, based on the boot args of the VR (check /var/cache/cloud/cmdline).
Activity
jeanvetorello commentedon Jun 4, 2026
How did you add that route? Did you configure it under VPC → Static Routes?
weizhouapache commentedon Jun 4, 2026
this is not available for Isolated networks
miloserdoff commentedon Jun 5, 2026
@jeanvetorello I access the Virtual Router via VNC and use ip r del / ip r add to change network routes. I'm not using a VPC. I have an isolated network.
miloserdoff commentedon Jun 5, 2026
@weizhouapache Hello, could you please help me answer this question?
weizhouapache commentedon Jun 5, 2026
@miloserdoff
you may need a script and a systemd service which run the script every time when the VR starts.
However, when you restart network with cleanup, the systemd service and script do not exist in the new VR.
so, to achieve it, you can refer to https://www.shapeblue.com/customise-system-vms-via-user-data/
please note, the userdata applies to all VRs, so the userdata should be smart enough, based on the boot args of the VR (check /var/cache/cloud/cmdline).