Adding a route through cloud-init

greg

Renowned Member
Apr 6, 2011
135
2
83
Greetings

I'm testing cloud-init on a brand new Ubuntu 18.04 VM.

My problem is that the IP of the VM and the GW are not on the same subnet (which is quite usual for a floating IP), so I guess the whole process of setting network fails.

I can see the parameters in /etc/netplan/50-cloud-init.yaml, so I tried adding a file 60-route.yaml with this :

network:
version: 2
ethernets:
eth0:
routes:
- my.gw.ip/32
via: eth0

On reboot the network doesn't come up.

How can I achieve setting up the network?

Thanks in advance
 
  • Like
Reactions: Amin Vakil
I found a way:

network:
version: 2
ethernets:
eth0:
gateway4: 94.23.201.254
routes:
- to: 94.23.201.254/32
via: 0.0.0.0
scope: link

(be careful it's yaml which is very hard to write correctly).

Is there a way to achieve that with Proxmox GUI?

TIA
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!