BMC cloud-init is a tool that automates the initial setup of a server’s operating system when it first boots, using configuration data you provide. You give it a config file (usually YAML) that specifies things like the hostname, users, SSH keys, and packages, and it applies those settings automatically, so you don’t have to log in and configure each machine by hand. This article explains what BMC cloud-init is, how it works, how to use it, and common pitfalls.
What Is BMC Cloud-Init?
BMC (Baseboard Management Controller) is the small, independent processor on a server motherboard that manages hardware even when the main CPU is off. It provides out-of-band management, meaning you can control the machine remotely via IPMI, Redfish, or a web interface. Cloud-init is a widely used open-source tool that runs on the guest operating system during first boot. When you combine the two, you get the ability to inject configuration into a bare-metal server via the BMC, so that the OS comes up ready to use, without any manual setup.
In practice, this is how many bare-metal cloud providers (like OpenStack Ironic, MAAS, or vendor-specific platforms) provision servers: the BMC mounts an ISO or exposes a virtual media device containing the OS image and a cloud-init seed file. When the server boots, cloud-init reads that seed, applies the settings, and the server is ready for production in minutes.
How Cloud-Init Works on Bare Metal
Cloud-init is designed for cloud instances, but it works on bare metal with a few adjustments. The process typically follows these steps:
- Boot the OS image – The BMC mounts a standard cloud image (e.g., Ubuntu Cloud, CentOS Cloud) via virtual media (ISO or floppy).
- Cloud-init runs at boot – The OS’s init system starts cloud-init, which looks for a data source. On bare metal, the data source is often a separate partition or a small ISO labeled
cidataorseed. - Reads configuration – Cloud-init reads the
user-dataandmeta-datafiles from that source.user-datacontains your instructions (users, packages, scripts), andmeta-datacontains instance-specific info like hostname and instance ID. - Applies configuration – It sets the hostname, creates users, installs packages, runs scripts, and then reboots or continues booting.
The key difference from a VM is that on bare metal, the BMC provides the virtual media, so you don’t need a cloud metadata service. You just prepare the seed ISO and tell the BMC to attach it.
How to Prepare a Cloud-Init Seed ISO
To use cloud-init on a bare-metal server, you need two files: user-data and meta-data. Here’s a minimal example of user-data:
#cloud-config
hostname: my-server
users:
- name: admin
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2E...
package_update: true
packages:
- nginx
- htop
And a minimal meta-data:
instance-id: my-server-001 local-hostname: my-server
Then you create an ISO with those files. On Linux, you can use genisoimage or xorriso:
genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
The volume label must be cidata (or CIDATA) for cloud-init to find it. After that, attach the ISO to the server via the BMC (e.g., in the iDRAC/ILO web interface, under “Virtual Media”), and boot the server from the OS image. Cloud-init will pick up the seed automatically.
Common Use Cases for BMC Cloud-Init
- Automated provisioning – Deploy dozens of servers with identical configurations without manual login.
- Secure remote setup – Inject your SSH public key so you can access the server immediately after boot, without ever typing a password.
- Customization – Install specific packages, set up storage, or run a bootstrap script for your configuration management tool (like Ansible or Puppet).
- Reproducible builds – Ensure every server is exactly the same, reducing configuration drift.
BMC Cloud-Init vs. Traditional PXE vs. Vendor Tools
Before cloud-init, bare-metal provisioning often used PXE (Preboot eXecution Environment) to boot a network installer, which then ran a kickstart or preseed script. That still works, but cloud-init is more modern, cloud-native, and easier to reuse across different OSes. Vendor tools like Dell iDRAC, HPE iLO, and Supermicro BMC each have their own scripting interfaces (e.g., racadm, ilorest) to attach virtual media, but they all ultimately just provide the ISO to cloud-init. The advantage of cloud-init is that you write the config once, and it works on any OS that supports cloud-init (Ubuntu, CentOS, Debian, Fedora, etc.), regardless of the BMC vendor.
Common Problems and How to Fix Them
Here are frequent issues when using cloud-init on bare metal:
- Cloud-init doesn’t run – The OS image might not have cloud-init installed. Ensure you’re using a cloud image that includes it, or install it in your base image.
- Seed not found – The ISO volume label must be exactly
cidata. Double-check withblkidon the booted system. - Config not applied – If you booted the OS once without the seed, cloud-init may have already run and cached state. Use
cloud-init cleanto reset, or boot from a fresh image. - SSH key not working – Make sure the key is correctly formatted and that you didn’t accidentally set
ssh_pwauth: falsewithout providing a key. - Network not configured – On bare metal, cloud-init often relies on DHCP. If your network requires static IPs, you need to provide network config in
user-data(using thenetwork:key) or in a separatenetwork-configfile.
Security and Safety Considerations
Cloud-init is powerful, so use it carefully. Never put plaintext passwords in user-data; use SSH keys or a secrets manager. Ensure the seed ISO is only attached during initial provisioning and then detached, to prevent anyone with BMC access from re-running it. Also, be aware that cloud-init runs with root privileges, so a malicious seed could compromise the server. Always source your OS images and seed files from trusted locations. If you’re unsure about the security of your BMC, change the default credentials immediately and keep the BMC firmware updated.
Frequently Asked Questions
Does cloud-init work on any bare-metal server?
Yes, as long as the server’s BMC can attach a virtual media ISO and the OS image includes cloud-init. Most modern servers from Dell, HPE, Supermicro, and others support this. Some older BMCs may not have virtual media, but you can still use a USB stick with the seed files.
Can I use cloud-init with a static IP address?
Yes. You can specify network configuration in the user-data file using the network: key (version 2 format). Alternatively, you can provide a network-config file on the seed ISO. Cloud-init will apply that instead of using DHCP.
What’s the difference between cloud-init and a kickstart script?
Kickstart (or preseed) is used during OS installation to automate the installer. Cloud-init runs after the OS is installed, on first boot, to configure the running system. Cloud-init is more flexible for post-boot tasks and is the standard on cloud images.
How do I debug cloud-init if something goes wrong?
Check the logs: on systemd systems, use journalctl -u cloud-init or look at /var/log/cloud-init.log and /var/log/cloud-init-output.log. You can also run cloud-init init --debug manually, but that’s advanced. Start by verifying the seed ISO is attached and the volume label is correct.
Can I reuse the same seed ISO for multiple servers?
Yes, but you should change the instance-id in meta-data for each server, and ideally the hostname. If you reuse the exact same seed, cloud-init might think it’s the same instance and skip some steps. Most people generate a new seed per server or use a template.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Tongue Escape Codes: What They Are0.20 movements/s
- HDMI 2.1 Explained: Why It Matters for Gaming
- Veeam Plugin for VMware Cloud Director: How It Works
- Claude Code Workflow Habits Worth Trying
- Best Path of Titans Server Hosting: Top Picks
- Oppo First Foldable: 120Hz Display & Snapdragon 888