cloud-init does not apply network configuration from NoCloud resource
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
New
|
Undecided
|
Unassigned | ||
cloud-init (Ubuntu) |
Incomplete
|
High
|
Chad Smith |
Bug Description
I installed a new Ubuntu 20.04.3 LTS from server ISO yesterday to prepare a new template for my Proxmox VE based training setup.
It works, but cloud-init does not apply network configuration from NoCloud resource.
I have:
root@ubuntutemp
version: 1
config:
- type: physical
name: eth0
mac_address: '66:50:19:8c:97:ef'
subnets:
- type: static
address: '10.0.88.35'
netmask: '255.0.0.0'
gateway: '10.254.254.254'
- type: nameserver
address:
- '10.0.88.90'
search:
- 'tux.lab'
as well as a matching network interface:
root@ubuntutemp
2: eth0: <BROADCAST,
link/ether 66:50:19:8c:97:ef brd ff:ff:ff:ff:ff:ff
Yet, cloud-init does not apply this configuration. It also does not apply hostname.
It may be due to:
2022-01-18 12:14:07,520 - cc_final_
Confusingly enough some time ago I prepared an Ubuntu LTS 20.04 with Cloud Init and there it works. I made sure that the new VM uses the exact same cloud init configuration.
I had issues like this several times now that cloud init does not apply a configuration and it has been a mystery so far to me.
I tried:
- cloud-init clean ; cloud-init init
- rm /etc/machine.id ; cloud-init clean; reboot
- apt remove cloud-init*; rm -r /var/lib/cloud; apt install cloud-init packages; reboot
cause at first I thought it may be that is does not detect a second boot.
None of this worked.
So apparently cloud-init does not recognize the cloud-init NoCloud resource configuration. The NoCloud information is provided by an ISO images generated by Proxmox VE 7.1-9. This works with Debian, Devuan, Ubuntu LTS 18.04, another Ubuntu LTS 20.04 VM, CentOS 7/8, SLES 12/15.
The other information in there is:
root@ubuntutemp
instance-id: 61a74c24a0b8803
root@ubuntutemp
#cloud-config
hostname: ubuntutemplate
manage_etc_hosts: true
fqdn: ubuntutemplate.
ssh_authorized_
- ssh-rsa […]
chpasswd:
expire: False
users:
- default
package_upgrade: true
root@ubuntutemp
root@ubuntutemp
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: cloud-init 21.4-0ubuntu1~
ProcVersionSign
Uname: Linux 5.4.0-96-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Wed Jan 19 11:32:10 2022
InstallationDate: Installed on 2022-01-17 (1 days ago)
InstallationMedia: Ubuntu-Server 20.04.3 LTS "Focal Fossa" - Release amd64 (20210824)
PackageArchitec
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-init-
2022-01-17 15:14:00,189 - cc_final_
2022-01-18 12:14:07,520 - cc_final_
mtime.conffile.
mtime.conffile.
user_data.txt: Error: path contained symlinks.
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → High |
assignee: | nobody → Chad Smith (chad.smith) |
One more comment. I switched to
GRUB_CMDLINE_ LINUX_DEFAULT= "net.ifnames= 0 biosdevname=0"
as well, in order to make sure cloud-init finds the network interface after it did not work with "ens18".
However on the other Ubuntu LTS 20.04 VM I did not so this and cloud-init generates a config with "set-name: eth0" into it. I'd consider uploading the working template to the Proxmox VE instance with the non working one, but it would take a considerable amount of time using my uplink.
So I'd prefer to fix the non working one and finally understand what is going on in case cloud-init just does not apply the configuration. I had it with a Debian image that was provided to me some time ago, there it also did not apply the configuration, while on the Debian image I made, it did.