Private network in Centos 8 Not using cloud-init

Issues related to configuring your network
Post Reply
AAX
Posts: 2
Joined: 2021/08/04 02:29:03

Private network in Centos 8 Not using cloud-init

Post by AAX » 2021/08/04 02:34:38

Centos 8 has cloud-init, and i want to setup private ip for this server for internal connectivity between server. I tried to setup "ifcfg-eth1" config file with all details and rebooted server. But its not working. I am using OVH server.

Also i have tried disable cloud-init, using following method: Created a file name "/etc/cloud/cloud.cfg.d/cloud-init.disabled" and added network: {config: disabled} to /etc/cloud/cloud.cfg file. Then i try to add network config file "ifcfg-eth0" and "ifcfg-eth1" manually and rebooted server, but did not worked.

How to solve this with or without cloud-init? And also how i can check if my cloud-init is disabled or not?

Regarards
AAX

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Private network in Centos 8 Not using cloud-init

Post by jlehtone » 2021/08/04 15:28:12

I presume that "OVH" is a "cloud provider". If they have included cloud-init in the image, then the idea is (probably) that you define things, like networks in the "cloud management dashboard" (or whatever it is called). The virtualization platform creates whatever is necessary and the cloud-init inside VM uses that data to set up (that part of) OS config.

AAX
Posts: 2
Joined: 2021/08/04 02:29:03

Re: Private network in Centos 8 Not using cloud-init

Post by AAX » 2021/08/05 00:30:44

We have a infrastructure setup at ovh. Our problem is that we are not able to assign private ip to the new server we just set up.


AAX

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Private network in Centos 8 Not using cloud-init

Post by jlehtone » 2021/08/05 15:45:32

I've only used OpenStack, where the service provider offers preinstalled images (CentOS 7, with cloud-init installed).
On boot of VM the cloud-init seems to get data from OpenStack that it used to configure the network.
(Looks like it generated ifcfg-file for network.service on first boot and that config uses DHCP to get IP address.)
https://cloudinit.readthedocs.io/en/lat ... onfig.html

The point is that in my case the OpenStack hands an address to the VM. I did tell OpenStack what addresses to use.
Even if I have just bare-metal machines (e.g. at home) I prefer to configure the DHCP server to hand out config for everyone.


How does the OVH "infrastructure setup" assign networks/links/addresses to servers?

Post Reply