BUG: No routing in VM with cloud init (ubuntu 18.x - 19.4)

Virtualizer

Active Member
Dec 19, 2011
90
3
28
It´s possible a bug in the network setting from proxmox to VMs with cloud-init and ubuntu. I have see many forum entries about the same problemas! The big problem is a wrong routing and only with a manual work arround the VMs will runs! That can been, that a routing with a gateway neer the same network will run directly without problems, but a routing outside the NIC network can been a big problem!

So expl. IP 201.201.201.12/24 and GW 201.201.201.254 can been working but not expl. this constelation:
IP 201.201.201.12/24 and GW 165.165.165.165 - but only about the commands they use for this routing! When the scripts use different routing commands in this following form a routing will work correct - in moment with use the old commands the routing not exists in the VMs (under Ubuntu) !!!

route add 165.165.165.165 dev eth0
route add default gw 165.165.165.165

So please is somebody they can confirm this?! And we like that we get in future a proxmox so as they do this, what we Admins have enter in the GUI !!!
 
  • Like
Reactions: Amin Vakil

mira

Proxmox Staff Member
Staff member
Aug 1, 2018
449
39
28
If the gateway is not in the same subnet as the network, a route will be added on Fedora. On Ubuntu it requires an Ubuntu specific workaround that's not actually a 'valid' (documented) cloud-init network config option. (Add 'on-link: true' or something like that) And it requires the network config v2 to actually work.
That's the reason it is not yet implemented. Perhaps other distributions require even other workarounds.
For now please use a custom snippet with network config v2 and 'on-link: true' for routes on Ubuntu.
 

Bogdan Popa

New Member
Aug 4, 2017
7
1
3
34
Hello,

Could you please share an example of a snippet for this problem? I've been trying to figure this out for a day now..
 

Virtualizer

Active Member
Dec 19, 2011
90
3
28
For now please use a custom snippet with network config v2 and 'on-link: true' for routes on Ubuntu.

Please enter a link for the documentation, please!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!