canonical / canonical/cloud-init

[Ubuntu 26.04] Unable to rename interfaces: [busy] Error renaming from ens18 to eth0 with netplan 1.2

Open
#6,887 2 comments 10 reactions 0 assignees View on GitHub
bug new
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

# Bug report

cloud-init fails to rename network interface from predictable name (`ens18`) to desired name (`eth0`).
The rename operation fails with `[busy]` error, causing the full network configuration (including DNS, routes, etc.) to not be applied correctly. User usually needs to run `netplan apply` manually after first boot.

It seems this issue is related to stricter "online" definition in newer netplan (1.2+) as described here:
https://discourse.ubuntu.com/t/spec-definition-of-an-online-system/27838

## Steps to reproduce the problem

1. Deploy a fresh Ubuntu 26.04 cloud image on Proxmox (or KVM).
2. Use the following netplan configuration (typical for Proxmox):

```yaml
network:
version: 2
ethernets:
eth0:
match:
macaddress: "xx:xx:xx:xx:xx:xx"
set-name: eth0
addresses: [...]
nameservers: [...]
routes: [...]
```

3. Boot the VM.

## Environment details

- **Cloud-init version**: 26.1-0ubuntu2
- **Operating System Distribution**: Ubuntu 26.04 (Resolute)
- **netplan version**: 1.2+
- **Cloud provider, platform or installer type**: Proxmox VE (KVM)

## What we tried (did not solve the issue)

- Added `ExecStartPre=/bin/sleep` (4s, 7s, 10s) on:
- `cloud-init-local.service` (/etc/systemd/system/cloud-init-local.service.d/99-delay.conf)
- `cloud-init-network.service` (/etc/systemd/system/cloud-init-network.service.d/99-delay.conf)
- Overrode `systemd-networkd-wait-online.service` (/etc/systemd/system/systemd-networkd-wait-online.service.d/99-override.conf) with:
- `--any --timeout=30/40/60/90 -o routable -i eth0 `
- Various combinations of delay + timeout override

None of the above reliably fixed the rename failure.

## cloud-init logs

```
2026-05-16 08:12:04,428 - net[WARNING]: Unable to rename interfaces: [['bc:24:11:56:41:9f', 'eth0', None, None]] due to errors: ['[busy] Error renaming mac=bc:24:11:56:41:9f from ens18 to eth0']
2026-05-16 08:12:04,428 - stages.py[WARNING]: Failed to apply network config names: [busy] Error renaming mac=bc:24:11:56:41:9f from ens18 to eth0
```

(Full log available if needed)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.