0

I'm trying to auto-setup VM guests with CentOS 7 using network boot and kickstart with external network connectivity based on linux bridge. And I'd like to have solution lightweight, simple and portable, so I decided to create own, quite simple ansible module to achieve this.

But I'm using OVH infrastructure and because of that I've got weird network setup.

Let's say that I've got VM host with IP address from 192.168.0.0/24 class with default gateway at 192.168.0.1. But my 'public' IPs for vm guests are from 10.0.0.0/8 class.

Because of that and because of my assumptions the only way to do this is to setup vm guests to use public address from 10.0.0.1/8 class and add there static route to gateway 192.168.0.1 via it's network interface (let's call it 'eth0'). So my ip r result should look like this:

default via 192.168.0.1 dev eth0
192.168.0.1/32 dev eth0
10.0.0.0/8 dev eth0

My problem is that dracut, which CentOS 7 is using, cannot setup such routes both with dhcp (Bug 1045087) and static (ip=10.0.0.2::192.168.0.1:255.0.0.0:test:eth0:none) setup. I've also tried adding routes with rd.route with similar result..

Am I missing something? Is there any workaround for this issue (except for adding additional IP from 10.0.0.0/8 to vm host and nat'ing)?

b3niup
  • 101
  • 2

1 Answers1

0

It seems that even nat'ing this way doesn't work in ovh environment.

So the only workaround for this issue for now is to setup a proxy to mirror.centos.org on vm host listening on IP from 10.0.0.0/8 and use this in network installation as a centos repo...

b3niup
  • 101
  • 2