Aria Automation
how cloud-init interacts with different operating systems and their respective network management tools.

how cloud-init interacts with different operating systems and their respective network management tools.

When working with cloud-init, it’s crucial to understand how it interacts with different operating systems and their respective network management tools. This understanding ensures that your network configurations are applied correctly, especially when using orchestration tools like VMware Aria Automation.

In this post, I will describe the differences in how cloud-init interacts with network management tools in Ubuntu and Red Hat Enterprise Linux (RHEL) when configuring cloud VMs to obtain static IP addresses from a VMware Aria Automation static pool.

When the goal is to set a static IP address on a cloud VM, cloud-init must defer the network configuration to the external source. Follow these steps to achieve this on both Ubuntu and Red Hat Enterprise Linux.

Ubuntu with Netplan

In Ubuntu, particularly with versions that use Netplan for network configuration, you can disable cloud-init’s network management by creating a specific configuration file.

Steps to Disable Cloud-Init Networking on Ubuntu:

  1. Create Configuration File: Create a file named /etc/cloud/cloud.cfg.d/99-custom-networking.cfg.
  2. Add Disable Network Configuration: Add the following content to the file:
    network: {config:disabled}

This file informs cloud-init not to perform any network configuration, allowing Netplan to handle it according to the configuration specified in /etc/netplan/.

Red Hat with NetworkManager

In Red Hat-based distributions, which typically use NetworkManager, the same approach with a custom file might not work as expected. Instead, you need to include the network: config: disabled directive directly within the cloudConfig section of your YAML configuration in vRealize Automation.

Steps to Disable Cloud-Init Networking on Red Hat:

  1. Include Configuration in YAML: Add the network: config: disabled directive directly within the cloudConfig section of your vRealize Automation YAML configuration:

This method ensures that cloud-init recognizes the instruction to disable network management during the VM provisioning process.

Summary of Actions

For Ubuntu (with Netplan):

  1. Create the file /etc/cloud/cloud.cfg.d/99-custom-networking.cfg.
  2. Add the following content to the file:

For Red Hat (with NetworkManager):

  1. Include the network configuration disablement directly in the YAML configuration used by vRealize Automation:

Explanation

  • Ubuntu (Netplan):
    • Using /etc/cloud/cloud.cfg.d/99-custom-networking.cfg is a common method to disable cloud-init networking in systems using Netplan. This file is read by cloud-init during the initialization process, and the network: {config:disabled} directive tells cloud-init to skip network configuration.
  • Red Hat (NetworkManager):
    • Including network: config: disabled in the YAML configuration ensures that cloud-init on Red Hat systems recognizes this setting during the VM provisioning process. This approach is necessary because NetworkManager configurations and the cloud-init behavior can differ from those on Ubuntu.

By understanding and applying these differences, you can ensure consistent and expected network configurations across different operating systems managed by cloud-init and vRealize Automation.

6 thoughts on “how cloud-init interacts with different operating systems and their respective network management tools.

Leave a Reply

Your email address will not be published. Required fields are marked *